X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fcore%2Fcss%2FCSSTokenizer.h;h=508bf71ee29bda242b128d9d466dc7bffb677fe1;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=5d8fae12e7f2bb08845b13c100431a4ce12411da;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/core/css/CSSTokenizer.h b/src/third_party/WebKit/Source/core/css/CSSTokenizer.h index 5d8fae1..508bf71 100644 --- a/src/third_party/WebKit/Source/core/css/CSSTokenizer.h +++ b/src/third_party/WebKit/Source/core/css/CSSTokenizer.h @@ -74,7 +74,7 @@ public: inline unsigned tokenStartOffset(); private: - UChar*& currentCharacter16(); + UChar* allocateStringBuffer16(size_t len); template inline CharacterType*& currentCharacter(); @@ -92,29 +92,33 @@ private: inline CSSParserLocation tokenLocation(); template - unsigned parseEscape(CharacterType*&); + static unsigned parseEscape(CharacterType*&); template - inline void UnicodeToChars(DestCharacterType*&, unsigned); - template - inline bool parseIdentifierInternal(SrcCharacterType*&, DestCharacterType*&, bool&); + static inline void UnicodeToChars(DestCharacterType*&, unsigned); + template + static inline bool parseIdentifierInternal(SrcCharacterType*&, DestCharacterType*&, bool&); + template + static size_t peekMaxIdentifierLen(SrcCharacterType*); template inline void parseIdentifier(CharacterType*&, CSSParserString&, bool&); + template + static size_t peekMaxStringLen(SrcCharacterType*, UChar quote); template - inline bool parseStringInternal(SrcCharacterType*&, DestCharacterType*&, UChar); - + static inline bool parseStringInternal(SrcCharacterType*&, DestCharacterType*&, UChar); template inline void parseString(CharacterType*&, CSSParserString& resultString, UChar); template inline bool findURI(CharacterType*& start, CharacterType*& end, UChar& quote); - + template + static size_t peekMaxURILen(SrcCharacterType*, UChar quote); template - inline bool parseURIInternal(SrcCharacterType*&, DestCharacterType*&, UChar quote); - + static inline bool parseURIInternal(SrcCharacterType*&, DestCharacterType*&, UChar quote); template inline void parseURI(CSSParserString&); + template inline bool parseUnicodeRange(); template @@ -155,6 +159,13 @@ private: OwnPtr m_dataStart16; LChar* m_currentCharacter8; UChar* m_currentCharacter16; + + // During parsing of an ASCII stylesheet we might locate escape + // sequences that expand into UTF-16 code points. Strings, + // identifiers and URIs containing such escape sequences are + // stored in m_cssStrings16 so that we don't have to store the + // whole stylesheet as UTF-16. + Vector > m_cssStrings16; union { LChar* ptr8; UChar* ptr16;