| Index: third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp b/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
|
| index ca3dcf73b1f7ed8903e5f726a8ba8993f8bff51b..f18a522ae50da7b5f480116a13cca3d1f70edeba 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
|
| @@ -269,7 +269,7 @@ Node::InsertionNotificationRequest HTMLFormControlElement::insertedInto(Containe
|
| fieldSetAncestorsSetNeedsValidityCheck(insertionPoint);
|
|
|
| // Trigger for elements outside of forms.
|
| - if (!formOwner() && insertionPoint->inShadowIncludingDocument())
|
| + if (!formOwner() && insertionPoint->isConnected())
|
| document().didAssociateFormControl(this);
|
|
|
| return InsertionDone;
|
| @@ -300,7 +300,7 @@ void HTMLFormControlElement::didChangeForm()
|
| {
|
| FormAssociatedElement::didChangeForm();
|
| formOwnerSetNeedsValidityCheck();
|
| - if (formOwner() && inShadowIncludingDocument() && canBeSuccessfulSubmitButton())
|
| + if (formOwner() && isConnected() && canBeSuccessfulSubmitButton())
|
| formOwner()->invalidateDefaultButtonStyle();
|
| }
|
|
|
| @@ -538,7 +538,7 @@ bool HTMLFormControlElement::checkValidity(HeapVector<Member<HTMLFormControlElem
|
| return false;
|
| Document* originalDocument = &document();
|
| DispatchEventResult dispatchResult = dispatchEvent(Event::createCancelable(EventTypeNames::invalid));
|
| - if (dispatchResult == DispatchEventResult::NotCanceled && unhandledInvalidControls && inShadowIncludingDocument() && originalDocument == document())
|
| + if (dispatchResult == DispatchEventResult::NotCanceled && unhandledInvalidControls && isConnected() && originalDocument == document())
|
| unhandledInvalidControls->append(this);
|
| return false;
|
| }
|
|
|