| Index: third_party/WebKit/Source/core/html/FormAssociatedElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp b/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp
|
| index 6a1245995269704d45767eae1df30f866584330a..e25869998c2011b520d63510a62b98cea8688e54 100644
|
| --- a/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp
|
| @@ -85,7 +85,7 @@ void FormAssociatedElement::insertedInto(ContainerNode* insertionPoint)
|
| if (!m_formWasSetByParser || !m_form || NodeTraversal::highestAncestorOrSelf(*insertionPoint) != NodeTraversal::highestAncestorOrSelf(*m_form.get()))
|
| resetFormOwner();
|
|
|
| - if (!insertionPoint->inShadowIncludingDocument())
|
| + if (!insertionPoint->isConnected())
|
| return;
|
|
|
| HTMLElement* element = toHTMLElement(this);
|
| @@ -96,7 +96,7 @@ void FormAssociatedElement::insertedInto(ContainerNode* insertionPoint)
|
| void FormAssociatedElement::removedFrom(ContainerNode* insertionPoint)
|
| {
|
| HTMLElement* element = toHTMLElement(this);
|
| - if (insertionPoint->inShadowIncludingDocument() && element->fastHasAttribute(formAttr)) {
|
| + if (insertionPoint->isConnected() && element->fastHasAttribute(formAttr)) {
|
| setFormAttributeTargetObserver(nullptr);
|
| resetFormOwner();
|
| return;
|
| @@ -112,7 +112,7 @@ HTMLFormElement* FormAssociatedElement::findAssociatedForm(const HTMLElement* el
|
| const AtomicString& formId(element->fastGetAttribute(formAttr));
|
| // 3. If the element is reassociateable, has a form content attribute, and
|
| // is itself in a Document, then run these substeps:
|
| - if (!formId.isNull() && element->inShadowIncludingDocument()) {
|
| + if (!formId.isNull() && element->isConnected()) {
|
| // 3.1. If the first element in the Document to have an ID that is
|
| // case-sensitively equal to the element's form content attribute's
|
| // value is a form element, then associate the form-associated element
|
| @@ -137,7 +137,7 @@ void FormAssociatedElement::formRemovedFromTree(const Node& formRoot)
|
|
|
| void FormAssociatedElement::associateByParser(HTMLFormElement* form)
|
| {
|
| - if (form && form->inShadowIncludingDocument()) {
|
| + if (form && form->isConnected()) {
|
| m_formWasSetByParser = true;
|
| setForm(form);
|
| form->didAssociateByParser();
|
| @@ -166,7 +166,7 @@ void FormAssociatedElement::willChangeForm()
|
|
|
| void FormAssociatedElement::didChangeForm()
|
| {
|
| - if (!m_formWasSetByParser && m_form && m_form->inShadowIncludingDocument()) {
|
| + if (!m_formWasSetByParser && m_form && m_form->isConnected()) {
|
| HTMLElement* element = toHTMLElement(this);
|
| element->document().didAssociateFormControl(element);
|
| }
|
| @@ -284,7 +284,7 @@ void FormAssociatedElement::resetFormAttributeTargetObserver()
|
| {
|
| HTMLElement* element = toHTMLElement(this);
|
| const AtomicString& formId(element->fastGetAttribute(formAttr));
|
| - if (!formId.isNull() && element->inShadowIncludingDocument())
|
| + if (!formId.isNull() && element->isConnected())
|
| setFormAttributeTargetObserver(FormAttributeTargetObserver::create(formId, this));
|
| else
|
| setFormAttributeTargetObserver(nullptr);
|
|
|