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

Unified Diff: third_party/WebKit/Source/core/css/CSSSelector.cpp

Issue 1565263003: Implement CSS parser part for ::slotted pseudo element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix layout test. Created 4 years, 11 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: third_party/WebKit/Source/core/css/CSSSelector.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSSelector.cpp b/third_party/WebKit/Source/core/css/CSSSelector.cpp
index 24614344a7a7ddb492bd9433d31d07105abf8449..f660e57faa3644ad688fd21665facfa3100c9665 100644
--- a/third_party/WebKit/Source/core/css/CSSSelector.cpp
+++ b/third_party/WebKit/Source/core/css/CSSSelector.cpp
@@ -264,6 +264,7 @@ PseudoId CSSSelector::pseudoId(PseudoType type)
case PseudoFullScreenAncestor:
case PseudoSpatialNavigationFocus:
case PseudoListBox:
+ case PseudoSlotted:
return NOPSEUDO;
}
@@ -367,6 +368,7 @@ const static NameToPseudoStruct pseudoTypeWithArgumentsMap[] = {
{"nth-last-child", CSSSelector::PseudoNthLastChild},
{"nth-last-of-type", CSSSelector::PseudoNthLastOfType},
{"nth-of-type", CSSSelector::PseudoNthOfType},
+{"slotted", CSSSelector::PseudoSlotted},
};
class NameToPseudoCompare {
@@ -481,6 +483,7 @@ void CSSSelector::updatePseudoType(const AtomicString& value, bool hasArguments)
case PseudoWebKitCustomElement:
case PseudoContent:
case PseudoShadow:
+ case PseudoSlotted:
if (m_match != PseudoElement)
m_pseudoType = PseudoUnknown;
break;
@@ -725,6 +728,7 @@ String CSSSelector::selectorText(const String& rightSide) const
case SubSelector:
ASSERT_NOT_REACHED();
case ShadowPseudo:
+ case ShadowSlot:
return tagHistory->selectorText(str.toString() + rightSide);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSelector.h ('k') | third_party/WebKit/Source/core/css/CSSSelectorList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698