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

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

Issue 639433002: Drop InvalidationSetMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/CSSSelector.h
diff --git a/Source/core/css/CSSSelector.h b/Source/core/css/CSSSelector.h
index 563e371b27be5d4127c9cc10a76fed257fce96f7..9118960cdb608a211cacdad7d94b7b58400fa570 100644
--- a/Source/core/css/CSSSelector.h
+++ b/Source/core/css/CSSSelector.h
@@ -290,12 +290,15 @@ namespace blink {
bool matchesPseudoElement() const;
bool isCustomPseudoElement() const;
bool isDirectAdjacentSelector() const { return m_relation == DirectAdjacent; }
+ bool isAdjacentSelector() const { return m_relation == DirectAdjacent || m_relation == IndirectAdjacent; }
bool isSiblingSelector() const;
bool isAttributeSelector() const;
bool isContentPseudoElement() const;
bool isShadowPseudoElement() const;
bool isHostPseudoClass() const;
-
+ bool isShadowSelector() const { return m_relation == ShadowPseudo || m_relation == ShadowDeep; }
+ bool isTreeBoundaryCrossing() const;
+ bool isInsertionPointCrossing() const;
// FIXME: selectors with no tagHistory() get a relation() of Descendant (and sometimes even SubSelector). It should instead be
// None.
Relation relation() const { return static_cast<Relation>(m_relation); }
@@ -445,6 +448,17 @@ inline bool CSSSelector::isShadowPseudoElement() const
return m_match == PseudoElement && pseudoType() == PseudoShadow;
}
+inline bool CSSSelector::isTreeBoundaryCrossing() const
+{
+ return m_match == PseudoClass && (pseudoType() == PseudoHost || pseudoType() == PseudoHostContext);
+}
+
+inline bool CSSSelector::isInsertionPointCrossing() const
+{
+ return (m_match == PseudoClass && pseudoType() == PseudoHostContext)
+ || (m_match == PseudoElement && pseudoType() == PseudoContent);
+}
+
inline void CSSSelector::setValue(const AtomicString& value)
{
ASSERT(m_match != Tag);

Powered by Google App Engine
This is Rietveld 408576698