Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e6378110c18b876c4eb40c0c905ac117b4dd2d34
https://github.com/WebKit/WebKit/commit/e6378110c18b876c4eb40c0c905ac117b4dd2d34
Author: Kiet Ho <[email protected]>
Date: 2026-06-10 (Wed, 10 Jun 2026)
Changed paths:
A
LayoutTests/http/tests/intersection-observer/resources/root-margin-with-zoom-subframe.html
A
LayoutTests/http/tests/intersection-observer/resources/zoomed-page-subframe.html
A
LayoutTests/http/tests/intersection-observer/root-margin-with-zoom-iframe-same-origin-expected.txt
A
LayoutTests/http/tests/intersection-observer/root-margin-with-zoom-iframe-same-origin.html
A
LayoutTests/http/tests/intersection-observer/zoomed-page-iframe-cross-origin-expected.txt
A
LayoutTests/http/tests/intersection-observer/zoomed-page-iframe-cross-origin.html
A
LayoutTests/http/tests/intersection-observer/zoomed-page-iframe-same-origin-expected.txt
A
LayoutTests/http/tests/intersection-observer/zoomed-page-iframe-same-origin.html
A
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/root-margin-in-same-origin-iframe-subframe.html
A
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/root-margin-in-same-origin-iframe-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/root-margin-in-same-origin-iframe.html
M LayoutTests/intersection-observer/zoomed-visual-viewport.html
M LayoutTests/platform/ios-site-isolation/TestExpectations
M LayoutTests/platform/mac-site-isolation/TestExpectations
M Source/WebCore/page/IntersectionObserver.cpp
Log Message:
-----------
[Re-land] [Site Isolation] [intersection-observer] Make converting from main
frame local to absolute coordinate SI-safe
rdar://178652266
https://bugs.webkit.org/show_bug.cgi?id=316270
Reviewed by Simon Fraser.
This is a re-land of 313774@main which got reverted in 314529@main.
Original message follows:
In some places, IntersectionObserver::computeIntersectionState calls
localToAbsoluteQuad() on the root renderer. In Site Isolation mode, if the
root is
implicit (meaning the root is the main frame) and the intersection observer
is in
a cross-site frame, then the observer lives in a different process than the
main
frame and won't have access to the root renderer (the main frame's
RenderView).
Hence we need a way to make it work.
Normally the RenderView local coordinates is already absolute, but
pinch-to-zoom
puts a page scale transform on the RenderView, which makes the local and
absolute
coordinate different (see the attempt at 303055@main that got reverted at
306392@main). This patch applies the page scale to the local coordinate to
convert
it to absolute. The page scale is fetched from the Page object and is
synchronized
between processes.
It got reverted because a condition that should've been PLATFORM(IOS_FAMILY) is
PLATFORM(IOS) instead, which causes regression on visionOS (is IOS_FAMILY but
not IOS)
Fix this in the reland.
Given that intersection observer is used everywhere, and we've had to revert
twice (!)
for the same issue, make this change extra safe by creating a non-SI and SI
path.
The non-SI path still uses localToAbsoluteQuad, while the SI path uses the
approach
added in this patch. This way, there're no behavioral changes in non-SI cases.
Tests:
http/tests/intersection-observer/root-margin-with-zoom-iframe-same-origin.html
http/tests/intersection-observer/zoomed-page-iframe-cross-origin.html
http/tests/intersection-observer/zoomed-page-iframe-same-origin.html
imported/w3c/web-platform-tests/intersection-observer/root-margin-in-same-origin-iframe.html
*
LayoutTests/http/tests/intersection-observer/resources/root-margin-with-zoom-subframe.html:
Added.
*
LayoutTests/http/tests/intersection-observer/resources/zoomed-page-subframe.html:
Added.
*
LayoutTests/http/tests/intersection-observer/root-margin-with-zoom-iframe-same-origin-expected.txt:
Added.
*
LayoutTests/http/tests/intersection-observer/root-margin-with-zoom-iframe-same-origin.html:
Added.
- Add a test that checks that root margin is applied when the intersection
observer
is in a same-origin iframe, and the whole page is zoomed.
*
LayoutTests/http/tests/intersection-observer/zoomed-page-iframe-cross-origin-expected.txt:
Added.
*
LayoutTests/http/tests/intersection-observer/zoomed-page-iframe-cross-origin.html:
Added.
- Add a test that checks that intersection observer works when the observer
is in a cross-origin iframe, and the whole page is zoomed.
*
LayoutTests/http/tests/intersection-observer/zoomed-page-iframe-same-origin-expected.txt:
Added.
*
LayoutTests/http/tests/intersection-observer/zoomed-page-iframe-same-origin.html:
Added.
- Add a test that checks that intersection observer works when the observer
is in a same-origin iframe, and the whole page is zoomed.
*
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/root-margin-in-same-origin-iframe-subframe.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/root-margin-in-same-origin-iframe-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/root-margin-in-same-origin-iframe.html:
Added.
- Add a test that checks that root margin is applied when the intersection
observer
is in a same-origin iframe.
* LayoutTests/intersection-observer/zoomed-visual-viewport.html:
- Fix assert messages - some asserts expect true but the message says it
should be false,
and vice versa.
* LayoutTests/platform/ios-site-isolation/TestExpectations:
* LayoutTests/platform/mac-site-isolation/TestExpectations:
- Mark
LayoutTests/http/tests/intersection-observer/zoomed-page-iframe-cross-origin.html
as failed - Intersection Observer x Site Isolation currently doesn't work
as there're
some more work to do.
* Source/WebCore/page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::computeIntersectionState const):
Canonical link: https://commits.webkit.org/315001@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications