| 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)
|
| {
|
| }
|
|
|