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

Unified Diff: Source/core/css/parser/BisonCSSParser-in.cpp

Issue 205563004: Revert of Implement /content/ combinator. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed patch conflict 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
« no previous file with comments | « Source/core/css/SelectorFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/BisonCSSParser-in.cpp
diff --git a/Source/core/css/parser/BisonCSSParser-in.cpp b/Source/core/css/parser/BisonCSSParser-in.cpp
index 23987f311bcaa9e955de34ca6c7b9888833feb79..3034a6f41cc3808e7ef4cc3b532b8c67cd87aec7 100644
--- a/Source/core/css/parser/BisonCSSParser-in.cpp
+++ b/Source/core/css/parser/BisonCSSParser-in.cpp
@@ -1921,6 +1921,9 @@ CSSParserSelector* BisonCSSParser::rewriteSpecifiersWithElementName(const Atomic
if (specifiers->needsCrossingTreeScopeBoundary())
return rewriteSpecifiersWithElementNameForCustomPseudoElement(tag, elementName, specifiers, tagIsForNamespaceRule);
+ if (specifiers->isContentPseudoElement())
+ return rewriteSpecifiersWithElementNameForContentPseudoElement(tag, elementName, specifiers, tagIsForNamespaceRule);
+
// *:host never matches, so we can't discard the * otherwise we can't tell the
// difference between *:host and just :host.
if (tag == anyQName() && !specifiers->hasHostPseudoSelector())
@@ -1963,7 +1966,7 @@ CSSParserSelector* BisonCSSParser::rewriteSpecifiersWithElementNameForContentPse
CSSParserSelector* history = specifiers;
while (history->tagHistory()) {
history = history->tagHistory();
- if (history->relationIsAffectedByPseudoContent())
+ if (history->isContentPseudoElement() || history->relationIsAffectedByPseudoContent())
last = history;
}
@@ -2016,11 +2019,19 @@ CSSParserSelector* BisonCSSParser::rewriteSpecifiers(CSSParserSelector* specifie
newSpecifier->appendTagHistory(CSSSelector::ShadowPseudo, sinkFloatingSelector(specifiers));
return newSpecifier;
}
+ if (newSpecifier->isContentPseudoElement()) {
+ newSpecifier->appendTagHistory(CSSSelector::SubSelector, sinkFloatingSelector(specifiers));
+ return newSpecifier;
+ }
if (specifiers->needsCrossingTreeScopeBoundary()) {
// Specifiers for unknown pseudo element go right behind it in the chain.
specifiers->insertTagHistory(CSSSelector::SubSelector, sinkFloatingSelector(newSpecifier), CSSSelector::ShadowPseudo);
return specifiers;
}
+ if (specifiers->isContentPseudoElement()) {
+ specifiers->insertTagHistory(CSSSelector::SubSelector, sinkFloatingSelector(newSpecifier), CSSSelector::SubSelector);
+ return specifiers;
+ }
specifiers->appendTagHistory(CSSSelector::SubSelector, sinkFloatingSelector(newSpecifier));
return specifiers;
}
« no previous file with comments | « Source/core/css/SelectorFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698