亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? htmltokenizer.h

?? linux下開源瀏覽器WebKit的源碼,市面上的很多商用瀏覽器都是移植自WebKit
?? H
字號:
/*    Copyright (C) 1997 Martin Jones (mjones@kde.org)              (C) 1997 Torben Weis (weis@kde.org)              (C) 1998 Waldo Bastian (bastian@kde.org)              (C) 2001 Dirk Mueller (mueller@kde.org)    Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.    This library is free software; you can redistribute it and/or    modify it under the terms of the GNU Library General Public    License as published by the Free Software Foundation; either    version 2 of the License, or (at your option) any later version.    This library is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    Library General Public License for more details.    You should have received a copy of the GNU Library General Public License    along with this library; see the file COPYING.LIB.  If not, write to    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,    Boston, MA 02110-1301, USA.*/#ifndef HTMLTokenizer_h#define HTMLTokenizer_h#include "CachedResourceClient.h"#include "CachedResourceHandle.h"#include "NamedMappedAttrMap.h"#include "SegmentedString.h"#include "Timer.h"#include "Tokenizer.h"#include <wtf/Deque.h>#include <wtf/OwnPtr.h>#include <wtf/Vector.h>namespace WebCore {class CachedScript;class DocumentFragment;class Document;class HTMLDocument;class HTMLScriptElement;class HTMLViewSourceDocument;class FrameView;class HTMLParser;class Node;class PreloadScanner;class ScriptSourceCode;/** * @internal * represents one HTML tag. Consists of a numerical id, and the list * of attributes. Can also represent text. In this case the id = 0 and * text contains the text. */struct Token {    Token()        : beginTag(true)        , selfClosingTag(false)        , brokenXMLStyle(false)        , m_sourceInfo(0)    { }    ~Token() { }    void addAttribute(AtomicString& attrName, const AtomicString& v, bool viewSourceMode);    bool isOpenTag(const QualifiedName& fullName) const { return beginTag && fullName.localName() == tagName; }    bool isCloseTag(const QualifiedName& fullName) const { return !beginTag && fullName.localName() == tagName; }    void reset()    {        attrs = 0;        text = 0;        tagName = nullAtom;        beginTag = true;        selfClosingTag = false;        brokenXMLStyle = false;        if (m_sourceInfo)            m_sourceInfo->clear();    }    void addViewSourceChar(UChar c) { if (!m_sourceInfo.get()) m_sourceInfo.set(new Vector<UChar>); m_sourceInfo->append(c); }    RefPtr<NamedMappedAttrMap> attrs;    RefPtr<StringImpl> text;    AtomicString tagName;    bool beginTag;    bool selfClosingTag;    bool brokenXMLStyle;    OwnPtr<Vector<UChar> > m_sourceInfo;};enum DoctypeState {    DoctypeBegin,    DoctypeBeforeName,    DoctypeName,    DoctypeAfterName,    DoctypeBeforePublicID,    DoctypePublicID,    DoctypeAfterPublicID,    DoctypeBeforeSystemID,    DoctypeSystemID,    DoctypeAfterSystemID,    DoctypeBogus};class DoctypeToken {public:    DoctypeToken() {}        void reset()    {        m_name.clear();        m_publicID.clear();        m_systemID.clear();        m_state = DoctypeBegin;        m_source.clear();    }    DoctypeState state() { return m_state; }    void setState(DoctypeState s) { m_state = s; }    Vector<UChar> m_name;    Vector<UChar> m_publicID;    Vector<UChar> m_systemID;    DoctypeState m_state;        Vector<UChar> m_source;};//-----------------------------------------------------------------------------class HTMLTokenizer : public Tokenizer, public CachedResourceClient {public:    HTMLTokenizer(HTMLDocument*, bool reportErrors);    HTMLTokenizer(HTMLViewSourceDocument*);    HTMLTokenizer(DocumentFragment*);    virtual ~HTMLTokenizer();    virtual void write(const SegmentedString&, bool appendData);    virtual void finish();    virtual void setForceSynchronous(bool force);    virtual bool isWaitingForScripts() const;    virtual void stopParsing();    virtual bool processingData() const;    virtual int executingScript() const { return m_executingScript; }    virtual int lineNumber() const { return m_lineNumber; }    virtual int columnNumber() const { return 1; }    bool processingContentWrittenByScript() const { return m_src.excludeLineNumbers(); }        virtual void executeScriptsWaitingForStylesheets();        virtual bool isHTMLTokenizer() const { return true; }    HTMLParser* htmlParser() const { return m_parser.get(); }private:    class State;    // Where we are in parsing a tag    void begin();    void end();    void reset();    PassRefPtr<Node> processToken();    void processDoctypeToken();    State processListing(SegmentedString, State);    State parseComment(SegmentedString&, State);    State parseDoctype(SegmentedString&, State);    State parseServer(SegmentedString&, State);    State parseText(SegmentedString&, State);    State parseSpecial(SegmentedString&, State);    State parseTag(SegmentedString&, State);    State parseEntity(SegmentedString&, UChar*& dest, State, unsigned& cBufferPos, bool start, bool parsingTag);    State parseProcessingInstruction(SegmentedString&, State);    State scriptHandler(State);    State scriptExecution(const ScriptSourceCode&, State);    void setSrc(const SegmentedString&);     // check if we have enough space in the buffer.    // if not enlarge it    inline void checkBuffer(int len = 10)    {        if ((m_dest - m_buffer) > m_bufferSize - len)            enlargeBuffer(len);    }    inline void checkScriptBuffer(int len = 10)    {        if (m_scriptCodeSize + len >= m_scriptCodeCapacity)            enlargeScriptBuffer(len);    }    void enlargeBuffer(int len);    void enlargeScriptBuffer(int len);    bool continueProcessing(int& processedCount, double startTime, State&);    void timerFired(Timer<HTMLTokenizer>*);    void allDataProcessed();    // from CachedResourceClient    void notifyFinished(CachedResource*);    // Internal buffers    ///////////////////    UChar* m_buffer;    int m_bufferSize;    UChar* m_dest;    Token m_currentToken;    // Tokenizer flags    //////////////////    // are we in quotes within a html tag    enum { NoQuote, SingleQuote, DoubleQuote } tquote;    // Are we in a &... character entity description?    enum EntityState {        NoEntity = 0,        SearchEntity = 1,        NumericSearch = 2,        Hexadecimal = 3,        Decimal = 4,        EntityName = 5,        SearchSemicolon = 6    };    unsigned EntityUnicodeValue;    enum TagState {        NoTag = 0,        TagName = 1,        SearchAttribute = 2,        AttributeName = 3,        SearchEqual = 4,        SearchValue = 5,        QuotedValue = 6,        Value = 7,        SearchEnd = 8    };    class State {    public:        State() : m_bits(0) { }        TagState tagState() const { return static_cast<TagState>(m_bits & TagMask); }        void setTagState(TagState t) { m_bits = (m_bits & ~TagMask) | t; }        EntityState entityState() const { return static_cast<EntityState>((m_bits & EntityMask) >> EntityShift); }        void setEntityState(EntityState e) { m_bits = (m_bits & ~EntityMask) | (e << EntityShift); }        bool inScript() const { return testBit(InScript); }        void setInScript(bool v) { setBit(InScript, v); }        bool inStyle() const { return testBit(InStyle); }        void setInStyle(bool v) { setBit(InStyle, v); }        bool inXmp() const { return testBit(InXmp); }        void setInXmp(bool v) { setBit(InXmp, v); }        bool inTitle() const { return testBit(InTitle); }        void setInTitle(bool v) { setBit(InTitle, v); }        bool inIFrame() const { return testBit(InIFrame); }        void setInIFrame(bool v) { setBit(InIFrame, v); }        bool inPlainText() const { return testBit(InPlainText); }        void setInPlainText(bool v) { setBit(InPlainText, v); }        bool inProcessingInstruction() const { return testBit(InProcessingInstruction); }        void setInProcessingInstruction(bool v) { return setBit(InProcessingInstruction, v); }        bool inComment() const { return testBit(InComment); }        void setInComment(bool v) { setBit(InComment, v); }        bool inDoctype() const { return testBit(InDoctype); }        void setInDoctype(bool v) { setBit(InDoctype, v); }        bool inTextArea() const { return testBit(InTextArea); }        void setInTextArea(bool v) { setBit(InTextArea, v); }        bool escaped() const { return testBit(Escaped); }        void setEscaped(bool v) { setBit(Escaped, v); }        bool inServer() const { return testBit(InServer); }        void setInServer(bool v) { setBit(InServer, v); }        bool skipLF() const { return testBit(SkipLF); }        void setSkipLF(bool v) { setBit(SkipLF, v); }        bool startTag() const { return testBit(StartTag); }        void setStartTag(bool v) { setBit(StartTag, v); }        bool discardLF() const { return testBit(DiscardLF); }        void setDiscardLF(bool v) { setBit(DiscardLF, v); }        bool allowYield() const { return testBit(AllowYield); }        void setAllowYield(bool v) { setBit(AllowYield, v); }        bool loadingExtScript() const { return testBit(LoadingExtScript); }        void setLoadingExtScript(bool v) { setBit(LoadingExtScript, v); }        bool forceSynchronous() const { return testBit(ForceSynchronous); }        void setForceSynchronous(bool v) { setBit(ForceSynchronous, v); }        bool inAnySpecial() const { return m_bits & (InScript | InStyle | InXmp | InTextArea | InTitle | InIFrame); }        bool hasTagState() const { return m_bits & TagMask; }        bool hasEntityState() const { return m_bits & EntityMask; }        bool needsSpecialWriteHandling() const { return m_bits & (InScript | InStyle | InXmp | InTextArea | InTitle | InIFrame | TagMask | EntityMask | InPlainText | InComment | InDoctype | InServer | InProcessingInstruction | StartTag); }    private:        static const int EntityShift = 4;        enum StateBits {            TagMask = (1 << 4) - 1,            EntityMask = (1 << 7) - (1 << 4),            InScript = 1 << 7,            InStyle = 1 << 8,            // Bit 9 unused            InXmp = 1 << 10,            InTitle = 1 << 11,            InPlainText = 1 << 12,            InProcessingInstruction = 1 << 13,            InComment = 1 << 14,            InTextArea = 1 << 15,            Escaped = 1 << 16,            InServer = 1 << 17,            SkipLF = 1 << 18,            StartTag = 1 << 19,            DiscardLF = 1 << 20, // FIXME: should clarify difference between skip and discard            AllowYield = 1 << 21,            LoadingExtScript = 1 << 22,            ForceSynchronous = 1 << 23,            InIFrame = 1 << 24,            InDoctype = 1 << 25        };        void setBit(StateBits bit, bool value)        {            if (value)                m_bits |= bit;            else                m_bits &= ~bit;        }        bool testBit(StateBits bit) const { return m_bits & bit; }        unsigned m_bits;    };    State m_state;        DoctypeToken m_doctypeToken;    int m_doctypeSearchCount;    int m_doctypeSecondarySearchCount;    bool m_brokenServer;    // Name of an attribute that we just scanned.    AtomicString m_attrName;    // Used to store the code of a scripting sequence    UChar* m_scriptCode;    // Size of the script sequenze stored in @ref #scriptCode    int m_scriptCodeSize;    // Maximal size that can be stored in @ref #scriptCode    int m_scriptCodeCapacity;    // resync point of script code size    int m_scriptCodeResync;    // Stores characters if we are scanning for a string like "</script>"    UChar searchBuffer[10];        // Counts where we are in the string we are scanning for    int searchCount;    // the stopper string    const char* m_searchStopper;    int m_searchStopperLength;        // if no more data is coming, just parse what we have (including ext scripts that    // may be still downloading) and finish    bool m_noMoreData;    // URL to get source code of script from    String m_scriptTagSrcAttrValue;    String m_scriptTagCharsetAttrValue;    // the HTML code we will parse after the external script we are waiting for has loaded    SegmentedString m_pendingSrc;    // the HTML code we will parse after this particular script has    // loaded, but before all pending HTML    SegmentedString* m_currentPrependingSrc;    // true if we are executing a script while parsing a document. This causes the parsing of    // the output of the script to be postponed until after the script has finished executing    int m_executingScript;    Deque<CachedResourceHandle<CachedScript> > m_pendingScripts;    RefPtr<HTMLScriptElement> m_scriptNode;    bool m_requestingScript;    bool m_hasScriptsWaitingForStylesheets;    // if we found one broken comment, there are most likely others as well    // store a flag to get rid of the O(n^2) behaviour in such a case.    bool m_brokenComments;    // current line number    int m_lineNumber;    int m_currentScriptTagStartLineNumber;    int m_currentTagStartLineNumber;    double m_tokenizerTimeDelay;    int m_tokenizerChunkSize;    // The timer for continued processing.    Timer<HTMLTokenizer> m_timer;// This buffer can hold arbitrarily long user-defined attribute names, such as in EMBED tags.// So any fixed number might be too small, but rather than rewriting all usage of this buffer// we'll just make it large enough to handle all imaginable cases.#define CBUFLEN 1024    UChar m_cBuffer[CBUFLEN + 2];    unsigned int m_cBufferPos;    SegmentedString m_src;    Document* m_doc;    OwnPtr<HTMLParser> m_parser;    bool m_inWrite;    bool m_fragment;    OwnPtr<PreloadScanner> m_preloadScanner;};void parseHTMLDocumentFragment(const String&, DocumentFragment*);UChar decodeNamedEntity(const char*);} // namespace WebCore#endif // HTMLTokenizer_h

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
裸体健美xxxx欧美裸体表演| 97精品久久久午夜一区二区三区 | 日韩久久一区二区| 天堂午夜影视日韩欧美一区二区| 国产高清不卡二三区| 91福利在线观看| 中文字幕av一区二区三区| 亚洲一二三四在线| 成人av网站在线观看| 精品久久人人做人人爱| 一个色综合av| 91视频xxxx| 欧美激情中文不卡| 国产伦理精品不卡| 日韩午夜小视频| 日日摸夜夜添夜夜添国产精品| 一本色道久久综合亚洲精品按摩| 久久人人爽爽爽人久久久| 蜜臀久久99精品久久久久宅男 | 成人免费视频视频在线观看免费| 欧美一区三区二区| 爽好多水快深点欧美视频| 在线精品视频一区二区三四| 国产精品萝li| 成人h版在线观看| 国产精品二三区| 成人av影视在线观看| 中文字幕免费不卡| 国产91高潮流白浆在线麻豆| 26uuu精品一区二区三区四区在线| 奇米在线7777在线精品 | 91麻豆国产在线观看| 国产精品久久看| 91麻豆国产精品久久| 亚洲黄色免费电影| 欧美视频在线观看一区| 亚洲高清不卡在线观看| 欧美日本在线看| 麻豆精品一区二区三区| 26uuu亚洲综合色| 成人精品免费视频| 亚洲色图色小说| 91国偷自产一区二区三区成为亚洲经典| 亚洲免费观看在线观看| 欧美日韩国产一级| 久久99精品久久久久久久久久久久| 日韩精品一区二| 国产精品自拍av| 亚洲欧美日韩久久| 欧美日韩激情一区二区三区| 久久不见久久见中文字幕免费| 久久久蜜臀国产一区二区| 成人激情免费视频| 婷婷综合在线观看| 国产欧美一区二区精品秋霞影院 | 国产伦精品一区二区三区在线观看| 久久影视一区二区| 91在线视频官网| 日本午夜一本久久久综合| 国产欧美一区二区精品婷婷| 欧美在线你懂的| 国产乱国产乱300精品| 亚洲男女毛片无遮挡| 精品免费一区二区三区| 色婷婷av一区二区三区之一色屋| 奇米影视一区二区三区| 国产精品视频一二| 欧美二区乱c少妇| 粉嫩13p一区二区三区| 亚洲电影视频在线| 国产精品日产欧美久久久久| 在线不卡一区二区| 波多野结衣欧美| 卡一卡二国产精品| 亚洲美女区一区| 久久尤物电影视频在线观看| 欧美日韩精品免费观看视频| 粉嫩av一区二区三区| 蜜芽一区二区三区| 亚洲综合成人在线视频| 久久久www成人免费毛片麻豆| 欧美综合天天夜夜久久| 国产91精品精华液一区二区三区 | 亚洲不卡av一区二区三区| 久久综合精品国产一区二区三区 | 国产丝袜在线精品| 在线不卡中文字幕| 欧美在线不卡一区| 91亚洲午夜精品久久久久久| 国内精品久久久久影院薰衣草 | 亚洲色图制服丝袜| 国产午夜精品一区二区三区嫩草| 欧美精品色一区二区三区| 91日韩精品一区| 成人午夜av在线| 国产激情偷乱视频一区二区三区 | 成人av在线网| 国产精品自拍三区| 狠狠网亚洲精品| 蜜桃av一区二区三区电影| 亚洲444eee在线观看| 亚洲最新视频在线观看| 亚洲视频综合在线| 自拍偷拍国产精品| 国产精品久久久久久久久果冻传媒| 久久夜色精品国产噜噜av| 日韩精品一区二| 精品国产乱码久久久久久久| 欧美一区二区三区在线视频| 欧美日韩国产综合视频在线观看| 欧美日韩国产综合一区二区三区 | 美女视频黄免费的久久| 日本午夜一区二区| 久久国产夜色精品鲁鲁99| 日本一道高清亚洲日美韩| 蜜臀av国产精品久久久久| 日本一道高清亚洲日美韩| 麻豆91精品91久久久的内涵| 韩国精品久久久| 成人午夜av影视| 91免费在线视频观看| 91国产丝袜在线播放| 欧美影院一区二区| 欧美电影一区二区| 精品日韩成人av| 国产欧美日韩亚州综合| 国产精品久久久久久久久晋中 | 91亚洲大成网污www| 99国产精品国产精品久久| 色猫猫国产区一区二在线视频| 在线亚洲+欧美+日本专区| 欧美蜜桃一区二区三区| 日韩精品一区二区在线观看| 久久久久久久久97黄色工厂| 亚洲国产高清aⅴ视频| 亚洲欧美日韩综合aⅴ视频| 亚洲第一在线综合网站| 九九热在线视频观看这里只有精品| 国产乱码精品1区2区3区| 91蜜桃网址入口| 日韩一区二区三区视频| 国产欧美综合在线观看第十页 | 中文字幕一区二区三区色视频| 中文字幕一区二区三| 天天综合天天做天天综合| 国产经典欧美精品| 欧美日韩成人综合在线一区二区| 欧美电影免费观看高清完整版在线 | 亚洲精品一线二线三线无人区| 日本一区二区三区在线不卡| 亚洲精品乱码久久久久久久久| 日韩国产在线一| 不卡电影一区二区三区| 欧美理论片在线| 国产精品精品国产色婷婷| 日精品一区二区三区| 成人性生交大片免费看视频在线 | 日韩经典一区二区| www.欧美日韩国产在线| 日韩一区二区影院| 亚洲一区二区三区中文字幕 | 日韩**一区毛片| 91在线观看污| 久久久激情视频| 日韩中文字幕亚洲一区二区va在线| 国产精选一区二区三区| 在线电影院国产精品| 亚洲男人电影天堂| 丰满白嫩尤物一区二区| 精品国产在天天线2019| 亚洲国产精品久久久久秋霞影院| 不卡一区中文字幕| 国产亚洲1区2区3区| 蜜臀av性久久久久蜜臀aⅴ流畅| 91论坛在线播放| 国产视频一区在线观看| 九一久久久久久| 日韩三级精品电影久久久| 亚洲蜜臀av乱码久久精品蜜桃| 国产成人av一区二区三区在线观看| 欧美一区二区三区四区视频| 亚洲主播在线播放| 91性感美女视频| 国产精品无圣光一区二区| 国产精一品亚洲二区在线视频| 精品欧美乱码久久久久久1区2区| 日韩精品高清不卡| 7777精品久久久大香线蕉| 亚洲自拍都市欧美小说| 欧美亚日韩国产aⅴ精品中极品| **欧美大码日韩| 99久久亚洲一区二区三区青草| 中文字幕乱码久久午夜不卡| 国产一区日韩二区欧美三区| 日韩精品一区二区三区蜜臀| 老汉av免费一区二区三区| 日韩精品在线一区| 久久精品国产在热久久| 欧美大黄免费观看| 国内久久精品视频|