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

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

Issue 945873003: Ignore setSelectionRange when node is un-parented. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix file permissions Created 5 years, 10 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
diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
index 274fec19b5ce1c3adc6b0872f6d8d129bc393204..2349df4143fd6f81182b8ddef1e4e7151d84ba94 100644
--- a/Source/core/html/HTMLTextFormControlElement.cpp
+++ b/Source/core/html/HTMLTextFormControlElement.cpp
@@ -348,7 +348,7 @@ static int indexForPosition(HTMLElement* innerEditor, const Position& passedPosi
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