Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698