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

Unified Diff: third_party/WebKit/Source/core/html/HTMLTextFormControlElement.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/HTMLTextFormControlElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
index 469e5361e865473aaaa37931d169507877e70c15..1f16dd16406fa21182ab696e1bb870313eed80ed 100644
--- a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
@@ -73,7 +73,7 @@ HTMLTextFormControlElement::~HTMLTextFormControlElement()
Node::InsertionNotificationRequest HTMLTextFormControlElement::insertedInto(ContainerNode* insertionPoint)
{
HTMLFormControlElementWithState::insertedInto(insertionPoint);
- if (!insertionPoint->inDocument())
+ if (!insertionPoint->inShadowIncludingDocument())
return InsertionDone;
String initialValue = value();
setTextAsOfLastFormControlChangeEvent(initialValue.isNull() ? emptyString() : initialValue);
@@ -353,7 +353,7 @@ void HTMLTextFormControlElement::setSelectionRange(int start, int end, TextField
start = std::min(std::max(start, 0), end);
cacheSelection(start, end, direction);
- if (selectionOption == NotChangeSelection || (selectionOption == ChangeSelectionIfFocused && document().focusedElement() != this) || !inDocument()) {
+ if (selectionOption == NotChangeSelection || (selectionOption == ChangeSelectionIfFocused && document().focusedElement() != this) || !inShadowIncludingDocument()) {
if (eventBehaviour == DispatchSelectEvent)
scheduleSelectEvent();
return;
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLStyleElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLTitleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698