| 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 24ed78e2099948201ac1469c0606bab7aeeadeb1..2856e1e711496e496ac47e9655d755f5cf53cf85 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| @@ -508,7 +508,7 @@ void HTMLInputElement::updateType()
|
| addToRadioButtonGroup();
|
|
|
| setNeedsValidityCheck();
|
| - if ((couldBeSuccessfulSubmitButton || canBeSuccessfulSubmitButton()) && formOwner() && inShadowIncludingDocument())
|
| + if ((couldBeSuccessfulSubmitButton || canBeSuccessfulSubmitButton()) && formOwner() && isConnected())
|
| formOwner()->invalidateDefaultButtonStyle();
|
| notifyFormStateChanged();
|
| }
|
| @@ -873,7 +873,7 @@ bool HTMLInputElement::isTextField() const
|
|
|
| void HTMLInputElement::dispatchChangeEventIfNeeded()
|
| {
|
| - if (inShadowIncludingDocument() && m_inputType->shouldSendChangeEventAfterCheckedChanged())
|
| + if (isConnected() && m_inputType->shouldSendChangeEventAfterCheckedChanged())
|
| dispatchChangeEvent();
|
| }
|
|
|
| @@ -911,7 +911,7 @@ void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventB
|
| // unchecked to match other browsers. DOM is not a useful standard for this
|
| // because it says only to fire change events at "lose focus" time, which is
|
| // definitely wrong in practice for these types of elements.
|
| - if (eventBehavior != DispatchNoEvent && inShadowIncludingDocument() && m_inputType->shouldSendChangeEventAfterCheckedChanged()) {
|
| + if (eventBehavior != DispatchNoEvent && isConnected() && m_inputType->shouldSendChangeEventAfterCheckedChanged()) {
|
| setTextAsOfLastFormControlChangeEvent(String());
|
| if (eventBehavior == DispatchInputAndChangeEvent)
|
| dispatchFormControlInputEvent();
|
| @@ -1480,7 +1480,7 @@ void HTMLInputElement::didChangeForm()
|
| Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode* insertionPoint)
|
| {
|
| HTMLTextFormControlElement::insertedInto(insertionPoint);
|
| - if (insertionPoint->inShadowIncludingDocument() && !form())
|
| + if (insertionPoint->isConnected() && !form())
|
| addToRadioButtonGroup();
|
| resetListAttributeTargetObserver();
|
| logAddElementIfIsolatedWorldAndInDocument("input", typeAttr, formactionAttr);
|
| @@ -1490,10 +1490,10 @@ Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode*
|
| void HTMLInputElement::removedFrom(ContainerNode* insertionPoint)
|
| {
|
| m_inputTypeView->closePopupView();
|
| - if (insertionPoint->inShadowIncludingDocument() && !form())
|
| + if (insertionPoint->isConnected() && !form())
|
| removeFromRadioButtonGroup();
|
| HTMLTextFormControlElement::removedFrom(insertionPoint);
|
| - ASSERT(!inShadowIncludingDocument());
|
| + ASSERT(!isConnected());
|
| resetListAttributeTargetObserver();
|
| }
|
|
|
| @@ -1592,7 +1592,7 @@ void HTMLInputElement::setListAttributeTargetObserver(ListAttributeTargetObserve
|
|
|
| void HTMLInputElement::resetListAttributeTargetObserver()
|
| {
|
| - if (inShadowIncludingDocument())
|
| + if (isConnected())
|
| setListAttributeTargetObserver(ListAttributeTargetObserver::create(fastGetAttribute(listAttr), this));
|
| else
|
| setListAttributeTargetObserver(nullptr);
|
| @@ -1724,7 +1724,7 @@ RadioButtonGroupScope* HTMLInputElement::radioButtonGroupScope() const
|
| return nullptr;
|
| if (HTMLFormElement* formElement = form())
|
| return &formElement->radioButtonGroupScope();
|
| - if (inShadowIncludingDocument())
|
| + if (isConnected())
|
| return &treeScope().radioButtonGroupScope();
|
| return nullptr;
|
| }
|
|
|