DescriptionMake 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 #
Messages
Total messages: 18 (14 generated)
|