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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFormControlElementWithState.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/HTMLFormControlElementWithState.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFormControlElementWithState.cpp b/third_party/WebKit/Source/core/html/HTMLFormControlElementWithState.cpp
index f0c607955128c36e0bc736b15402e5e54fc2b7e5..8803bf8c82802115385c379d77e19759c991b0a0 100644
--- a/third_party/WebKit/Source/core/html/HTMLFormControlElementWithState.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFormControlElementWithState.cpp
@@ -44,14 +44,14 @@ HTMLFormControlElementWithState::~HTMLFormControlElementWithState()
Node::InsertionNotificationRequest HTMLFormControlElementWithState::insertedInto(ContainerNode* insertionPoint)
{
- if (insertionPoint->inShadowIncludingDocument() && !containingShadowRoot())
+ if (insertionPoint->isConnected() && !containingShadowRoot())
document().formController().registerStatefulFormControl(*this);
return HTMLFormControlElement::insertedInto(insertionPoint);
}
void HTMLFormControlElementWithState::removedFrom(ContainerNode* insertionPoint)
{
- if (insertionPoint->inShadowIncludingDocument() && !containingShadowRoot() && !insertionPoint->containingShadowRoot())
+ if (insertionPoint->isConnected() && !containingShadowRoot() && !insertionPoint->containingShadowRoot())
document().formController().unregisterStatefulFormControl(*this);
HTMLFormControlElement::removedFrom(insertionPoint);
}
@@ -75,7 +75,7 @@ void HTMLFormControlElementWithState::notifyFormStateChanged()
bool HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState() const
{
// We don't save/restore control state in a form with autocomplete=off.
- return inShadowIncludingDocument() && shouldAutocomplete();
+ return isConnected() && shouldAutocomplete();
}
FormControlState HTMLFormControlElementWithState::saveFormControlState() const

Powered by Google App Engine
This is Rietveld 408576698