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

Issue 2886933002: Make EnabledInEditableText 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:
yosin_UTC9
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make EnabledInEditableText 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 EnabledInEditableText to fix the behavior of these commands: BackwardDelete DeleteBackward DeleteBackwardByDecomposingPreviousCharacter DeleteForward DeleteToBeginningOfLine DeleteToBeginningOfParagraph DeleteToEndOfLine DeleteToEndOfParagraph DeleteToMark DeleteWordBackward DeleteWordForward ForwardDelete IgnoreSpelling InsertBacktab InsertHTML InsertLineBreak InsertNewline InsertParagraph InsertTab InsertText MoveBackward MoveDown MoveForward MoveLeft MovePageDown MovePageUp MoveParagraphBackward MoveParagraphForward MoveRight MoveToBeginningOfDocument MoveToBeginningOfLine MoveToBeginningOfParagraph MoveToBeginningOfSentence MoveToEndOfDocument MoveToEndOfLine MoveToEndOfParagraph MoveToEndOfSentence MoveToLeftEndOfLine MoveToLeftEndOfLineAndModifySelection MoveToRightEndOfLine MoveToRightEndOfLineAndModifySelection MoveUp MoveWordBackward MoveWordForward MoveWordLeft MoveWordRight Yank YankAndSelect BUG=713607, 722925 TEST=editing/selection/arrow_key_with_unfocused_selection.html Review-Url: https://codereview.chromium.org/2886933002 Cr-Commit-Position: refs/heads/master@{#472284} Committed: https://chromium.googlesource.com/chromium/src/+/2e91966df2e6a57cafb584bfa72e19bc2e9bb620

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -1 line) Patch
A third_party/WebKit/LayoutTests/editing/selection/arrow_key_with_unfocused_selection.html View 1 chunk +47 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 14 (10 generated)
Xiaocheng
PTAL.
3 years, 7 months ago (2017-05-16 20:59:33 UTC) #6
yosin_UTC9
lgtm
3 years, 7 months ago (2017-05-17 01:57:13 UTC) #10
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/2886933002/1
3 years, 7 months ago (2017-05-17 01:58:27 UTC) #11
commit-bot: I haz the power
3 years, 7 months ago (2017-05-17 02:06:29 UTC) #14
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/2e91966df2e6a57cafb584bfa72e...

Powered by Google App Engine
This is Rietveld 408576698