Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c764abbc57bcd536dafd963d5af0c95c7ff33887
https://github.com/WebKit/WebKit/commit/c764abbc57bcd536dafd963d5af0c95c7ff33887
Author: Kiet Ho <[email protected]>
Date: 2026-01-20 (Tue, 20 Jan 2026)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/Headers.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/page/Frame.cpp
M Source/WebCore/page/Frame.h
M Source/WebCore/page/FrameTreeSyncData.in
M Source/WebCore/page/FrameView.cpp
M Source/WebCore/page/FrameView.h
M Source/WebCore/page/IntersectionObserver.cpp
M Source/WebCore/page/LocalFrame.cpp
M Source/WebCore/page/LocalFrame.h
M Source/WebCore/page/LocalFrameView.cpp
M Source/WebCore/page/LocalFrameView.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/RemoteFrame.cpp
M Source/WebCore/page/RemoteFrame.h
A Source/WebCore/page/RemoteFrameLayoutInfo.h
M Source/WebCore/page/RemoteFrameView.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/UIProcess/WebFrameProxy.cpp
Log Message:
-----------
[site-isolation] Synchronize frameScaleFactor of remote child frames
rdar://168177060
https://bugs.webkit.org/show_bug.cgi?id=305517
Reviewed by Alex Christensen.
LocalFrame::frameScaleFactor might not be correct for cross-origin child frames,
because it depends on the CSS zoom factor of the owner renderer, which in the
case of cross-origin frames, isn't available with Site Isolation enabled. Fix
this by using FrameTreeSyncData to synchronize the CSS zoom factor, so that
frameScaleFactor can be computed in any processes.
Test: http/tests/site-isolation/page-zoom.html
* LayoutTests/TestExpectations:
* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/page/Frame.cpp:
(WebCore::Frame::frameScaleFactor const):
- Move from LocalFrame to Frame, since it can now be computed from both
Local/RemoteFrame
* Source/WebCore/page/Frame.h:
- Add Frame::usedZoomForChild(), which returns the CSS zoom factor for a
child frame.
LocalFrame computes this from the local layout info, while RemoteFrame
returns
the synchronized value.
* Source/WebCore/page/FrameTreeSyncData.in:
- Since we're synchronizing more information about child frames,
encapsulate them
in a new RemoteFrameLayoutInfo struct.
* Source/WebCore/page/FrameView.cpp:
(WebCore::FrameView::absoluteToLayoutViewportPoint const):
(WebCore::FrameView::layoutViewportToAbsolutePoint const):
(WebCore::FrameView::layoutViewportToAbsoluteRect const):
(WebCore::FrameView::absoluteToLayoutViewportRect const):
- Move from LocalFrameView to FrameView. These methods uses
frameScaleFactor(),
which is now available from Frame.
* Source/WebCore/page/FrameView.h:
* Source/WebCore/page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::updateObservations):
- Don't downcast hostFrameView to LocalFrameView, since
absoluteToLayoutViewportRect
is now accessible from a FrameView. This also makes the code work with
Site Isolation enabled.
* Source/WebCore/page/LocalFrame.cpp:
(WebCore::LocalFrame::usedZoomForChild const):
(WebCore::LocalFrame::frameScaleFactor const): Deleted.
* Source/WebCore/page/LocalFrame.h:
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::absoluteToLayoutViewportPoint const): Deleted.
(WebCore::LocalFrameView::layoutViewportToAbsolutePoint const): Deleted.
(WebCore::LocalFrameView::layoutViewportToAbsoluteRect const): Deleted.
(WebCore::LocalFrameView::absoluteToLayoutViewportRect const): Deleted.
* Source/WebCore/page/LocalFrameView.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::syncLocalFrameInfoToRemote):
- Add code to synchronize CSS zoom factor.
* Source/WebCore/page/RemoteFrame.cpp:
(WebCore::RemoteFrame::usedZoomForChild const):
* Source/WebCore/page/RemoteFrame.h:
* Source/WebCore/page/RemoteFrameLayoutInfo.h: Added.
- Add new struct that holds the synchronized layout info.
* Source/WebCore/page/RemoteFrameView.cpp:
(WebCore::RemoteFrameView::visibleRectOfChild const):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
- Add serialization code for RemoteFrameLayoutInfo struct.
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::calculateFrameTreeSyncData const):
Canonical link: https://commits.webkit.org/305911@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications