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

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

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 5 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 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;
}

Powered by Google App Engine
This is Rietveld 408576698