Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b0f444c6149c18fcbfa7f435f6c224ce394b13a6
https://github.com/WebKit/WebKit/commit/b0f444c6149c18fcbfa7f435f6c224ce394b13a6
Author: Ahmad Saleem <[email protected]>
Date: 2026-01-09 (Fri, 09 Jan 2026)
Changed paths:
A LayoutTests/fast/css/video-poster-zoom-expected.txt
A LayoutTests/fast/css/video-poster-zoom.html
M Source/WebCore/rendering/RenderVideo.cpp
Log Message:
-----------
Fix double-zoom issue with video poster images
https://bugs.webkit.org/show_bug.cgi?id=292415
rdar://150976146
Reviewed by Brent Fulgham.
Inspired by:
https://chromium.googlesource.com/chromium/src/+/75dc85b2a87137b90854ff8b3a16ed6da5081ac8
m_cachedImageSize already contains zoom-scaled dimensions when cached in
imageChanged(). Applying zoom again in calculateIntrinsicSize() caused
poster images to be incorrectly double-scaled.
Move poster size handling to calculateIntrinsicSize() to return the
cached size directly without additional scaling. Only apply zoom to
unscaled sizes from calculateIntrinsicSizeInternal().
* Source/WebCore/rendering/RenderVideo.cpp:
(WebCore::RenderVideo::calculateIntrinsicSizeInternal):
(WebCore::RenderVideo::calculateIntrinsicSize):
* LayoutTests/fast/css/video-poster-zoom-expected.txt: Added.
* LayoutTests/fast/css/video-poster-zoom.html: Added.
Canonical link: https://commits.webkit.org/305347@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications