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

Unified Diff: Source/core/css/CSSSelector.h

Issue 210713002: Implement ::shadow pseudo element and replace /shadow/ with ::shadow. (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/CSSParserValues.h ('k') | Source/core/css/CSSSelector.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSSelector.h
diff --git a/Source/core/css/CSSSelector.h b/Source/core/css/CSSSelector.h
index 399b2ad3f90c0faed81ebdd1ad51aeb20a6ef624..00e155131e168b95429cb69e3e6a9498f1e83c57 100644
--- a/Source/core/css/CSSSelector.h
+++ b/Source/core/css/CSSSelector.h
@@ -128,11 +128,8 @@ namespace WebCore {
DirectAdjacent, // + combinator
IndirectAdjacent, // ~ combinator
SubSelector, // "No space" combinator
- ShadowPseudo, // Special case of shadow DOM pseudo elements
- // FIXME: implement named combinator (i.e. named relation) and
- // replace the following /shadow/ and /shadow-deep/ with the implementation.
- Shadow, // /shadow/ combinator
- ShadowDeep, // /shadow-deep/ combinator
+ ShadowPseudo, // Special case of shadow DOM pseudo elements / shadow pseudo element
+ ShadowDeep // /shadow-deep/ combinator
};
enum PseudoType {
@@ -217,7 +214,8 @@ namespace WebCore {
PseudoUnresolved,
PseudoContent,
PseudoHost,
- PseudoHostContext
+ PseudoHostContext,
+ PseudoShadow
};
enum MarginBoxType {
@@ -287,6 +285,7 @@ namespace WebCore {
bool isSiblingSelector() const;
bool isAttributeSelector() const;
bool isContentPseudoElement() const;
+ bool isShadowPseudoElement() const;
bool isHostPseudoClass() const;
// FIXME: selectors with no tagHistory() get a relation() of Descendant. It should instead be
@@ -417,6 +416,11 @@ inline bool CSSSelector::isContentPseudoElement() const
return m_match == PseudoElement && pseudoType() == PseudoContent;
}
+inline bool CSSSelector::isShadowPseudoElement() const
+{
+ return m_match == PseudoElement && pseudoType() == PseudoShadow;
+}
+
inline void CSSSelector::setValue(const AtomicString& value)
{
ASSERT(m_match != Tag);
« no previous file with comments | « Source/core/css/CSSParserValues.h ('k') | Source/core/css/CSSSelector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698