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

Unified Diff: Source/core/inspector/InspectorDOMAgent.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 | « Source/core/html/shadow/SliderThumbElement.cpp ('k') | Source/core/inspector/PageConsoleAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDOMAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index 10f72c6b82e1c8c9237afe8f08ec7955e81835c0..bcc89005b9a6426ac855b846fb4ccb9675913eec 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -458,7 +458,7 @@ Element* InspectorDOMAgent::assertElement(ErrorString* errorString, int nodeId)
return toElement(node);
}
-static ShadowRoot* userAgentShadowRoot(Node* node)
+static ShadowRoot* closedShadowRoot(Node* node)
{
if (!node || !node->isInShadowTree())
return nullptr;
@@ -469,7 +469,7 @@ static ShadowRoot* userAgentShadowRoot(Node* node)
ASSERT(candidate);
ShadowRoot* shadowRoot = toShadowRoot(candidate);
- return shadowRoot->type() == ShadowRoot::UserAgentShadowRoot ? shadowRoot : nullptr;
+ return shadowRoot->type() == ShadowRoot::ClosedShadowRoot ? shadowRoot : nullptr;
}
Node* InspectorDOMAgent::assertEditableNode(ErrorString* errorString, int nodeId)
@@ -483,7 +483,7 @@ Node* InspectorDOMAgent::assertEditableNode(ErrorString* errorString, int nodeId
*errorString = "Cannot edit shadow roots";
return nullptr;
}
- if (userAgentShadowRoot(node)) {
+ if (closedShadowRoot(node)) {
*errorString = "Cannot edit nodes from user-agent shadow trees";
return nullptr;
}
@@ -515,7 +515,7 @@ Element* InspectorDOMAgent::assertEditableElement(ErrorString* errorString, int
if (!element)
return nullptr;
- if (element->isInShadowTree() && userAgentShadowRoot(element)) {
+ if (element->isInShadowTree() && closedShadowRoot(element)) {
*errorString = "Cannot edit elements from user-agent shadow trees";
return nullptr;
}
@@ -1057,7 +1057,7 @@ static Node* nextNodeWithShadowDOMInMind(const Node& current, const Node* stayWi
if (elementShadow) {
ShadowRoot* shadowRoot = elementShadow->youngestShadowRoot();
if (shadowRoot) {
- if (shadowRoot->type() == ShadowRoot::AuthorShadowRoot || includeUserAgentShadowDOM)
+ if (shadowRoot->type() == ShadowRoot::OpenShadowRoot || includeUserAgentShadowDOM)
return shadowRoot;
}
}
@@ -1295,11 +1295,11 @@ bool InspectorDOMAgent::handleMouseMove(LocalFrame* frame, const PlatformMouseEv
return true;
Node* node = hoveredNodeForEvent(frame, event, event.shiftKey());
- // Do not highlight within UA shadow root unless requested.
+ // Do not highlight within closed shadow root unless requested.
if (m_searchingForNode != SearchingForUAShadow) {
- ShadowRoot* uaShadowRoot = userAgentShadowRoot(node);
- if (uaShadowRoot)
- node = uaShadowRoot->host();
+ ShadowRoot* shadowRoot = closedShadowRoot(node);
+ if (shadowRoot)
+ node = shadowRoot->host();
}
// Shadow roots don't have boxes - use host element instead.
@@ -1635,9 +1635,9 @@ static String documentBaseURLString(Document* document)
static TypeBuilder::DOM::ShadowRootType::Enum shadowRootType(ShadowRoot* shadowRoot)
{
switch (shadowRoot->type()) {
- case ShadowRoot::UserAgentShadowRoot:
+ case ShadowRoot::ClosedShadowRoot:
return TypeBuilder::DOM::ShadowRootType::User_agent;
- case ShadowRoot::AuthorShadowRoot:
+ case ShadowRoot::OpenShadowRoot:
return TypeBuilder::DOM::ShadowRootType::Author;
}
ASSERT_NOT_REACHED();
@@ -2173,7 +2173,7 @@ static ShadowRoot* shadowRootForNode(Node* node, const String& type)
if (type == "a")
return toElement(node)->shadowRoot();
if (type == "u")
- return toElement(node)->userAgentShadowRoot();
+ return toElement(node)->closedShadowRoot();
return nullptr;
}
« no previous file with comments | « Source/core/html/shadow/SliderThumbElement.cpp ('k') | Source/core/inspector/PageConsoleAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698