[webkit-changes] [WebKit/WebKit] 72fad7: Refactor some enums in EditorState to enum classes

Commit Queue noreply at github.com
Tue May 23 14:13:08 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 72fad77b89f09c7567e56e5da0923fc3d4534a2b
      https://github.com/WebKit/WebKit/commit/72fad77b89f09c7567e56e5da0923fc3d4534a2b
  Author: Jessica Cheung <jessicacheung at Jessicas-Laptop.local>
  Date:   2023-05-23 (Tue, 23 May 2023)

  Changed paths:
    M Source/WebKit/Shared/EditorState.cpp
    M Source/WebKit/Shared/EditorState.h
    M Source/WebKit/Shared/EditorState.serialization.in
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/glib/WebKitEditorState.cpp
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/UIProcess/mac/WebViewImpl.mm
    M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
    M Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp

  Log Message:
  -----------
  Refactor some enums in EditorState to enum classes
https://bugs.webkit.org/show_bug.cgi?id=256930
rdar://109487509

Reviewed by Chris Dumez.

Refactored EditorState enums ListType, TextAlignment, and TypingAttributes to enum classes. Changed TypingAttributes to be TypingAttribute.
Changed typingAttributes in PostLayoutData to be an OptionSet.

* Source/WebKit/Shared/EditorState.cpp:
(WebKit::operator<<):
* Source/WebKit/Shared/EditorState.h:
* Source/WebKit/Shared/EditorState.serialization.in:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(dictionaryRepresentationForEditorState):
(nsTextAlignment):
* Source/WebKit/UIProcess/API/glib/WebKitEditorState.cpp:
(webkitEditorStateChanged):
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textStylingAtPosition:inDirection:]):
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(-[WKTextListTouchBarViewController _selectList:]):
(-[WKTextListTouchBarViewController setCurrentListType:]):
(WebKit::nsTextAlignmentFromTextAlignment):
(WebKit::WebViewImpl::updateTextTouchBar):
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::getPlatformEditorStateCommon const):

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




More information about the webkit-changes mailing list