Title: [106227] trunk/Source/WebCore
Revision
106227
Author
[email protected]
Date
2012-01-30 03:17:58 -0800 (Mon, 30 Jan 2012)

Log Message

Custom written CSS lexer
https://bugs.webkit.org/show_bug.cgi?id=70107

Rubber Stamped by Csaba Osztrogonác.

Do not advance pointer at the end of input, just
keep returning with END_TOKEN.

* css/CSSParser.cpp:
(WebCore::CSSParser::lex):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (106226 => 106227)


--- trunk/Source/WebCore/ChangeLog	2012-01-30 10:48:38 UTC (rev 106226)
+++ trunk/Source/WebCore/ChangeLog	2012-01-30 11:17:58 UTC (rev 106227)
@@ -1,3 +1,16 @@
+2012-01-30  Zoltan Herczeg  <[email protected]>
+
+        Custom written CSS lexer
+        https://bugs.webkit.org/show_bug.cgi?id=70107
+
+        Rubber Stamped by Csaba Osztrogonác.
+
+        Do not advance pointer at the end of input, just
+        keep returning with END_TOKEN.
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::lex):
+
 2012-01-30  Shinya Kawanaka  <[email protected]>
 
         The query selector for HTMLContentElement should follow the shadow dom spec.

Modified: trunk/Source/WebCore/css/CSSParser.cpp (106226 => 106227)


--- trunk/Source/WebCore/css/CSSParser.cpp	2012-01-30 10:48:38 UTC (rev 106226)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2012-01-30 11:17:58 UTC (rev 106227)
@@ -7446,6 +7446,7 @@
     CharacterDash,
 
     CharacterOther,
+    CharacterNull,
     CharacterWhiteSpace,
     CharacterEndMediaQuery,
     CharacterEndNthChild,
@@ -7467,7 +7468,7 @@
 
 // 128 ASCII codes
 static const CharacterType typesOfASCIICharacters[128] = {
-/*   0 - Null               */ CharacterOther,
+/*   0 - Null               */ CharacterNull,
 /*   1 - Start of Heading   */ CharacterOther,
 /*   2 - Start of Text      */ CharacterOther,
 /*   3 - End of Text        */ CharacterOther,
@@ -8427,6 +8428,11 @@
         // m_token is simply the current character.
         break;
 
+    case CharacterNull:
+        // Do not advance pointer at the end of input.
+        --m_currentCharacter;
+        break;
+
     case CharacterWhiteSpace:
         m_token = WHITESPACE;
         // Might start with a '\n'.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to