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

Issue 2791753002: Revert of Reland: Do not send redundant selectionchange-events (Closed)

Created:
3 years, 8 months ago by aelias_OOO_until_Jul13
Modified:
3 years, 8 months ago
CC:
blink-reviews, chromium-reviews, yabinh
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of Reland: Do not send redundant selectionchange-events (patchset #29 id:560001 of https://codereview.chromium.org/2616623002/ ) Reason for revert: Caused http://crbug.com/707156, please reland after fixing it. BUG=707156 Original issue's description: > Reland: Do not send redundant selectionchange-events (decouple focus) > > Reason for reland: > Update Win7/10 LayoutTests correctly: crbug.com/706119 > > Background: > Blink tells browser-side when a new <input>-element gets focus. > The information is passed in the > ViewHostMsg_TextInputStateChanged-message. > > Problem: > With current logic, RenderFrameImpl::didChangeSelection is > called twice so two ViewHostMsg_TextInputStateChanged-messages > are sent to browser-side: > (1) when focus leaves an <input>-field (unnecessary!). > (2) when focus enters another <input>-field. > > Worse, also the web page gets two selectionchange events. > The first one is immediately invalid so the webpage should > not react to it. > > (1) happens because FocusController::setFocusedElement() > always clears the selection when a new element gets focus. > > Solution: > When JavaScript moves focus to an element, element.focus(), > and when the user moves focus using tab-key navigation or > mouse, we don't clear the old selection (we hide it). This > means, we only send one selectionchange event, not two, for > each caret jump (as in Firefox). > > Test updates: > 1. Check for one selectionchange event, not two. > 2. LayoutTests' trees now expect the "hidden" selection. > 3. A new test in WebFrameTest.cpp tests tab-key navigation. > > Follow-up will remove the remaining redundant clears: > crbug.com/692898 (tab jumps to non-editable elements). > > BUG=678601, 679635, 699015 > TEST=In content_shell, select some text in an <input>-field, > click another <input>-field (move focus). > Notice: one selectionchange event is fired. > > Review-Url: https://codereview.chromium.org/2616623002 > Cr-Commit-Position: refs/heads/master@{#460314} > Committed: https://chromium.googlesource.com/chromium/src/+/92bf3c29fccac551acceff254e53d7ea73367158 TBR=amaralp@chromium.org,bokan@chromium.org,kochi@chromium.org,yosin@chromium.org,hugoh@opera.com # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=678601, 679635, 699015 Review-Url: https://codereview.chromium.org/2791753002 Cr-Commit-Position: refs/heads/master@{#461278} Committed: https://chromium.googlesource.com/chromium/src/+/1fe7a105adbf7d7e58b3fcb38aefe2fd735c6065

Patch Set 1 #

Patch Set 2 : Add a NeedsRebaseline to manage conflict with http://crrev.com/460732 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -131 lines) Patch
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 1 5 chunks +5 lines, -5 lines 0 comments Download
M content/test/data/android/input/input_forms.html View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/TestExpectations View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/input/keyboard_event_without_focus.html View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/selection/focus-and-display-none-and-redisplay.html View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/selection/focus-and-display-none-and-redisplay-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/touch/gesture/focus-selectionchange-on-tap-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/focus-selection-input-expected.txt View 1 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/android/fast/forms/textarea/textarea-scrolled-mask-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/textarea-scrolled-mask-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/plugins/mouse-click-plugin-clears-selection-expected.txt View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/textarea/textarea-scrolled-mask-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-mac10.10/plugins/mouse-click-plugin-clears-selection-expected.txt View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/textarea/textarea-scrolled-mask-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-mac10.9/plugins/mouse-click-plugin-clears-selection-expected.txt View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-scrolled-mask-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/plugins/mouse-click-plugin-clears-selection-expected.txt View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/textarea-scrolled-mask-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/plugins/mouse-click-plugin-clears-selection-expected.txt View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/EditingUtilities.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/EditingUtilities.cpp View 1 1 chunk +0 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/core/editing/PendingSelection.cpp View 1 3 chunks +7 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/page/FocusController.cpp View 1 4 chunks +33 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 3 chunks +0 lines, -58 lines 0 comments Download
D third_party/WebKit/Source/web/tests/data/editable_elements.html View 1 chunk +0 lines, -9 lines 0 comments Download

Messages

Total messages: 13 (8 generated)
aelias_OOO_until_Jul13
Created Revert of Reland: Do not send redundant selectionchange-events
3 years, 8 months ago (2017-03-31 21:24:11 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2791753002/1
3 years, 8 months ago (2017-03-31 21:24:59 UTC) #3
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/181982) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 8 months ago (2017-03-31 21:28:45 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2791753002/290001
3 years, 8 months ago (2017-03-31 22:05:31 UTC) #10
commit-bot: I haz the power
3 years, 8 months ago (2017-04-01 00:05:39 UTC) #13
Message was sent while issue was closed.
Committed patchset #2 (id:290001) as
https://chromium.googlesource.com/chromium/src/+/1fe7a105adbf7d7e58b3fcb38aef...

Powered by Google App Engine
This is Rietveld 408576698