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

Issue 2883383003: Make EnabledInRichlyEditableText 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, blink-reviews-style_chromium.org, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make EnabledInRichlyEditableText 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 EnabledInRichlyEditableText to fix the behavior of these commands: AlignJustified AlignLeft AlignRight BackColor Bold CreateLink FontName FontSize FontSizeDelta ForeColor FormatBlock HiliteColor Indent InsertHorizontalRule InsertImage InsertNewlineInQuotedContent InsertOrderedList InsertUnorderedList Italic JustifyCenter JustifyFull JustifyLeft JustifyNone JustifyRight MakeTextWritingDirectionLeftToRight MakeTextWritingDirectionNatural MakeTextWritingDirectionRightToLeft Outdent OverWrite Strikethrough Subscript Superscript ToggleBold ToggleItalic ToggleUnderline Underline Unscript AlignCenter BUG=722925 TEST=editing/style/apply_style_with_unfocused_selection.html Review-Url: https://codereview.chromium.org/2883383003 Cr-Commit-Position: refs/heads/master@{#472335} Committed: https://chromium.googlesource.com/chromium/src/+/bb67b5730de46d4dbf550ca0496e27326b0a77b1

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -2 lines) Patch
A third_party/WebKit/LayoutTests/editing/style/apply_style_with_unfocused_selection.html View 1 chunk +25 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp View 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (14 generated)
Xiaocheng
PTAL.
3 years, 7 months ago (2017-05-16 20:59:49 UTC) #6
yosin_UTC9
lgtm
3 years, 7 months ago (2017-05-17 01:46:06 UTC) #11
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/2883383003/1
3 years, 7 months ago (2017-05-17 05:10:38 UTC) #15
commit-bot: I haz the power
3 years, 7 months ago (2017-05-17 05:15:53 UTC) #18
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/bb67b5730de46d4dbf550ca0496e...

Powered by Google App Engine
This is Rietveld 408576698