Don't clear selection on focus change except for text form control element
Before this patch, Blink clears selection when focus is changed. This patch changes to clear selection for text field only. Thus, we keep selection for content editable. This patch also updates below tests to follow new behavior introduced by this patch. - fast/dom/blur-contenteditable.html Render tree dump has a caret. - fast/layers/scroll-rect-to-visible.html Render tree dump has a caret. - fast/events/selectionchange-user-initiated.html One "selectionchange" event from clear selection for content editable has been gone. - /fast/events/selectstart-prevent-selectall.html same as above. - fast/forms/focus-selection-input.html One "selectionchange" event from clear selection for caret on LABEL element by test step 5 been gone. - fast/forms/focus-selection-textarea.html same as above BUG=351981 TEST=LayoutTests/editing/selection/keep-selection-after-set-focus.html Review URL: https://codereview.chromium.org/424973003 git-svn-id: svn://svn.chromium.org/blink/trunk@180228 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment