[webkit-changes] [WebKit/WebKit] c6f1d2: [Writing Tools] Writing Tools do not appear in Safari

Richard Robinson noreply at github.com
Thu Jul 11 07:54:06 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c6f1d258f36020774be60e54590b2b581d4c0f43
      https://github.com/WebKit/WebKit/commit/c6f1d258f36020774be60e54590b2b581d4c0f43
  Author: Richard Robinson <richard_robinson2 at apple.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
    M Source/WebKit/WebProcess/WebPage/WebContextMenu.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm

  Log Message:
  -----------
  [Writing Tools] Writing Tools do not appear in Safari
https://bugs.webkit.org/show_bug.cgi?id=276470
rdar://131501232

Reviewed by Aditya Keerthi.

The new implementation of the Writing Tools context menu item depends on the editor state having
post-layout data. However, this is not the case in Safari due to `shouldAvoidComputingPostLayoutDataForEditorState`
returning `true`.

Fix by ensuring that post-layout data is always available in this case by making `shouldAvoidComputingPostLayoutDataForEditorState`
return `false` if a context menu has ever been shown.

* Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::handleContextMenuWritingTools):
* Source/WebKit/WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::showContextMenuFromFrame):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::shouldAvoidComputingPostLayoutDataForEditorState const):

Canonical link: https://commits.webkit.org/280860@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