WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
308075
Fix replaced elements minimum height and width issues
https://bugs.webkit.org/show_bug.cgi?id=308075
Summary
Fix replaced elements minimum height and width issues
Ahmad Saleem
Reported
2026-02-17 13:30:27 PST
Hi Team, While looking into browser specific failures / when I imported tests, I noticed that we fail quite a few replaced elements test cases: WPT Test Case -
https://wpt.fyi/results/css/CSS2/visudet?label=master&label=experimental&aligned&q=safari%3Afail%20chrome%3Apass%20firefox%3Apass%20replaced-elements
WPT Test Case Live Link -
http://wpt.live/css/CSS2/visudet/replaced-elements-min-height-20.html
,
http://wpt.live/css/CSS2/visudet/replaced-elements-min-height-40.html
,
http://wpt.live/css/CSS2/visudet/replaced-elements-min-width-40.html
and
http://wpt.live/css/CSS2/visudet/replaced-elements-min-width-80.html
^ Safari Technology Preview 237 fails them (few cases within each test). This is just tracking bug, sow e can fix them. Thanks!
Attachments
replaced-elements-min-height-20 testcase
(3.58 KB, text/html)
2026-02-19 16:49 PST
,
Karl Dubost
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Karl Dubost
Comment 1
2026-02-19 16:15:55 PST
In
http://wpt.live/css/CSS2/visudet/replaced-elements-min-height-20.html
<style type="text/css"> div { width: 200px } img { min-height: 20px } </style> </head> <div> <img src="support/height-25-width-50.svg">, <img src="support/height-25-ratio-2.svg">, <img src="support/width-50-ratio-2.svg">, <img src="support/height-25-no-ratio.svg">, <img src="support/width-50-no-ratio.svg">, <img src="support/ratio-2.svg">, <img src="support/no-ratio.svg">. </div> These two are FAILing <svg xmlns="
http://www.w3.org/2000/svg
" version="1.1" viewBox="0 0 1000 500" height="25" preserveAspectRatio="none"> <rect fill="fuchsia" x="0" y="0" width="1000" height="500" /> </svg> <svg xmlns="
http://www.w3.org/2000/svg
" version="1.1" viewBox="0 0 1000 500" preserveAspectRatio="none"> <rect fill="gray" x="0" y="0" width="1000" height="500" /> </svg> The others seem to PASS, for example <svg xmlns="
http://www.w3.org/2000/svg
" version="1.1" height="25" width="50" viewBox="0 0 1000 1000" preserveAspectRatio="none"> <rect fill="black" x="0" y="0" width="1000" height="1000" /> </svg> <svg xmlns="
http://www.w3.org/2000/svg
" version="1.1" height="25" preserveAspectRatio="none"> <rect fill="blue" x="0" y="0" width="100%" height="100%" /> </svg> <svg xmlns="
http://www.w3.org/2000/svg
" version="1.1" preserveAspectRatio="none"> <rect fill="aqua" x="0" y="0" width="100%" height="100%" /> </svg> I wonder if this test should be rewritten in a way which is easier to deal with. :)
Karl Dubost
Comment 2
2026-02-19 16:49:51 PST
Created
attachment 478412
[details]
replaced-elements-min-height-20 testcase Here Probably a better test case not dependent on a ref. It would be good to make sure that the expectations are right.
Radar WebKit Bug Importer
Comment 3
2026-02-19 17:22:21 PST
<
rdar://problem/170765025
>
Ahmad Saleem
Comment 4
2026-02-19 17:24:16 PST
Pull request:
https://github.com/WebKit/WebKit/pull/59045
EWS
Comment 5
2026-02-25 10:01:11 PST
Committed
308212@main
(1eee13b1ae99): <
https://commits.webkit.org/308212@main
> Reviewed commits have been landed. Closing PR #59045 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug