Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 61b11e2e9afe52d025b99dc454a16912843b4ee9
https://github.com/WebKit/WebKit/commit/61b11e2e9afe52d025b99dc454a16912843b4ee9
Author: Youenn Fablet <[email protected]>
Date: 2026-09-03 (Thu, 03 Sep 2026)
Changed paths:
A
LayoutTests/fast/mediastream/MediaStream-video-element-cross-document-intersection-observer-expected.txt
A
LayoutTests/fast/mediastream/MediaStream-video-element-cross-document-intersection-observer.html
M Source/WebCore/html/HTMLVideoElement.cpp
M Source/WebCore/testing/Internals.cpp
M Source/WebCore/testing/Internals.h
M Source/WebCore/testing/Internals.idl
Log Message:
-----------
dibsido QR scanner camera preview is not rendering
rdar://185205409
https://bugs.webkit.org/show_bug.cgi?id=323213
Reviewed by Jean-Yves Avenard.
311380@main added a LazyLoadVideoObserver to every <video> at construction time,
and gated HTMLVideoElement's accelerated rendering on the observer's
m_isIntersectingViewport signal.
This gets broken when the element is migrated to a new document since the
observer would stay bound to the previous document.
Video element would then no longer render as they would think they are not
visible in view port.
This notably applies to frameworks that parse HTML in an inert document.
We fix this by migrating the observer from the old document to the new document
in HTMLVideoElement::didMoveToNewDocument.
Test:
fast/mediastream/MediaStream-video-element-cross-document-intersection-observer.html
*
LayoutTests/fast/mediastream/MediaStream-video-element-cross-document-intersection-observer-expected.txt:
Added.
*
LayoutTests/fast/mediastream/MediaStream-video-element-cross-document-intersection-observer.html:
Added.
* Source/WebCore/html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::didMoveToNewDocument):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::isMediaElementIntersectingViewport const):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
Canonical link: https://commits.webkit.org/320405@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications