[webkit-changes] [WebKit/WebKit] f789f5: postMessage from RemoteFrame should have correct e...

Alex Christensen noreply at github.com
Wed Nov 29 15:19:24 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f789f598d0b3e69d2fcaffd9135a50dbe5fd70f0
      https://github.com/WebKit/WebKit/commit/f789f598d0b3e69d2fcaffd9135a50dbe5fd70f0
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2023-11-29 (Wed, 29 Nov 2023)

  Changed paths:
    M LayoutTests/http/tests/site-isolation/post-message-expected.txt
    M LayoutTests/http/tests/site-isolation/post-message.html
    M Source/WebCore/page/LocalDOMWindow.cpp
    M Source/WebCore/page/LocalDOMWindow.h
    M Source/WebCore/page/RemoteDOMWindow.cpp
    M Source/WebCore/page/RemoteFrameClient.h
    M Source/WebKit/UIProcess/WebProcessProxy.cpp
    M Source/WebKit/UIProcess/WebProcessProxy.h
    M Source/WebKit/UIProcess/WebProcessProxy.messages.in
    M Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.h
    M Source/WebKit/WebProcess/WebProcess.cpp
    M Source/WebKit/WebProcess/WebProcess.h
    M Source/WebKit/WebProcess/WebProcess.messages.in

  Log Message:
  -----------
  postMessage from RemoteFrame should have correct event.source
https://bugs.webkit.org/show_bug.cgi?id=265543
rdar://118946789

Reviewed by Pascoe.

event.source should be the DOMWindow of the frame that sent the message,
even if it is a RemoteDOMWindow.  It shouldn't be the DOMWindow of the
frame that is receiving the message.

* LayoutTests/http/tests/site-isolation/post-message-expected.txt:
* LayoutTests/http/tests/site-isolation/post-message.html:
* Source/WebCore/page/LocalDOMWindow.cpp:
(WebCore::LocalDOMWindow::postMessageFromRemoteFrame):
* Source/WebCore/page/LocalDOMWindow.h:
* Source/WebCore/page/RemoteDOMWindow.cpp:
(WebCore::RemoteDOMWindow::postMessage):
* Source/WebCore/page/RemoteFrameClient.h:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::postMessageToRemote):
* Source/WebKit/UIProcess/WebProcessProxy.h:
* Source/WebKit/UIProcess/WebProcessProxy.messages.in:
* Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.cpp:
(WebKit::WebRemoteFrameClient::postMessageToRemote):
* Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.h:
* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::remotePostMessage):
* Source/WebKit/WebProcess/WebProcess.h:
* Source/WebKit/WebProcess/WebProcess.messages.in:

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




More information about the webkit-changes mailing list