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

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: Add NeverFixTests entry 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..e277e527d1b8b81854ca0e0bc8f8dad08d1a9db4 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() || !parentOrShadowHostNode())
leviw_travelin_and_unemployed 2015/02/20 21:53:48 You probably want isRooted(). If you parent this f
szager1 2015/02/20 22:05:18 Done.
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