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

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

Issue 1885453002: Rename Node::treeScope() to Node::treeScopeOrDocument() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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/HTMLInputElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
index 79f7d5a7301e3f112041696a94cf1db1ff47aa42..132fe65ff9abbadd6b79a5c4a8a25d7b3f11fd7c 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -175,7 +175,7 @@ HTMLInputElement::~HTMLInputElement()
// setForm(0) may register this to a TreeScope-level radio button group.
// We should unregister it to avoid accessing a deleted object.
if (type() == InputTypeNames::radio)
- treeScope().radioButtonGroupScope().removeButton(this);
+ treeScopeOrDocument().radioButtonGroupScope().removeButton(this);
// TODO(dtapuska): Make this passive touch listener see crbug.com/584438
if (m_hasTouchEventHandler && document().frameHost())
@@ -1546,7 +1546,7 @@ void HTMLInputElement::didMoveToNewDocument(Document& oldDocument)
// FIXME: Remove type check.
if (type() == InputTypeNames::radio)
- treeScope().radioButtonGroupScope().removeButton(this);
+ treeScopeOrDocument().radioButtonGroupScope().removeButton(this);
updateTouchEventHandlerRegistry();
@@ -1597,7 +1597,7 @@ HTMLDataListElement* HTMLInputElement::dataList() const
if (!m_inputType->shouldRespectListAttribute())
return nullptr;
- Element* element = treeScope().getElementById(fastGetAttribute(listAttr));
+ Element* element = treeScopeOrDocument().getElementById(fastGetAttribute(listAttr));
if (!element)
return nullptr;
if (!isHTMLDataListElement(*element))
@@ -1761,7 +1761,7 @@ RadioButtonGroupScope* HTMLInputElement::radioButtonGroupScope() const
if (HTMLFormElement* formElement = form())
return &formElement->radioButtonGroupScope();
if (inShadowIncludingDocument())
- return &treeScope().radioButtonGroupScope();
+ return &treeScopeOrDocument().radioButtonGroupScope();
return nullptr;
}
@@ -1811,7 +1811,7 @@ ListAttributeTargetObserver* ListAttributeTargetObserver::create(const AtomicStr
}
ListAttributeTargetObserver::ListAttributeTargetObserver(const AtomicString& id, HTMLInputElement* element)
- : IdTargetObserver(element->treeScope().idTargetObserverRegistry(), id)
+ : IdTargetObserver(element->treeScopeOrDocument().idTargetObserverRegistry(), id)
, m_element(element)
{
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLLabelElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698