[webkit-changes] [WebKit/WebKit] 00fd25: Refactor some enums in TypingCommand to enum classes

Jessica Cheung noreply at github.com
Wed May 24 17:30:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 00fd2547e1128196f8adce915fa5f436caf86242
      https://github.com/WebKit/WebKit/commit/00fd2547e1128196f8adce915fa5f436caf86242
  Author: jesxilin <jcheung23 at apple.com>
  Date:   2023-05-24 (Wed, 24 May 2023)

  Changed paths:
    M Source/WebCore/editing/Editor.cpp
    M Source/WebCore/editing/EditorCommand.cpp
    M Source/WebCore/editing/TypingCommand.cpp
    M Source/WebCore/editing/TypingCommand.h
    M Source/WebCore/page/ContextMenuController.cpp

  Log Message:
  -----------
  Refactor some enums in TypingCommand to enum classes
https://bugs.webkit.org/show_bug.cgi?id=256936
rdar://109488827

Reviewed by Wenson Hsieh.

Refactor enums ETypingCommand, TextCompositionType and Option in TypingCommand to be enum classes.
Changed instances of TypingCommand::Option options to OptionSet.

* Source/WebCore/editing/Editor.cpp:
(WebCore::Editor::deleteWithDirection):
(WebCore::Editor::insertTextWithoutSendingTextEvent):
(WebCore::Editor::insertLineBreak):
(WebCore::Editor::insertParagraphSeparator):
(WebCore::Editor::setComposition):
* Source/WebCore/editing/EditorCommand.cpp:
(WebCore::executeDelete):
(WebCore::executeInsertLineBreak):
(WebCore::executeInsertParagraph):
(WebCore::executeInsertText):
* Source/WebCore/editing/TypingCommand.cpp:
(WebCore::editActionForTypingCommand):
(WebCore::TypingCommand::TypingCommand):
(WebCore::TypingCommand::deleteSelection):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
(WebCore::TypingCommand::insertText):
(WebCore::TypingCommand::insertLineBreak):
(WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
(WebCore::TypingCommand::insertParagraphSeparator):
(WebCore::TypingCommand::doApply):
(WebCore::TypingCommand::markMisspellingsAfterTyping):
(WebCore::TypingCommand::insertTextRunWithoutNewlines):
(WebCore::TypingCommand::updatePreservesTypingStyle):
* Source/WebCore/editing/TypingCommand.h:
* Source/WebCore/page/ContextMenuController.cpp:
(WebCore::insertUnicodeCharacter):

Canonical link: https://commits.webkit.org/264493@main




More information about the webkit-changes mailing list