Chromium Code Reviews
DescriptionMake 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 #
Depends on Patchset: Messages
Total messages: 24 (17 generated)
|
|||||||||||||||||||||||||||||||||||||