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

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

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 01285de238b0b4aa310d33dd3142e8d3426f8757..f756cd497958287b3e5296d753c4eaa68457c453 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -534,7 +534,7 @@ void HTMLInputElement::updateType()
addToRadioButtonGroup();
setNeedsValidityCheck();
- if ((couldBeSuccessfulSubmitButton || canBeSuccessfulSubmitButton()) && formOwner() && inDocument())
+ if ((couldBeSuccessfulSubmitButton || canBeSuccessfulSubmitButton()) && formOwner() && inShadowIncludingDocument())
formOwner()->invalidateDefaultButtonStyle();
notifyFormStateChanged();
}
@@ -910,7 +910,7 @@ bool HTMLInputElement::isTextField() const
void HTMLInputElement::dispatchChangeEventIfNeeded()
{
- if (inDocument() && m_inputType->shouldSendChangeEventAfterCheckedChanged())
+ if (inShadowIncludingDocument() && m_inputType->shouldSendChangeEventAfterCheckedChanged())
dispatchChangeEvent();
}
@@ -949,7 +949,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 && inDocument() && m_inputType->shouldSendChangeEventAfterCheckedChanged()) {
+ if (eventBehavior != DispatchNoEvent && inShadowIncludingDocument() && m_inputType->shouldSendChangeEventAfterCheckedChanged()) {
setTextAsOfLastFormControlChangeEvent(String());
if (eventBehavior == DispatchInputAndChangeEvent)
dispatchFormControlInputEvent();
@@ -1526,7 +1526,7 @@ void HTMLInputElement::didChangeForm()
Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode* insertionPoint)
{
HTMLTextFormControlElement::insertedInto(insertionPoint);
- if (insertionPoint->inDocument() && !form())
+ if (insertionPoint->inShadowIncludingDocument() && !form())
addToRadioButtonGroup();
resetListAttributeTargetObserver();
logAddElementIfIsolatedWorldAndInDocument("input", typeAttr, formactionAttr);
@@ -1536,10 +1536,10 @@ Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode*
void HTMLInputElement::removedFrom(ContainerNode* insertionPoint)
{
m_inputTypeView->closePopupView();
- if (insertionPoint->inDocument() && !form())
+ if (insertionPoint->inShadowIncludingDocument() && !form())
removeFromRadioButtonGroup();
HTMLTextFormControlElement::removedFrom(insertionPoint);
- ASSERT(!inDocument());
+ ASSERT(!inShadowIncludingDocument());
resetListAttributeTargetObserver();
}
@@ -1632,7 +1632,7 @@ void HTMLInputElement::setListAttributeTargetObserver(RawPtr<ListAttributeTarget
void HTMLInputElement::resetListAttributeTargetObserver()
{
- if (inDocument())
+ if (inShadowIncludingDocument())
setListAttributeTargetObserver(ListAttributeTargetObserver::create(fastGetAttribute(listAttr), this));
else
setListAttributeTargetObserver(nullptr);
@@ -1764,7 +1764,7 @@ RadioButtonGroupScope* HTMLInputElement::radioButtonGroupScope() const
return nullptr;
if (HTMLFormElement* formElement = form())
return &formElement->radioButtonGroupScope();
- if (inDocument())
+ if (inShadowIncludingDocument())
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