[webkit-changes] [WebKit/WebKit] e1b69e: Add support for writingsuggestions attribute

Richard Robinson noreply at github.com
Sat Feb 17 00:11:55 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e1b69e3d4f52bbd35fe60e310459e2cc0ba1ba7a
      https://github.com/WebKit/WebKit/commit/e1b69e3d4f52bbd35fe60e310459e2cc0ba1ba7a
  Author: Richard Robinson <richard_robinson2 at apple.com>
  Date:   2024-02-17 (Sat, 17 Feb 2024)

  Changed paths:
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WTF/wtf/PlatformEnable.h
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/dom/Element.h
    M Source/WebCore/editing/VisibleSelection.cpp
    M Source/WebCore/editing/VisibleSelection.h
    M Source/WebCore/html/HTMLAttributeNames.in
    M Source/WebCore/html/HTMLElement.cpp
    M Source/WebCore/html/HTMLElement.h
    M Source/WebCore/html/HTMLElement.idl
    M Source/WebCore/html/HTMLInputElement.cpp
    M Source/WebCore/html/HTMLInputElement.h
    M Source/WebKit/Shared/EditorState.cpp
    M Source/WebKit/Shared/EditorState.h
    M Source/WebKit/Shared/EditorState.serialization.in
    M Source/WebKit/Shared/FocusedElementInformation.h
    M Source/WebKit/Shared/FocusedElementInformation.serialization.in
    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/ios/WebPageIOS.mm
    M Tools/TestWebKitAPI/SourcesCocoa.txt
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/Tests/WebKitCocoa/WritingSuggestions.mm

  Log Message:
  -----------
  Add support for writingsuggestions attribute
https://bugs.webkit.org/show_bug.cgi?id=266824
rdar://114989563

Reviewed by Aditya Keerthi.

Implement support for the new DOM `writingsuggstions` web API attribute, as defined by the
corresponding spec PR (whatwg/html#10018).

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WTF/wtf/PlatformEnable.h:
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::isWritingSuggestionsEnabled const):
* Source/WebCore/dom/Element.h:
* Source/WebCore/editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::canEnableWritingSuggestions const):
* Source/WebCore/editing/VisibleSelection.h:
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLElement.cpp:
(WebCore::HTMLElement::writingsuggestions const):
(WebCore::HTMLElement::setWritingsuggestions):
* Source/WebCore/html/HTMLElement.h:
* Source/WebCore/html/HTMLElement.idl:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::supportsWritingSuggestions const):
* Source/WebCore/html/HTMLInputElement.h:
* Source/WebKit/Shared/EditorState.cpp:
(WebKit::operator<<):
* Source/WebKit/Shared/EditorState.h:
* Source/WebKit/Shared/EditorState.serialization.in:
* Source/WebKit/Shared/FocusedElementInformation.h:
* Source/WebKit/Shared/FocusedElementInformation.serialization.in:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _updateTextInputTraits:]):
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::postLayoutDataForContentEditable):
(WebKit::WebViewImpl::allowsInlinePredictions const):
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::getPlatformEditorStateCommon const):
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::focusedElementInformation):
* Tools/TestWebKitAPI/SourcesCocoa.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WritingSuggestions.mm: Added.
(-[WritingSuggestionsWebAPIWKWebView initWithHTMLString:]):
(-[WritingSuggestionsWebAPIWKWebView focusElementAndEnsureEditorStateUpdate:]):
(TEST):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list