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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFormElement.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/HTMLFormElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
index 07d4e00a492a4eb51ae53c3fae40996e08313b82..74f3f106150e0d12189e8154076f81e77a99dc13 100644
--- a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
@@ -138,7 +138,7 @@ Node::InsertionNotificationRequest HTMLFormElement::insertedInto(ContainerNode*
{
HTMLElement::insertedInto(insertionPoint);
logAddElementIfIsolatedWorldAndInDocument("form", methodAttr, actionAttr);
- if (insertionPoint->inShadowIncludingDocument())
+ if (insertionPoint->isConnected())
this->document().didAssociateFormControl(this);
return InsertionDone;
}
@@ -343,7 +343,7 @@ void HTMLFormElement::submit(Event* event, bool activateSubmitButton)
if (!view || !frame || !frame->page())
return;
// See crbug.com/586749.
- if (!inShadowIncludingDocument())
+ if (!isConnected())
UseCounter::count(document(), UseCounter::FormSubmissionNotInDocumentTree);
if (m_isSubmittingOrInUserJSSubmitEvent) {
@@ -558,7 +558,7 @@ const FormAssociatedElement::List& HTMLFormElement::associatedElements() const
Node* scope = mutableThis;
if (m_hasElementsAssociatedByParser)
scope = &NodeTraversal::highestAncestorOrSelf(*mutableThis);
- if (inShadowIncludingDocument() && m_hasElementsAssociatedByFormAttribute)
+ if (isConnected() && m_hasElementsAssociatedByFormAttribute)
scope = &treeScope().rootNode();
ASSERT(scope);
collectAssociatedElements(*scope, mutableThis->m_associatedElements);

Powered by Google App Engine
This is Rietveld 408576698