Title: [150337] trunk/Source/WebCore
Revision
150337
Author
[email protected]
Date
2013-05-18 08:02:57 -0700 (Sat, 18 May 2013)

Log Message

Use CSSParserSelector::appendTagHistory() from CSS grammar.
<http://webkit.org/b/116382>

Reviewed by Antti Koivisto.

CSSParserSelector already knows how to append another component to itself,
no need to duplicate that logic in the grammar.

* css/CSSGrammar.y.in:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (150336 => 150337)


--- trunk/Source/WebCore/ChangeLog	2013-05-18 11:36:50 UTC (rev 150336)
+++ trunk/Source/WebCore/ChangeLog	2013-05-18 15:02:57 UTC (rev 150337)
@@ -1,3 +1,15 @@
+2013-05-18  Andreas Kling  <[email protected]>
+
+        Use CSSParserSelector::appendTagHistory() from CSS grammar.
+        <http://webkit.org/b/116382>
+
+        Reviewed by Antti Koivisto.
+
+        CSSParserSelector already knows how to append another component to itself,
+        no need to duplicate that logic in the grammar.
+
+        * css/CSSGrammar.y.in:
+
 2013-05-18  Patrick Gansterer  <[email protected]>
 
         [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME

Modified: trunk/Source/WebCore/css/CSSGrammar.y.in (150336 => 150337)


--- trunk/Source/WebCore/css/CSSGrammar.y.in	2013-05-18 11:36:50 UTC (rev 150336)
+++ trunk/Source/WebCore/css/CSSGrammar.y.in	2013-05-18 15:02:57 UTC (rev 150337)
@@ -1207,25 +1207,15 @@
         $$ = $2;
         if (!$1)
             $$ = 0;
-        else if ($$) {
-            CSSParserSelector* end = $$;
-            while (end->tagHistory())
-                end = end->tagHistory();
-            end->setRelation(CSSSelector::Descendant);
-            end->setTagHistory(parser->sinkFloatingSelector($1));
-        }
+        else if ($$)
+            $$->appendTagHistory(CSSSelector::Descendant, parser->sinkFloatingSelector($1));
     }
     | selector combinator simple_selector {
         $$ = $3;
         if (!$1)
             $$ = 0;
-        else if ($$) {
-            CSSParserSelector* end = $$;
-            while (end->tagHistory())
-                end = end->tagHistory();
-            end->setRelation($2);
-            end->setTagHistory(parser->sinkFloatingSelector($1));
-        }
+        else if ($$)
+            $$->appendTagHistory($2, parser->sinkFloatingSelector($1));
     }
     | selector error {
         $$ = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to