Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1807913583ffa26dc3f24488c3258a0b81ddf8d3
https://github.com/WebKit/WebKit/commit/1807913583ffa26dc3f24488c3258a0b81ddf8d3
Author: Sammy Gill <[email protected]>
Date: 2025-12-11 (Thu, 11 Dec 2025)
Changed paths:
A
LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-zoomed-expected.txt
A
LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-zoomed.html
M Source/WebCore/rendering/RenderReplaced.cpp
Log Message:
-----------
REGRESSION (302241@main): Media controls dimming element is too big after
zooming.
https://bugs.webkit.org/show_bug.cgi?id=303935
rdar://166092545
Reviewed by Vitor Roriz.
A video element, such as the one in the attached testcase, will create a
shadow DOM to hold the contents associated with its media controls. We
enter layout for the associated video inside of RenderVideo::layout and
eventually end up inside of RenderImage::layout to layout this shadow
DOM via the call to layoutShadowContent.
As part of this process, we will take the used value of the renderer and
mutate the RenderStyle of its children by setting the width and height
sizes to these values. However, since these are used values they have
already been affected by zoom so just directly setting them on the
RenderStyle will result in double zooming whenever those values get used
during layout. This is what ends up causing the media controls container
to grow larger than the video it is attached to. To fix this we will
need to divide out the zoom from these sizes so they get properly resolved.
Canonical link: https://commits.webkit.org/304299@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications