Revert "compositor: Unify the cross process and in-process API (#36443)" (#36533)

This reverts commit 4c55104b36.

This commit introduced an issue where messages from script to the
compositor no longer woke up the embedder. There is a larger issue
here, but this change exacerbated it.

Fixes #36528.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-04-15 11:15:14 +02:00 committed by GitHub
parent f8b6b9f7b6
commit fe4306fc30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 215 additions and 95 deletions

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use compositing_traits::CompositorMsg;
use compositing_traits::CrossProcessCompositorMessage;
use dom_struct::dom_struct;
use euclid::Size2D;
use profile_traits::ipc;
@ -41,7 +41,7 @@ impl Screen {
self.window
.compositor_api()
.sender()
.send(CompositorMsg::GetScreenSize(
.send(CrossProcessCompositorMessage::GetScreenSize(
self.window.webview_id(),
sender,
))
@ -57,7 +57,7 @@ impl Screen {
self.window
.compositor_api()
.sender()
.send(CompositorMsg::GetAvailableScreenSize(
.send(CrossProcessCompositorMessage::GetAvailableScreenSize(
self.window.webview_id(),
sender,
))

View file

@ -1899,7 +1899,10 @@ impl Window {
let (sender, receiver) =
ProfiledIpc::channel::<DeviceIndependentIntRect>(timer_profile_chan).unwrap();
let _ = self.compositor_api.sender().send(
compositing_traits::CompositorMsg::GetClientWindowRect(self.webview_id(), sender),
compositing_traits::CrossProcessCompositorMessage::GetClientWindowRect(
self.webview_id(),
sender,
),
);
let rect = receiver.recv().unwrap_or_default();
(