Closed Bug 2089404 Opened 14 days ago Closed

[wpt-sync] Sync PR 64438 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=320588

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 64438 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64438
Details from upstream follow.

Andy Estes <aestes@apple.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=320588

WebKit export from bug: [<!---->Site Isolation]<!----> Embedded YouTube videos on yahoo.<!---->com fail to render

<pre>
[Site Isolation] Embedded YouTube videos on yahoo.com fail to render

As of <a href="https://commits.webkit.org/311380@main">311380@main</a> 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.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=320588">https://bugs.webkit.org/show_bug.cgi?id=320588</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/318254@main">https://commits.webkit.org/318254@main</a>
</pre>

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → Layout
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 10 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 156 tests

Status Summary

Firefox

OK : 2[GitHub] 151[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 2[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, GitHub] 331[Gecko-android-em-14-x86_64-lite-opt-geckoview] 332[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 337[Gecko-windows11-32-25h2-debug] 338[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 339[Gecko-linux2404-64-debug] 340[Gecko-linux2404-64-opt]
FAIL : 97[Gecko-linux2404-64-opt] 98[Gecko-linux2404-64-debug] 99[Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 105[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 106[Gecko-android-em-14-x86_64-lite-opt-geckoview]
TIMEOUT: 2
ERROR : 2

Chrome

OK : 2
PASS : 2

Safari

OK : 2
PASS : 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 6 days ago
Closed: 6 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.