Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Unified Diff: Source/core/css/CSSGrammar.y

Issue 183803016: Rename ^ and ^^ combinator to /shadow-all/ and /shadow-deep/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/shadow/style-with-hat-expected.txt ('k') | Source/core/css/CSSSelector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSGrammar.y
diff --git a/Source/core/css/CSSGrammar.y b/Source/core/css/CSSGrammar.y
index 65c24613abe1b07027e56cbd26936cae5ba40c44..4b47b3de22c33111798b6a1a4d86a1bb6dc5b222 100644
--- a/Source/core/css/CSSGrammar.y
+++ b/Source/core/css/CSSGrammar.y
@@ -1045,15 +1045,17 @@ combinator:
'+' maybe_space { $$ = CSSSelector::DirectAdjacent; }
| '~' maybe_space { $$ = CSSSelector::IndirectAdjacent; }
| '>' maybe_space { $$ = CSSSelector::Child; }
- | '^' maybe_space {
+ // FIXME: implement named combinator and replace the following /shadow/, /shadow-all/ and
+ // /shadow-deep/ with named combinator's implementation.
+ | '/' IDENT '/' maybe_space {
if (!RuntimeEnabledFeatures::shadowDOMEnabled())
YYERROR;
- $$ = CSSSelector::ChildTree;
- }
- | '^' '^' maybe_space {
- if (!RuntimeEnabledFeatures::shadowDOMEnabled())
+ if ($2.equalIgnoringCase("shadow-all"))
+ $$ = CSSSelector::ShadowAll;
+ else if ($2.equalIgnoringCase("shadow-deep"))
+ $$ = CSSSelector::ShadowDeep;
+ else
YYERROR;
- $$ = CSSSelector::DescendantTree;
}
;
« no previous file with comments | « LayoutTests/fast/dom/shadow/style-with-hat-expected.txt ('k') | Source/core/css/CSSSelector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698