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

Issue 2886983002: Make EnabledVisibleSelection return false for user-triggered command and unfocused selection (Closed)

Created:
3 years, 7 months ago by Xiaocheng
Modified:
3 years, 7 months ago
Reviewers:
xiaochengh, yosin_UTC9
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make EnabledVisibleSelection return false for user-triggered command and unfocused selection Certain editing commands shouldn't be enabled when they are user-triggered and the selection doesn't have focus. This patch adds checking of FrameSelection::SelectionHasFocus() in EnabledVisibleSelection() to fix the behavior of these commands: MoveBackwardAndModifySelection MoveDownAndModifySelection MoveForwardAndModifySelection MoveLeftAndModifySelection MovePageDownAndModifySelection MovePageUpAndModifySelection MoveParagraphBackwardAndModifySelection MoveParagraphForwardAndModifySelection MoveRightAndModifySelection MoveToBeginningOfDocumentAndModifySelection MoveToBeginningOfLineAndModifySelection MoveToBeginningOfParagraphAndModifySelection MoveToBeginningOfSentenceAndModifySelection MoveToEndOfDocumentAndModifySelection MoveToEndOfLineAndModifySelection MoveToEndOfParagraphAndModifySelection MoveToEndOfSentenceAndModifySelection MoveUpAndModifySelection MoveWordBackwardAndModifySelection MoveWordForwardAndModifySelection MoveWordLeftAndModifySelection MoveWordRightAndModifySelection SelectLine SelectParagraph SelectSentence SelectWord SetMark BUG=722925 TEST=editing/selection/modify_extend/extend_with_unfocused_selection.html Review-Url: https://codereview.chromium.org/2886983002 Cr-Commit-Position: refs/heads/master@{#472366} Committed: https://chromium.googlesource.com/chromium/src/+/e9d6632785a0f1e94b4a15d3c2b3b54251162bc0

Patch Set 1 #

Patch Set 2 : Decouple focus in layout test #

Patch Set 3 : Tue May 16 19:43:47 PDT 2017 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -1 line) Patch
M third_party/WebKit/LayoutTests/editing/execCommand/script-tests/enabling-and-selection-2.js View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_with_unfocused_selection.html View 1 chunk +43 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp View 1 chunk +5 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 24 (17 generated)
Xiaocheng
PTAL.
3 years, 7 months ago (2017-05-17 02:45:58 UTC) #10
yosin_UTC9
lgtm
3 years, 7 months ago (2017-05-17 03:26:33 UTC) #13
commit-bot: I haz the power
This CL has an open dependency (Issue 2891493003 Patch 20001). Please resolve the dependency and ...
3 years, 7 months ago (2017-05-17 03:26:46 UTC) #15
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/2886983002/40001
3 years, 7 months ago (2017-05-17 04:15:40 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/456948)
3 years, 7 months ago (2017-05-17 05:37:56 UTC) #19
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/2886983002/40001
3 years, 7 months ago (2017-05-17 06:41:06 UTC) #21
commit-bot: I haz the power
3 years, 7 months ago (2017-05-17 07:20:50 UTC) #24
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/e9d6632785a0f1e94b4a15d3c2b3...

Powered by Google App Engine
This is Rietveld 408576698