Changeset 252233 in webkit


Ignore:
Timestamp:
Nov 8, 2019 1:09:36 AM (4 years ago)
Author:
Carlos Garcia Campos
Message:

'Strikethrough' editing command reported as 'formatUnderline'
https://bugs.webkit.org/show_bug.cgi?id=203944

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Add an EditAction for strikeThrough command.

Test: fast/events/input-events-strikethrough-type.html

  • editing/EditAction.cpp:

(WebCore::undoRedoLabel): Handle StrikeThrough action.

  • editing/EditAction.h:
  • editing/EditCommand.cpp:

(WebCore::inputTypeNameForEditingAction): Ditto.

  • editing/EditorCommand.cpp:

(WebCore::executeStrikethrough): Use StrikeThrough action instead of Underline.

LayoutTests:

  • fast/events/input-events-strikethrough-type-expected.txt: Added.
  • fast/events/input-events-strikethrough-type.html: Added.
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r252230 r252233  
     12019-11-08  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        'Strikethrough' editing command reported as 'formatUnderline'
     4        https://bugs.webkit.org/show_bug.cgi?id=203944
     5
     6        Reviewed by Adrian Perez de Castro.
     7
     8        * fast/events/input-events-strikethrough-type-expected.txt: Added.
     9        * fast/events/input-events-strikethrough-type.html: Added.
     10
    1112019-11-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r252230 r252233  
     12019-11-08  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        'Strikethrough' editing command reported as 'formatUnderline'
     4        https://bugs.webkit.org/show_bug.cgi?id=203944
     5
     6        Reviewed by Adrian Perez de Castro.
     7
     8        Add an EditAction for strikeThrough command.
     9
     10        Test: fast/events/input-events-strikethrough-type.html
     11
     12        * editing/EditAction.cpp:
     13        (WebCore::undoRedoLabel): Handle StrikeThrough action.
     14        * editing/EditAction.h:
     15        * editing/EditCommand.cpp:
     16        (WebCore::inputTypeNameForEditingAction): Ditto.
     17        * editing/EditorCommand.cpp:
     18        (WebCore::executeStrikethrough): Use StrikeThrough action instead of Underline.
     19
    1202019-11-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
    221
  • trunk/Source/WebCore/editing/EditAction.cpp

    r244115 r252233  
    8585    case EditAction::Underline:
    8686        return WEB_UI_STRING_KEY("Underline", "Underline (Undo action name)", "Undo action name");
     87    case EditAction::StrikeThrough:
     88        return WEB_UI_STRING_KEY("StrikeThrough", "StrikeThrough (Undo action name)", "Undo action name");
    8789    case EditAction::Outline:
    8890        return WEB_UI_STRING_KEY("Outline", "Outline (Undo action name)", "Undo action name");
  • trunk/Source/WebCore/editing/EditAction.h

    r241949 r252233  
    6060    Superscript,
    6161    Underline,
     62    StrikeThrough,
    6263    Outline,
    6364    Unscript,
  • trunk/Source/WebCore/editing/EditCommand.cpp

    r241949 r252233  
    5757    case EditAction::Underline:
    5858        return "formatUnderline"_s;
     59    case EditAction::StrikeThrough:
     60        return "formatStrikeThrough"_s;
    5961    case EditAction::SetColor:
    6062        return "formatFontColor"_s;
  • trunk/Source/WebCore/editing/EditorCommand.cpp

    r250973 r252233  
    10831083    Ref<EditingStyle> style = EditingStyle::create();
    10841084    style->setStrikeThroughChange(textDecorationChangeForToggling(frame.editor(), CSSPropertyWebkitTextDecorationsInEffect, "line-through"_s));
    1085     // FIXME: Needs a new EditAction!
    1086     return applyCommandToFrame(frame, source, EditAction::Underline, WTFMove(style));
     1085    return applyCommandToFrame(frame, source, EditAction::StrikeThrough, WTFMove(style));
    10871086}
    10881087
Note: See TracChangeset for help on using the changeset viewer.