Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 00dd50aa571465067bb054efe20518947ed6a9a5
https://github.com/WebKit/WebKit/commit/00dd50aa571465067bb054efe20518947ed6a9a5
Author: Andy Estes <[email protected]>
Date: 2026-07-30 (Thu, 30 Jul 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/offset-iframe-cross-origin-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/offset-iframe-cross-origin.html
A
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/offset-iframe-same-origin-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/offset-iframe-same-origin.html
A
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/offset-iframe-subframe.html
A
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/offset-iframe.js
M Source/WebCore/page/LocalFrameView.cpp
Log Message:
-----------
[Site Isolation] Embedded YouTube videos on yahoo.com fail to render
https://bugs.webkit.org/show_bug.cgi?id=320588
rdar://177423546
Reviewed by Kiet Ho.
As of 311380@main we gate accelerated video rendering on the video element
intersecting the
viewport (by using an IntersectionObserver). If the observer never reports the
video as
intersecting, a video layer is never attached and decoded frames are dropped,
so the video plays
audio but shows no frames.
For a video in a cross-origin iframe with Site Isolation enabled, the observer
computes
intersection from geometry sent over by the parent frame's process. That
geometry was wrong on some
yahoo.com pages, so the video was reported as never intersecting even while
fully within the
viewport.
The process that contains the iframe computes the frame's visible rect in
LocalFrameView::visibleRectOfChild by passing the iframe's rect to
computeVisibleRectsInContainer.
That function expects a rect in the iframe's own coordinate space, but we were
passing it a rect in
its container's coordinate space. This resulted in the iframe's offset position
being applied
twice, resulting in an IntersectionObserver believing that elements within the
iframe were too far
down to intersect the viewport.
Resolved this by passing borderBoxRect() (i.e. a rect in the element's own
coordinate space) to
computeVisibleRectsInContainer, matching other call sites.
Tests:
imported/w3c/web-platform-tests/intersection-observer/offset-iframe-cross-origin.html
imported/w3c/web-platform-tests/intersection-observer/offset-iframe-same-origin.html
*
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/offset-iframe-cross-origin-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/offset-iframe-cross-origin.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/offset-iframe-same-origin-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/offset-iframe-same-origin.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/offset-iframe-subframe.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/offset-iframe.js:
Added.
(runOffsetIframeTest.):
(runOffsetIframeTest):
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::visibleRectOfChild const):
Canonical link: https://commits.webkit.org/318254@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications