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

Unified Diff: third_party/WebKit/Source/core/html/HTMLInputElement.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/HTMLInputElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
index 24ed78e2099948201ac1469c0606bab7aeeadeb1..2856e1e711496e496ac47e9655d755f5cf53cf85 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -508,7 +508,7 @@ void HTMLInputElement::updateType()
addToRadioButtonGroup();
setNeedsValidityCheck();
- if ((couldBeSuccessfulSubmitButton || canBeSuccessfulSubmitButton()) && formOwner() && inShadowIncludingDocument())
+ if ((couldBeSuccessfulSubmitButton || canBeSuccessfulSubmitButton()) && formOwner() && isConnected())
formOwner()->invalidateDefaultButtonStyle();
notifyFormStateChanged();
}
@@ -873,7 +873,7 @@ bool HTMLInputElement::isTextField() const
void HTMLInputElement::dispatchChangeEventIfNeeded()
{
- if (inShadowIncludingDocument() && m_inputType->shouldSendChangeEventAfterCheckedChanged())
+ if (isConnected() && m_inputType->shouldSendChangeEventAfterCheckedChanged())
dispatchChangeEvent();
}
@@ -911,7 +911,7 @@ void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventB
// unchecked to match other browsers. DOM is not a useful standard for this
// because it says only to fire change events at "lose focus" time, which is
// definitely wrong in practice for these types of elements.
- if (eventBehavior != DispatchNoEvent && inShadowIncludingDocument() && m_inputType->shouldSendChangeEventAfterCheckedChanged()) {
+ if (eventBehavior != DispatchNoEvent && isConnected() && m_inputType->shouldSendChangeEventAfterCheckedChanged()) {
setTextAsOfLastFormControlChangeEvent(String());
if (eventBehavior == DispatchInputAndChangeEvent)
dispatchFormControlInputEvent();
@@ -1480,7 +1480,7 @@ void HTMLInputElement::didChangeForm()
Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode* insertionPoint)
{
HTMLTextFormControlElement::insertedInto(insertionPoint);
- if (insertionPoint->inShadowIncludingDocument() && !form())
+ if (insertionPoint->isConnected() && !form())
addToRadioButtonGroup();
resetListAttributeTargetObserver();
logAddElementIfIsolatedWorldAndInDocument("input", typeAttr, formactionAttr);
@@ -1490,10 +1490,10 @@ Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode*
void HTMLInputElement::removedFrom(ContainerNode* insertionPoint)
{
m_inputTypeView->closePopupView();
- if (insertionPoint->inShadowIncludingDocument() && !form())
+ if (insertionPoint->isConnected() && !form())
removeFromRadioButtonGroup();
HTMLTextFormControlElement::removedFrom(insertionPoint);
- ASSERT(!inShadowIncludingDocument());
+ ASSERT(!isConnected());
resetListAttributeTargetObserver();
}
@@ -1592,7 +1592,7 @@ void HTMLInputElement::setListAttributeTargetObserver(ListAttributeTargetObserve
void HTMLInputElement::resetListAttributeTargetObserver()
{
- if (inShadowIncludingDocument())
+ if (isConnected())
setListAttributeTargetObserver(ListAttributeTargetObserver::create(fastGetAttribute(listAttr), this));
else
setListAttributeTargetObserver(nullptr);
@@ -1724,7 +1724,7 @@ RadioButtonGroupScope* HTMLInputElement::radioButtonGroupScope() const
return nullptr;
if (HTMLFormElement* formElement = form())
return &formElement->radioButtonGroupScope();
- if (inShadowIncludingDocument())
+ if (isConnected())
return &treeScope().radioButtonGroupScope();
return nullptr;
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLImageElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLLabelElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698