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

Unified Diff: Source/core/html/HTMLTextFormControlElement.cpp

Issue 1019353007: Merge 190609 "Ignore setSelectionRange when node is un-parented." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2311/
Patch Set: Created 5 years, 9 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
« no previous file with comments | « LayoutTests/editing/input/orphan-set-selection-range-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTextFormControlElement.cpp
===================================================================
--- Source/core/html/HTMLTextFormControlElement.cpp (revision 192381)
+++ Source/core/html/HTMLTextFormControlElement.cpp (working copy)
@@ -348,7 +348,7 @@
void HTMLTextFormControlElement::setSelectionRange(int start, int end, TextFieldSelectionDirection direction, NeedToDispatchSelectEvent eventBehaviour, SelectionOption selectionOption)
{
- if (hasOpenShadowRoot() || !isTextFormControl())
+ if (hasOpenShadowRoot() || !isTextFormControl() || !inDocument())
return;
const int editorValueLength = static_cast<int>(innerEditorValue().length());
« no previous file with comments | « LayoutTests/editing/input/orphan-set-selection-range-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698