[webkit-changes] [WebKit/WebKit] 416ade: REGRESSION (253225 at main): ASSERT_NOT_REACHED in Im...
Wenson Hsieh
noreply at github.com
Sat Aug 31 19:18:32 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 416adec17dd115c48a7821dd48392703d12b7625
https://github.com/WebKit/WebKit/commit/416adec17dd115c48a7821dd48392703d12b7625
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2024-08-31 (Sat, 31 Aug 2024)
Changed paths:
M Source/WebCore/dom/ImageOverlay.cpp
Log Message:
-----------
REGRESSION (253225 at main): ASSERT_NOT_REACHED in ImageOverlay updateSubtree()
https://bugs.webkit.org/show_bug.cgi?id=252302
rdar://105486027
Reviewed by Richard Robinson.
After the changes in https://commits.webkit.org/253225@main, installing the user agent shadow root
on `HTMLMediaElement` no longer ensures that media controls host elements are also created. As such,
the debug assertions which try to verify that the media controls host and controls container `div`
have been created fail, and we crash when installing Live Text in a `video` with no controls.
The intention behind this logic is to determine whether Live Text should be injected underneath the
user agent shadow root or under the media controls container in the user agent shadow root, so that
Live Text doesn't overlap the fullscreen/PiP buttons or the slider (and the controls around it).
However, it's actually not necessary in this case to create and add media controls up front, since
we'll (correctly) add the media controls _over_ the image overlay anyways, in the case where the
controls haven't been created yet. If the controls _have_ already been created, then we should get a
non-null `mediaControlsContainer`.
Address this debug assert by checking if the media controls container `div` had already been created
without ensuring the user agent shadow root up front in `updateSubtree`.
This fixes several flaky layout tests in `media/modern-media-controls/tracks-support`.
* Source/WebCore/dom/ImageOverlay.cpp:
(WebCore::ImageOverlay::updateSubtree):
Canonical link: https://commits.webkit.org/283030@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list