[webkit-changes] [WebKit/WebKit] d49622: Make selection focus work with site isolation

Charlie Wolfe noreply at github.com
Thu Oct 5 09:15:31 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d496225829b3f96f82bce1d5bf2e847a7fab6769
      https://github.com/WebKit/WebKit/commit/d496225829b3f96f82bce1d5bf2e847a7fab6769
  Author: Charlie Wolfe <charliew at apple.com>
  Date:   2023-10-05 (Thu, 05 Oct 2023)

  Changed paths:
    A LayoutTests/http/tests/site-isolation/resources/selected-text.html
    A LayoutTests/http/tests/site-isolation/selection-focus-expected.html
    A LayoutTests/http/tests/site-isolation/selection-focus.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/page/FocusController.cpp
    M Source/WebCore/page/FocusController.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp

  Log Message:
  -----------
  Make selection focus work with site isolation
https://bugs.webkit.org/show_bug.cgi?id=262653
rdar://116486773

Reviewed by Alex Christensen.

In 268570 at main I added `FocusController::updateFocusedFrame()` to avoid an IPC loop when broadcasting the
focused frame to other site-isolated frames. `FocusController::setFocusedFrame()` sets other things that
should also be kept up to date in all web processes such as selection focus, so we should just keep using
that. Avoid the IPC loop by adding a `broadcastFocusedFrame` bool that we set to false when we don’t need
to notify the UI process that a frame was updated.

* LayoutTests/http/tests/site-isolation/resources/selected-text.html: Added.
* LayoutTests/http/tests/site-isolation/selection-focus-expected.html: Added.
* LayoutTests/http/tests/site-isolation/selection-focus.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* Source/WebCore/page/FocusController.cpp:
(WebCore::FocusController::setFocusedFrame):
* Source/WebCore/page/FocusController.h:
(WebCore::FocusController::updateFocusedFrame): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::frameWasFocusedInAnotherProcess):

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




More information about the webkit-changes mailing list