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

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

Issue 210813003: Rename :ancestor to :host-context. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 6 years, 9 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
Index: Source/core/css/CSSGrammar.y
diff --git a/Source/core/css/CSSGrammar.y b/Source/core/css/CSSGrammar.y
index 155e6992b6eb6b1ea3de3ccea5113d42d92b7c17..c5901b87d0e14ba83fab2ad64b725f9f0c6ab4b5 100644
--- a/Source/core/css/CSSGrammar.y
+++ b/Source/core/css/CSSGrammar.y
@@ -116,7 +116,7 @@ static inline bool isCSSTokenAString(int yytype)
case FUNCTION:
case ANYFUNCTION:
case HOSTFUNCTION:
- case ANCESTORFUNCTION:
+ case HOSTCONTEXTFUNCTION:
case NOTFUNCTION:
case CALCFUNCTION:
case MINFUNCTION:
@@ -267,7 +267,7 @@ inline static CSSParserValue makeIdentValue(CSSParserString string)
%token <string> MINFUNCTION
%token <string> MAXFUNCTION
%token <string> HOSTFUNCTION
-%token <string> ANCESTORFUNCTION
+%token <string> HOSTCONTEXTFUNCTION
%token <string> UNICODERANGE
@@ -1481,27 +1481,27 @@ pseudo:
| ':' HOSTFUNCTION selector_recovery closing_parenthesis {
YYERROR;
}
- | ':' ANCESTORFUNCTION maybe_space simple_selector_list maybe_space closing_parenthesis {
+ // used by :host-context()
+ | ':' HOSTCONTEXTFUNCTION maybe_space simple_selector_list maybe_space closing_parenthesis {
$$ = parser->createFloatingSelector();
$$->setMatch(CSSSelector::PseudoClass);
$$->adoptSelectorVector(*parser->sinkFloatingSelectorVector($4));
parser->tokenToLowerCase($2);
$$->setValue($2);
CSSSelector::PseudoType type = $$->pseudoType();
- if (type != CSSSelector::PseudoAncestor)
+ if (type != CSSSelector::PseudoHostContext)
YYERROR;
}
- // used by :ancestor()
- | ':' ANCESTORFUNCTION maybe_space closing_parenthesis {
+ | ':' HOSTCONTEXTFUNCTION maybe_space closing_parenthesis {
$$ = parser->createFloatingSelector();
$$->setMatch(CSSSelector::PseudoClass);
parser->tokenToLowerCase($2);
$$->setValue($2.atomicSubstring(0, $2.length() - 1));
CSSSelector::PseudoType type = $$->pseudoType();
- if (type != CSSSelector::PseudoAncestor)
+ if (type != CSSSelector::PseudoHostContext)
YYERROR;
}
- | ':' ANCESTORFUNCTION selector_recovery closing_parenthesis {
+ | ':' HOSTCONTEXTFUNCTION selector_recovery closing_parenthesis {
YYERROR;
}
;

Powered by Google App Engine
This is Rietveld 408576698