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

Unified Diff: Source/core/css/SelectorChecker.cpp

Issue 935283002: Rename {Author,UserAgent}ShadowRoot to {Open,Closed}ShadowRoot. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix inspector tests Created 5 years, 10 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 | « LayoutTests/inspector/sources/debugger/dom-breakpoints-expected.txt ('k') | Source/core/dom/Element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/SelectorChecker.cpp
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
index caa4eaccf6f50f87e4270a0b7bcf17f6fe99635b..6e0555541b1265dc5735e99b3c30d343450f10eb 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -70,7 +70,7 @@ SelectorChecker::SelectorChecker(Document& document, Mode mode)
static bool matchesCustomPseudoElement(const Element* element, const CSSSelector& selector)
{
ShadowRoot* root = element->containingShadowRoot();
- if (!root || root->type() != ShadowRoot::UserAgentShadowRoot)
+ if (!root || root->type() != ShadowRoot::ClosedShadowRoot)
return false;
if (element->shadowPseudoId() != selector.value())
@@ -194,9 +194,9 @@ static inline SelectorChecker::SelectorCheckingContext prepareNextContextForRela
return nextContext;
}
-static inline bool isAuthorShadowRoot(const Node* node)
+static inline bool isOpenShadowRoot(const Node* node)
{
- return node && node->isShadowRoot() && toShadowRoot(node)->type() == ShadowRoot::AuthorShadowRoot;
+ return node && node->isShadowRoot() && toShadowRoot(node)->type() == ShadowRoot::OpenShadowRoot;
}
template<typename SiblingTraversalStrategy>
@@ -224,13 +224,13 @@ static bool selectorMatchesShadowRoot(const CSSSelector* selector)
return selector && selector->isShadowPseudoElement();
}
-static inline Element* parentOrShadowHostButDisallowEscapingUserAgentShadowTree(const Element& element)
+static inline Element* parentOrShadowHostButDisallowEscapingClosedShadowTree(const Element& element)
{
ContainerNode* parent = element.parentOrShadowHostNode();
if (!parent)
return nullptr;
if (parent->isShadowRoot())
- return (toShadowRoot(parent)->type() == ShadowRoot::UserAgentShadowRoot) ? nullptr : toShadowRoot(parent)->host();
+ return (toShadowRoot(parent)->type() == ShadowRoot::ClosedShadowRoot) ? nullptr : toShadowRoot(parent)->host();
if (!parent->isElementNode())
return nullptr;
return toElement(parent);
@@ -239,7 +239,7 @@ static inline Element* parentOrShadowHostButDisallowEscapingUserAgentShadowTree(
template<typename SiblingTraversalStrategy>
SelectorChecker::Match SelectorChecker::matchForPseudoShadow(const ContainerNode* node, const SelectorCheckingContext& context, const SiblingTraversalStrategy& siblingTraversalStrategy, MatchResult* result) const
{
- if (!isAuthorShadowRoot(node))
+ if (!isOpenShadowRoot(node))
return SelectorFailsCompletely;
return match(context, siblingTraversalStrategy, result);
}
@@ -351,7 +351,7 @@ SelectorChecker::Match SelectorChecker::matchForRelation(const SelectorCheckingC
{
nextContext.isSubSelector = false;
nextContext.elementStyle = 0;
- for (nextContext.element = parentOrShadowHostButDisallowEscapingUserAgentShadowTree(*context.element); nextContext.element; nextContext.element = parentOrShadowHostButDisallowEscapingUserAgentShadowTree(*nextContext.element)) {
+ for (nextContext.element = parentOrShadowHostButDisallowEscapingClosedShadowTree(*context.element); nextContext.element; nextContext.element = parentOrShadowHostButDisallowEscapingClosedShadowTree(*nextContext.element)) {
Match match = this->match(nextContext, siblingTraversalStrategy, result);
if (match == SelectorMatches || match == SelectorFailsCompletely)
return match;
« no previous file with comments | « LayoutTests/inspector/sources/debugger/dom-breakpoints-expected.txt ('k') | Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698