| 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 5c439f77bf6d8b2f2de593cf53518ef678d78dad..11a4530b1d273163fde91b8de078a26471ee823e 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
|
| @@ -278,7 +278,7 @@ Node::InsertionNotificationRequest HTMLFormControlElement::insertedInto(Containe
|
| fieldSetAncestorsSetNeedsValidityCheck(insertionPoint);
|
|
|
| // Trigger for elements outside of forms.
|
| - if (!formOwner() && insertionPoint->inDocument())
|
| + if (!formOwner() && insertionPoint->inShadowIncludingDocument())
|
| document().didAssociateFormControl(this);
|
|
|
| return InsertionDone;
|
| @@ -309,7 +309,7 @@ void HTMLFormControlElement::didChangeForm()
|
| {
|
| FormAssociatedElement::didChangeForm();
|
| formOwnerSetNeedsValidityCheck();
|
| - if (formOwner() && inDocument() && canBeSuccessfulSubmitButton())
|
| + if (formOwner() && inShadowIncludingDocument() && canBeSuccessfulSubmitButton())
|
| formOwner()->invalidateDefaultButtonStyle();
|
| }
|
|
|
| @@ -544,7 +544,7 @@ bool HTMLFormControlElement::checkValidity(HeapVector<Member<HTMLFormControlElem
|
| RawPtr<HTMLFormControlElement> protector(this);
|
| RawPtr<Document> originalDocument(document());
|
| DispatchEventResult dispatchResult = dispatchEvent(Event::createCancelable(EventTypeNames::invalid));
|
| - if (dispatchResult == DispatchEventResult::NotCanceled && unhandledInvalidControls && inDocument() && originalDocument == document())
|
| + if (dispatchResult == DispatchEventResult::NotCanceled && unhandledInvalidControls && inShadowIncludingDocument() && originalDocument == document())
|
| unhandledInvalidControls->append(this);
|
| return false;
|
| }
|
|
|