Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8eb66859e569c49f0dd54d7cf7eedd9c9f760ab9
https://github.com/WebKit/WebKit/commit/8eb66859e569c49f0dd54d7cf7eedd9c9f760ab9
Author: Kiet Ho <[email protected]>
Date: 2026-05-22 (Fri, 22 May 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:
-----------
[Site Isolation] [intersection-observer] Make converting from main frame
local to absolute coordinate SI-safe
rdar://177029615
https://bugs.webkit.org/show_bug.cgi?id=314778
Reviewed by Simon Fraser.
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.
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/313774@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications