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

Unified Diff: third_party/WebKit/Source/core/html/FormAssociatedElement.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/FormAssociatedElement.cpp
diff --git a/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp b/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp
index 6a1245995269704d45767eae1df30f866584330a..e25869998c2011b520d63510a62b98cea8688e54 100644
--- a/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp
+++ b/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp
@@ -85,7 +85,7 @@ void FormAssociatedElement::insertedInto(ContainerNode* insertionPoint)
if (!m_formWasSetByParser || !m_form || NodeTraversal::highestAncestorOrSelf(*insertionPoint) != NodeTraversal::highestAncestorOrSelf(*m_form.get()))
resetFormOwner();
- if (!insertionPoint->inShadowIncludingDocument())
+ if (!insertionPoint->isConnected())
return;
HTMLElement* element = toHTMLElement(this);
@@ -96,7 +96,7 @@ void FormAssociatedElement::insertedInto(ContainerNode* insertionPoint)
void FormAssociatedElement::removedFrom(ContainerNode* insertionPoint)
{
HTMLElement* element = toHTMLElement(this);
- if (insertionPoint->inShadowIncludingDocument() && element->fastHasAttribute(formAttr)) {
+ if (insertionPoint->isConnected() && element->fastHasAttribute(formAttr)) {
setFormAttributeTargetObserver(nullptr);
resetFormOwner();
return;
@@ -112,7 +112,7 @@ HTMLFormElement* FormAssociatedElement::findAssociatedForm(const HTMLElement* el
const AtomicString& formId(element->fastGetAttribute(formAttr));
// 3. If the element is reassociateable, has a form content attribute, and
// is itself in a Document, then run these substeps:
- if (!formId.isNull() && element->inShadowIncludingDocument()) {
+ if (!formId.isNull() && element->isConnected()) {
// 3.1. If the first element in the Document to have an ID that is
// case-sensitively equal to the element's form content attribute's
// value is a form element, then associate the form-associated element
@@ -137,7 +137,7 @@ void FormAssociatedElement::formRemovedFromTree(const Node& formRoot)
void FormAssociatedElement::associateByParser(HTMLFormElement* form)
{
- if (form && form->inShadowIncludingDocument()) {
+ if (form && form->isConnected()) {
m_formWasSetByParser = true;
setForm(form);
form->didAssociateByParser();
@@ -166,7 +166,7 @@ void FormAssociatedElement::willChangeForm()
void FormAssociatedElement::didChangeForm()
{
- if (!m_formWasSetByParser && m_form && m_form->inShadowIncludingDocument()) {
+ if (!m_formWasSetByParser && m_form && m_form->isConnected()) {
HTMLElement* element = toHTMLElement(this);
element->document().didAssociateFormControl(element);
}
@@ -284,7 +284,7 @@ void FormAssociatedElement::resetFormAttributeTargetObserver()
{
HTMLElement* element = toHTMLElement(this);
const AtomicString& formId(element->fastGetAttribute(formAttr));
- if (!formId.isNull() && element->inShadowIncludingDocument())
+ if (!formId.isNull() && element->isConnected())
setFormAttributeTargetObserver(FormAttributeTargetObserver::create(formId, this));
else
setFormAttributeTargetObserver(nullptr);

Powered by Google App Engine
This is Rietveld 408576698