| Index: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| index 1d6c3ecd17ef9db3c9b0056c1a5eb4933fde263b..63577489902fdb90742b8e980b878f3f1f8e0941 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| @@ -221,7 +221,7 @@ class EditorInternalCommand {
|
| bool (*isSupportedFromDOM)(LocalFrame*);
|
| bool (*isEnabled)(LocalFrame&, Event*, EditorCommandSource);
|
| TriState (*state)(LocalFrame&, Event*);
|
| - String (*value)(LocalFrame&, Event*);
|
| + String (*value)(const EditorInternalCommand&, LocalFrame&, Event*);
|
| bool isTextInsertion;
|
| // TODO(yosin) We should have |canExecute()|, which checks clipboard
|
| // accessibility to simplify |Editor::Command::execute()|.
|
| @@ -2199,22 +2199,30 @@ static TriState stateJustifyRight(LocalFrame& frame, Event*) {
|
|
|
| // Value functions
|
|
|
| -static String valueNull(LocalFrame&, Event*) {
|
| - return String();
|
| +static String valueStateOrNull(const EditorInternalCommand& self,
|
| + LocalFrame& frame,
|
| + Event* triggeringEvent) {
|
| + if (self.state == stateNone)
|
| + return String();
|
| + return self.state(frame, triggeringEvent) == TrueTriState ? "true" : "false";
|
| }
|
|
|
| // The command has no value.
|
| // https://w3c.github.io/editing/execCommand.html#querycommandvalue()
|
| // > ... or has no value, return the empty string.
|
| -static String valueNo(LocalFrame&, Event*) {
|
| +static String valueEmpty(const EditorInternalCommand&, LocalFrame&, Event*) {
|
| return emptyString;
|
| }
|
|
|
| -static String valueBackColor(LocalFrame& frame, Event*) {
|
| +static String valueBackColor(const EditorInternalCommand&,
|
| + LocalFrame& frame,
|
| + Event*) {
|
| return valueStyle(frame, CSSPropertyBackgroundColor);
|
| }
|
|
|
| -static String valueDefaultParagraphSeparator(LocalFrame& frame, Event*) {
|
| +static String valueDefaultParagraphSeparator(const EditorInternalCommand&,
|
| + LocalFrame& frame,
|
| + Event*) {
|
| switch (frame.editor().defaultParagraphSeparator()) {
|
| case EditorParagraphSeparatorIsDiv:
|
| return divTag.localName();
|
| @@ -2226,23 +2234,33 @@ static String valueDefaultParagraphSeparator(LocalFrame& frame, Event*) {
|
| return String();
|
| }
|
|
|
| -static String valueFontName(LocalFrame& frame, Event*) {
|
| +static String valueFontName(const EditorInternalCommand&,
|
| + LocalFrame& frame,
|
| + Event*) {
|
| return valueStyle(frame, CSSPropertyFontFamily);
|
| }
|
|
|
| -static String valueFontSize(LocalFrame& frame, Event*) {
|
| +static String valueFontSize(const EditorInternalCommand&,
|
| + LocalFrame& frame,
|
| + Event*) {
|
| return valueStyle(frame, CSSPropertyFontSize);
|
| }
|
|
|
| -static String valueFontSizeDelta(LocalFrame& frame, Event*) {
|
| +static String valueFontSizeDelta(const EditorInternalCommand&,
|
| + LocalFrame& frame,
|
| + Event*) {
|
| return valueStyle(frame, CSSPropertyWebkitFontSizeDelta);
|
| }
|
|
|
| -static String valueForeColor(LocalFrame& frame, Event*) {
|
| +static String valueForeColor(const EditorInternalCommand&,
|
| + LocalFrame& frame,
|
| + Event*) {
|
| return valueStyle(frame, CSSPropertyColor);
|
| }
|
|
|
| -static String valueFormatBlock(LocalFrame& frame, Event*) {
|
| +static String valueFormatBlock(const EditorInternalCommand&,
|
| + LocalFrame& frame,
|
| + Event*) {
|
| const VisibleSelection& selection =
|
| frame.selection().computeVisibleSelectionInDOMTreeDeprecated();
|
| if (!selection.isNonOrphanedCaretOrRange() || !selection.isContentEditable())
|
| @@ -2264,72 +2282,75 @@ static const EditorInternalCommand* internalCommand(const String& commandName) {
|
| // Covered by unit tests in EditingCommandTest.cpp
|
| {WebEditingCommandType::AlignJustified, executeJustifyFull,
|
| supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::AlignLeft, executeJustifyLeft,
|
| supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::AlignRight, executeJustifyRight,
|
| supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::BackColor, executeBackColor, supported,
|
| enabledInRichlyEditableText, stateNone, valueBackColor, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| // FIXME: remove BackwardDelete when Safari for Windows stops using it.
|
| {WebEditingCommandType::BackwardDelete, executeDeleteBackward,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Bold, executeToggleBold, supported,
|
| - enabledInRichlyEditableText, stateBold, valueNull, notTextInsertion,
|
| - doNotAllowExecutionWhenDisabled},
|
| + enabledInRichlyEditableText, stateBold, valueStateOrNull,
|
| + notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Copy, executeCopy, supported, enabledCopy,
|
| - stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled},
|
| + stateNone, valueStateOrNull, notTextInsertion,
|
| + allowExecutionWhenDisabled},
|
| {WebEditingCommandType::CreateLink, executeCreateLink, supported,
|
| - enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion,
|
| - doNotAllowExecutionWhenDisabled},
|
| + enabledInRichlyEditableText, stateNone, valueStateOrNull,
|
| + notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Cut, executeCut, supported, enabledCut, stateNone,
|
| - valueNull, notTextInsertion, allowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, allowExecutionWhenDisabled},
|
| {WebEditingCommandType::DefaultParagraphSeparator,
|
| executeDefaultParagraphSeparator, supported, enabled, stateNone,
|
| valueDefaultParagraphSeparator, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Delete, executeDelete, supported, enabledDelete,
|
| - stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + stateNone, valueStateOrNull, notTextInsertion,
|
| + doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::DeleteBackward, executeDeleteBackward,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::DeleteBackwardByDecomposingPreviousCharacter,
|
| executeDeleteBackwardByDecomposingPreviousCharacter,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::DeleteForward, executeDeleteForward,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::DeleteToBeginningOfLine,
|
| executeDeleteToBeginningOfLine, supportedFromMenuOrKeyBinding,
|
| - enabledInEditableText, stateNone, valueNull, notTextInsertion,
|
| + enabledInEditableText, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::DeleteToBeginningOfParagraph,
|
| executeDeleteToBeginningOfParagraph, supportedFromMenuOrKeyBinding,
|
| - enabledInEditableText, stateNone, valueNull, notTextInsertion,
|
| + enabledInEditableText, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::DeleteToEndOfLine, executeDeleteToEndOfLine,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::DeleteToEndOfParagraph,
|
| executeDeleteToEndOfParagraph, supportedFromMenuOrKeyBinding,
|
| - enabledInEditableText, stateNone, valueNull, notTextInsertion,
|
| + enabledInEditableText, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::DeleteToMark, executeDeleteToMark,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::DeleteWordBackward, executeDeleteWordBackward,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::DeleteWordForward, executeDeleteWordForward,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::FindString, executeFindString, supported, enabled,
|
| - stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + stateNone, valueStateOrNull, notTextInsertion,
|
| + doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::FontName, executeFontName, supported,
|
| enabledInRichlyEditableText, stateNone, valueFontName, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| @@ -2346,373 +2367,379 @@ static const EditorInternalCommand* internalCommand(const String& commandName) {
|
| enabledInRichlyEditableText, stateNone, valueFormatBlock,
|
| notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::ForwardDelete, executeForwardDelete, supported,
|
| - enabledInEditableText, stateNone, valueNull, notTextInsertion,
|
| + enabledInEditableText, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::HiliteColor, executeBackColor, supported,
|
| - enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion,
|
| - doNotAllowExecutionWhenDisabled},
|
| + enabledInRichlyEditableText, stateNone, valueStateOrNull,
|
| + notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::IgnoreSpelling, executeIgnoreSpelling,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Indent, executeIndent, supported,
|
| - enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion,
|
| - doNotAllowExecutionWhenDisabled},
|
| + enabledInRichlyEditableText, stateNone, valueStateOrNull,
|
| + notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::InsertBacktab, executeInsertBacktab,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, isTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::InsertHTML, executeInsertHTML, supported,
|
| - enabledInEditableText, stateNone, valueNull, notTextInsertion,
|
| + enabledInEditableText, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::InsertHorizontalRule, executeInsertHorizontalRule,
|
| - supported, enabledInRichlyEditableText, stateNone, valueNull,
|
| + supported, enabledInRichlyEditableText, stateNone, valueStateOrNull,
|
| notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::InsertImage, executeInsertImage, supported,
|
| - enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion,
|
| - doNotAllowExecutionWhenDisabled},
|
| + enabledInRichlyEditableText, stateNone, valueStateOrNull,
|
| + notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::InsertLineBreak, executeInsertLineBreak,
|
| - supported, enabledInEditableText, stateNone, valueNull, isTextInsertion,
|
| - doNotAllowExecutionWhenDisabled},
|
| + supported, enabledInEditableText, stateNone, valueStateOrNull,
|
| + isTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::InsertNewline, executeInsertNewline,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, isTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::InsertNewlineInQuotedContent,
|
| executeInsertNewlineInQuotedContent, supported,
|
| - enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion,
|
| - doNotAllowExecutionWhenDisabled},
|
| - {WebEditingCommandType::InsertOrderedList, executeInsertOrderedList,
|
| - supported, enabledInRichlyEditableText, stateOrderedList, valueNull,
|
| + enabledInRichlyEditableText, stateNone, valueStateOrNull,
|
| notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + {WebEditingCommandType::InsertOrderedList, executeInsertOrderedList,
|
| + supported, enabledInRichlyEditableText, stateOrderedList,
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::InsertParagraph, executeInsertParagraph,
|
| - supported, enabledInEditableText, stateNone, valueNull, notTextInsertion,
|
| - doNotAllowExecutionWhenDisabled},
|
| + supported, enabledInEditableText, stateNone, valueStateOrNull,
|
| + notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::InsertTab, executeInsertTab,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, isTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::InsertText, executeInsertText, supported,
|
| - enabledInEditableText, stateNone, valueNull, isTextInsertion,
|
| + enabledInEditableText, stateNone, valueStateOrNull, isTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::InsertUnorderedList, executeInsertUnorderedList,
|
| - supported, enabledInRichlyEditableText, stateUnorderedList, valueNull,
|
| - notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + supported, enabledInRichlyEditableText, stateUnorderedList,
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Italic, executeToggleItalic, supported,
|
| - enabledInRichlyEditableText, stateItalic, valueNull, notTextInsertion,
|
| - doNotAllowExecutionWhenDisabled},
|
| + enabledInRichlyEditableText, stateItalic, valueStateOrNull,
|
| + notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::JustifyCenter, executeJustifyCenter, supported,
|
| - enabledInRichlyEditableText, stateJustifyCenter, valueNull,
|
| + enabledInRichlyEditableText, stateJustifyCenter, valueStateOrNull,
|
| notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::JustifyFull, executeJustifyFull, supported,
|
| - enabledInRichlyEditableText, stateJustifyFull, valueNull,
|
| + enabledInRichlyEditableText, stateJustifyFull, valueStateOrNull,
|
| notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::JustifyLeft, executeJustifyLeft, supported,
|
| - enabledInRichlyEditableText, stateJustifyLeft, valueNull,
|
| + enabledInRichlyEditableText, stateJustifyLeft, valueStateOrNull,
|
| notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::JustifyNone, executeJustifyLeft, supported,
|
| - enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion,
|
| - doNotAllowExecutionWhenDisabled},
|
| + enabledInRichlyEditableText, stateNone, valueStateOrNull,
|
| + notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::JustifyRight, executeJustifyRight, supported,
|
| - enabledInRichlyEditableText, stateJustifyRight, valueNull,
|
| + enabledInRichlyEditableText, stateJustifyRight, valueStateOrNull,
|
| notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MakeTextWritingDirectionLeftToRight,
|
| executeMakeTextWritingDirectionLeftToRight,
|
| supportedFromMenuOrKeyBinding, enabledInRichlyEditableText,
|
| - stateTextWritingDirectionLeftToRight, valueNull, notTextInsertion,
|
| + stateTextWritingDirectionLeftToRight, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MakeTextWritingDirectionNatural,
|
| executeMakeTextWritingDirectionNatural, supportedFromMenuOrKeyBinding,
|
| - enabledInRichlyEditableText, stateTextWritingDirectionNatural, valueNull,
|
| - notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + enabledInRichlyEditableText, stateTextWritingDirectionNatural,
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MakeTextWritingDirectionRightToLeft,
|
| executeMakeTextWritingDirectionRightToLeft,
|
| supportedFromMenuOrKeyBinding, enabledInRichlyEditableText,
|
| - stateTextWritingDirectionRightToLeft, valueNull, notTextInsertion,
|
| + stateTextWritingDirectionRightToLeft, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveBackward, executeMoveBackward,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveBackwardAndModifySelection,
|
| executeMoveBackwardAndModifySelection, supportedFromMenuOrKeyBinding,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveDown, executeMoveDown,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveDownAndModifySelection,
|
| executeMoveDownAndModifySelection, supportedFromMenuOrKeyBinding,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveForward, executeMoveForward,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveForwardAndModifySelection,
|
| executeMoveForwardAndModifySelection, supportedFromMenuOrKeyBinding,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveLeft, executeMoveLeft,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveLeftAndModifySelection,
|
| executeMoveLeftAndModifySelection, supportedFromMenuOrKeyBinding,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MovePageDown, executeMovePageDown,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MovePageDownAndModifySelection,
|
| executeMovePageDownAndModifySelection, supportedFromMenuOrKeyBinding,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MovePageUp, executeMovePageUp,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MovePageUpAndModifySelection,
|
| executeMovePageUpAndModifySelection, supportedFromMenuOrKeyBinding,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveParagraphBackward,
|
| executeMoveParagraphBackward, supportedFromMenuOrKeyBinding,
|
| - enabledInEditableText, stateNone, valueNull, notTextInsertion,
|
| + enabledInEditableText, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveParagraphBackwardAndModifySelection,
|
| executeMoveParagraphBackwardAndModifySelection,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveParagraphForward, executeMoveParagraphForward,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveParagraphForwardAndModifySelection,
|
| executeMoveParagraphForwardAndModifySelection,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveRight, executeMoveRight,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveRightAndModifySelection,
|
| executeMoveRightAndModifySelection, supportedFromMenuOrKeyBinding,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToBeginningOfDocument,
|
| executeMoveToBeginningOfDocument, supportedFromMenuOrKeyBinding,
|
| - enabledInEditableText, stateNone, valueNull, notTextInsertion,
|
| + enabledInEditableText, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToBeginningOfDocumentAndModifySelection,
|
| executeMoveToBeginningOfDocumentAndModifySelection,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToBeginningOfLine,
|
| executeMoveToBeginningOfLine, supportedFromMenuOrKeyBinding,
|
| - enabledInEditableText, stateNone, valueNull, notTextInsertion,
|
| + enabledInEditableText, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToBeginningOfLineAndModifySelection,
|
| executeMoveToBeginningOfLineAndModifySelection,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToBeginningOfParagraph,
|
| executeMoveToBeginningOfParagraph, supportedFromMenuOrKeyBinding,
|
| - enabledInEditableText, stateNone, valueNull, notTextInsertion,
|
| + enabledInEditableText, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToBeginningOfParagraphAndModifySelection,
|
| executeMoveToBeginningOfParagraphAndModifySelection,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToBeginningOfSentence,
|
| executeMoveToBeginningOfSentence, supportedFromMenuOrKeyBinding,
|
| - enabledInEditableText, stateNone, valueNull, notTextInsertion,
|
| + enabledInEditableText, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToBeginningOfSentenceAndModifySelection,
|
| executeMoveToBeginningOfSentenceAndModifySelection,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToEndOfDocument, executeMoveToEndOfDocument,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToEndOfDocumentAndModifySelection,
|
| executeMoveToEndOfDocumentAndModifySelection,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToEndOfLine, executeMoveToEndOfLine,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToEndOfLineAndModifySelection,
|
| executeMoveToEndOfLineAndModifySelection, supportedFromMenuOrKeyBinding,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToEndOfParagraph, executeMoveToEndOfParagraph,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToEndOfParagraphAndModifySelection,
|
| executeMoveToEndOfParagraphAndModifySelection,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToEndOfSentence, executeMoveToEndOfSentence,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToEndOfSentenceAndModifySelection,
|
| executeMoveToEndOfSentenceAndModifySelection,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToLeftEndOfLine, executeMoveToLeftEndOfLine,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToLeftEndOfLineAndModifySelection,
|
| executeMoveToLeftEndOfLineAndModifySelection,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToRightEndOfLine, executeMoveToRightEndOfLine,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveToRightEndOfLineAndModifySelection,
|
| executeMoveToRightEndOfLineAndModifySelection,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveUp, executeMoveUp,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveUpAndModifySelection,
|
| executeMoveUpAndModifySelection, supportedFromMenuOrKeyBinding,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveWordBackward, executeMoveWordBackward,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveWordBackwardAndModifySelection,
|
| executeMoveWordBackwardAndModifySelection, supportedFromMenuOrKeyBinding,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveWordForward, executeMoveWordForward,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveWordForwardAndModifySelection,
|
| executeMoveWordForwardAndModifySelection, supportedFromMenuOrKeyBinding,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveWordLeft, executeMoveWordLeft,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveWordLeftAndModifySelection,
|
| executeMoveWordLeftAndModifySelection, supportedFromMenuOrKeyBinding,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveWordRight, executeMoveWordRight,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::MoveWordRightAndModifySelection,
|
| executeMoveWordRightAndModifySelection, supportedFromMenuOrKeyBinding,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Outdent, executeOutdent, supported,
|
| - enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion,
|
| - doNotAllowExecutionWhenDisabled},
|
| + enabledInRichlyEditableText, stateNone, valueStateOrNull,
|
| + notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::OverWrite, executeToggleOverwrite,
|
| supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Paste, executePaste, supported, enabledPaste,
|
| - stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled},
|
| + stateNone, valueStateOrNull, notTextInsertion,
|
| + allowExecutionWhenDisabled},
|
| {WebEditingCommandType::PasteAndMatchStyle, executePasteAndMatchStyle,
|
| - supported, enabledPaste, stateNone, valueNull, notTextInsertion,
|
| + supported, enabledPaste, stateNone, valueStateOrNull, notTextInsertion,
|
| allowExecutionWhenDisabled},
|
| {WebEditingCommandType::PasteGlobalSelection, executePasteGlobalSelection,
|
| - supportedFromMenuOrKeyBinding, enabledPaste, stateNone, valueNull,
|
| + supportedFromMenuOrKeyBinding, enabledPaste, stateNone, valueStateOrNull,
|
| notTextInsertion, allowExecutionWhenDisabled},
|
| {WebEditingCommandType::Print, executePrint, supported, enabled,
|
| - stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + stateNone, valueStateOrNull, notTextInsertion,
|
| + doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Redo, executeRedo, supported, enabledRedo,
|
| - stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| - {WebEditingCommandType::RemoveFormat, executeRemoveFormat, supported,
|
| - enabledRangeInEditableText, stateNone, valueNull, notTextInsertion,
|
| + stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| + {WebEditingCommandType::RemoveFormat, executeRemoveFormat, supported,
|
| + enabledRangeInEditableText, stateNone, valueStateOrNull,
|
| + notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::ScrollPageBackward, executeScrollPageBackward,
|
| - supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull,
|
| + supportedFromMenuOrKeyBinding, enabled, stateNone, valueStateOrNull,
|
| notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::ScrollPageForward, executeScrollPageForward,
|
| - supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull,
|
| + supportedFromMenuOrKeyBinding, enabled, stateNone, valueStateOrNull,
|
| notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::ScrollLineUp, executeScrollLineUp,
|
| - supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull,
|
| + supportedFromMenuOrKeyBinding, enabled, stateNone, valueStateOrNull,
|
| notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::ScrollLineDown, executeScrollLineDown,
|
| - supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull,
|
| + supportedFromMenuOrKeyBinding, enabled, stateNone, valueStateOrNull,
|
| notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::ScrollToBeginningOfDocument,
|
| executeScrollToBeginningOfDocument, supportedFromMenuOrKeyBinding,
|
| - enabled, stateNone, valueNull, notTextInsertion,
|
| + enabled, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::ScrollToEndOfDocument,
|
| executeScrollToEndOfDocument, supportedFromMenuOrKeyBinding, enabled,
|
| - stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + stateNone, valueStateOrNull, notTextInsertion,
|
| + doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::SelectAll, executeSelectAll, supported,
|
| - enabledSelectAll, stateNone, valueNull, notTextInsertion,
|
| + enabledSelectAll, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::SelectLine, executeSelectLine,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::SelectParagraph, executeSelectParagraph,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::SelectSentence, executeSelectSentence,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::SelectToMark, executeSelectToMark,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelectionAndMark, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::SelectWord, executeSelectWord,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::SetMark, executeSetMark,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Strikethrough, executeStrikethrough, supported,
|
| - enabledInRichlyEditableText, stateStrikethrough, valueNull,
|
| + enabledInRichlyEditableText, stateStrikethrough, valueStateOrNull,
|
| notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::StyleWithCSS, executeStyleWithCSS, supported,
|
| - enabled, stateStyleWithCSS, valueNo, notTextInsertion,
|
| + enabled, stateStyleWithCSS, valueEmpty, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Subscript, executeSubscript, supported,
|
| - enabledInRichlyEditableText, stateSubscript, valueNull, notTextInsertion,
|
| - doNotAllowExecutionWhenDisabled},
|
| + enabledInRichlyEditableText, stateSubscript, valueStateOrNull,
|
| + notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Superscript, executeSuperscript, supported,
|
| - enabledInRichlyEditableText, stateSuperscript, valueNull,
|
| + enabledInRichlyEditableText, stateSuperscript, valueStateOrNull,
|
| notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::SwapWithMark, executeSwapWithMark,
|
| supportedFromMenuOrKeyBinding, enabledVisibleSelectionAndMark, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::ToggleBold, executeToggleBold,
|
| supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateBold,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::ToggleItalic, executeToggleItalic,
|
| supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateItalic,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::ToggleUnderline, executeUnderline,
|
| supportedFromMenuOrKeyBinding, enabledInRichlyEditableText,
|
| - stateUnderline, valueNull, notTextInsertion,
|
| + stateUnderline, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Transpose, executeTranspose, supported,
|
| - enableCaretInEditableText, stateNone, valueNull, notTextInsertion,
|
| + enableCaretInEditableText, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Underline, executeUnderline, supported,
|
| - enabledInRichlyEditableText, stateUnderline, valueNull, notTextInsertion,
|
| - doNotAllowExecutionWhenDisabled},
|
| + enabledInRichlyEditableText, stateUnderline, valueStateOrNull,
|
| + notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Undo, executeUndo, supported, enabledUndo,
|
| - stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| - {WebEditingCommandType::Unlink, executeUnlink, supported,
|
| - enabledRangeInRichlyEditableText, stateNone, valueNull, notTextInsertion,
|
| + stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| + {WebEditingCommandType::Unlink, executeUnlink, supported,
|
| + enabledRangeInRichlyEditableText, stateNone, valueStateOrNull,
|
| + notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Unscript, executeUnscript,
|
| supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Unselect, executeUnselect, supported,
|
| - enabledVisibleSelection, stateNone, valueNull, notTextInsertion,
|
| + enabledVisibleSelection, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::UseCSS, executeUseCSS, supported, enabled,
|
| - stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + stateNone, valueStateOrNull, notTextInsertion,
|
| + doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::Yank, executeYank, supportedFromMenuOrKeyBinding,
|
| - enabledInEditableText, stateNone, valueNull, notTextInsertion,
|
| + enabledInEditableText, stateNone, valueStateOrNull, notTextInsertion,
|
| doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::YankAndSelect, executeYankAndSelect,
|
| supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| {WebEditingCommandType::AlignCenter, executeJustifyCenter,
|
| supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone,
|
| - valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| + valueStateOrNull, notTextInsertion, doNotAllowExecutionWhenDisabled},
|
| };
|
| // Handles all commands except WebEditingCommandType::Invalid.
|
| static_assert(
|
| @@ -2880,11 +2907,7 @@ TriState Editor::Command::state(Event* triggeringEvent) const {
|
| String Editor::Command::value(Event* triggeringEvent) const {
|
| if (!isSupported() || !m_frame)
|
| return String();
|
| - if (m_command->value == valueNull && m_command->state != stateNone)
|
| - return m_command->state(*m_frame, triggeringEvent) == TrueTriState
|
| - ? "true"
|
| - : "false";
|
| - return m_command->value(*m_frame, triggeringEvent);
|
| + return m_command->value(*m_command, *m_frame, triggeringEvent);
|
| }
|
|
|
| bool Editor::Command::isTextInsertion() const {
|
|
|