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

Issue 424973003: Don't clear selection on focus change except for text form control element (Closed)

Created:
6 years, 4 months ago by yosin_UTC9
Modified:
6 years, 4 months ago
CC:
blink-reviews, Jelte
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=180228

Patch Set 1 : 2014-07-29T16:38:05 #

Total comments: 5

Patch Set 2 : 2014-07-30T09:45:59 #

Total comments: 2

Patch Set 3 : 2014-08-01T13:31:54 #

Patch Set 4 : 2014-08-12T17:34:43 Clear selection in text form control blur handler #

Patch Set 5 : 2014-08-12T18:44:20 #

Patch Set 6 : 2014-08-13T13:21:11 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -17 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/editing/selection/keep-selection-after-set-focus.html View 1 chunk +19 lines, -0 lines 0 comments Download
A + LayoutTests/editing/selection/keep-selection-after-set-focus-expected.txt View 1 chunk +5 lines, -3 lines 0 comments Download
M LayoutTests/fast/events/selectionchange-user-initiated-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/events/selectstart-prevent-selectall-expected.txt View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/forms/focus-selection-input-expected.txt View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/forms/focus-selection-textarea-expected.txt View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/dom/Element.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/page/FocusController.cpp View 1 2 3 4 5 1 chunk +3 lines, -9 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
yosin_UTC9
Could you review this patch? Thanks in advance. Note: {linux,mac,win}_blink_rel bots failures aren't related this ...
6 years, 4 months ago (2014-07-29 08:29:39 UTC) #1
leviw_travelin_and_unemployed
https://codereview.chromium.org/424973003/diff/20001/LayoutTests/editing/selection/focus-and-display-none-and-redisplay.html File LayoutTests/editing/selection/focus-and-display-none-and-redisplay.html (right): https://codereview.chromium.org/424973003/diff/20001/LayoutTests/editing/selection/focus-and-display-none-and-redisplay.html#newcode6 LayoutTests/editing/selection/focus-and-display-none-and-redisplay.html:6: description('Unfocused TEXTAREA should not accept editing.'); This contradicts the ...
6 years, 4 months ago (2014-07-29 19:56:40 UTC) #2
yosin_UTC9
PTAL https://codereview.chromium.org/424973003/diff/20001/LayoutTests/editing/selection/focus-and-display-none-and-redisplay.html File LayoutTests/editing/selection/focus-and-display-none-and-redisplay.html (right): https://codereview.chromium.org/424973003/diff/20001/LayoutTests/editing/selection/focus-and-display-none-and-redisplay.html#newcode6 LayoutTests/editing/selection/focus-and-display-none-and-redisplay.html:6: description('Unfocused TEXTAREA should not accept editing.'); On 2014/07/29 ...
6 years, 4 months ago (2014-07-30 00:48:07 UTC) #3
leviw_travelin_and_unemployed
https://codereview.chromium.org/424973003/diff/20001/Source/core/page/FocusController.cpp File Source/core/page/FocusController.cpp (right): https://codereview.chromium.org/424973003/diff/20001/Source/core/page/FocusController.cpp#newcode680 Source/core/page/FocusController.cpp:680: if (newFocusedNode && (newFocusedNode->hasEditableStyle() On 2014/07/30 00:48:07, Yosi_UTC9 wrote: ...
6 years, 4 months ago (2014-07-30 19:19:19 UTC) #4
yosin_UTC9
On 2014/07/30 19:19:19, leviw wrote: > https://codereview.chromium.org/424973003/diff/20001/Source/core/page/FocusController.cpp > File Source/core/page/FocusController.cpp (right): > > https://codereview.chromium.org/424973003/diff/20001/Source/core/page/FocusController.cpp#newcode680 > ...
6 years, 4 months ago (2014-07-31 07:50:10 UTC) #5
yosin_UTC9
On 2014/07/31 07:50:10, Yosi_UTC9 wrote: > On 2014/07/30 19:19:19, leviw wrote: > > > https://codereview.chromium.org/424973003/diff/20001/Source/core/page/FocusController.cpp ...
6 years, 4 months ago (2014-07-31 09:46:39 UTC) #6
yosin_UTC9
Waiting for trybots Finally I found the root cause of failure of editing/spelling/markers.html. During focus ...
6 years, 4 months ago (2014-08-01 04:39:19 UTC) #7
leviw_travelin_and_unemployed
The code change looks reasonable, but you have failing tests. Can you upload new test ...
6 years, 4 months ago (2014-08-05 00:28:41 UTC) #8
yosin_UTC9
Following tests are failed. I'm investigating... :-< Note: these failed tests are union of mac, ...
6 years, 4 months ago (2014-08-06 00:42:09 UTC) #9
yosin_UTC9
On 2014/08/06 00:42:09, Yosi_UTC9 wrote: > Following tests are failed. I'm investigating... :-< > Note: ...
6 years, 4 months ago (2014-08-12 09:49:40 UTC) #10
yosin_UTC9
PTAL All tests are green now.
6 years, 4 months ago (2014-08-13 04:14:53 UTC) #11
blink-reviews
Awesome! Jelte Liebrand | Software Engineer | jelte@google.com <jliebrand@google.com> | +1 (415) 318 6507 On ...
6 years, 4 months ago (2014-08-13 04:16:14 UTC) #12
leviw_travelin_and_unemployed
LGTM. Great!
6 years, 4 months ago (2014-08-13 18:28:14 UTC) #13
yosin_UTC9
The CQ bit was checked by yosin@chromium.org
6 years, 4 months ago (2014-08-14 00:58:58 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yosin@chromium.org/424973003/140001
6 years, 4 months ago (2014-08-14 01:00:02 UTC) #15
commit-bot: I haz the power
6 years, 4 months ago (2014-08-14 03:55:20 UTC) #16
Message was sent while issue was closed.
Committed patchset #6 (140001) as 180228

Powered by Google App Engine
This is Rietveld 408576698