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

Unified Diff: third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp

Issue 2327743002: Rename Node::shadowHost() to Node::ownerShadowHost() (Closed)
Patch Set: fix Created 4 years, 3 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/html/HTMLTextFormControlElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
index 1d64b3d7c29eb0313511f84df2910aab05aceebc..9a96b4a188a4ead9bf3468237d20040b6bae3411 100644
--- a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
@@ -375,8 +375,8 @@ bool HTMLTextFormControlElement::setSelectionRange(int start, int end, TextField
// startPosition and endPosition can be null position for example when
// "-webkit-user-select: none" style attribute is specified.
if (startPosition.isNotNull() && endPosition.isNotNull()) {
- DCHECK_EQ(startPosition.anchorNode()->shadowHost(), this);
- DCHECK_EQ(endPosition.anchorNode()->shadowHost(), this);
+ DCHECK_EQ(startPosition.anchorNode()->ownerShadowHost(), this);
+ DCHECK_EQ(endPosition.anchorNode()->ownerShadowHost(), this);
}
#endif // DCHECK_IS_ON()
VisibleSelection newSelection;
@@ -751,7 +751,7 @@ String HTMLTextFormControlElement::valueWithHardLineBreaks() const
HTMLTextFormControlElement* enclosingTextFormControl(const Position& position)
{
DCHECK(position.isNull() || position.isOffsetInAnchor()
- || position.computeContainerNode() || !position.anchorNode()->shadowHost()
+ || position.computeContainerNode() || !position.anchorNode()->ownerShadowHost()
|| (position.anchorNode()->parentNode() && position.anchorNode()->parentNode()->isShadowRoot()));
return enclosingTextFormControl(position.computeContainerNode());
}
@@ -760,7 +760,7 @@ HTMLTextFormControlElement* enclosingTextFormControl(Node* container)
{
if (!container)
return nullptr;
- Element* ancestor = container->shadowHost();
+ Element* ancestor = container->ownerShadowHost();
return ancestor && isHTMLTextFormControlElement(*ancestor) && container->containingShadowRoot()->type() == ShadowRootType::UserAgent ? toHTMLTextFormControlElement(ancestor) : 0;
}

Powered by Google App Engine
This is Rietveld 408576698