WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
235058
automatic minimum block-size aspect-ratio rules should not apply to replaced elements
https://bugs.webkit.org/show_bug.cgi?id=235058
Summary
automatic minimum block-size aspect-ratio rules should not apply to replaced ...
Cameron McCormack (:heycam)
Reported
2022-01-10 19:57:34 PST
We apply the
https://www.w3.org/TR/css-sizing-4/#aspect-ratio-minimum
rule in RenderBox::constrainLogicalHeightByMinMax and RenderBox::constrainLogicalWidthInFragmentByMinMax, but we don't correctly check first that the element is non-replaced. For RenderBox::constrainLogicalHeightByMinMax, this can have the effect of increasing the computed min-height of a replaced element with an aspect-ratio to intrinsicContentHeight, if the element has a child. (The code that increases the automatic min-height to at least intrinsicContentHeight seems to be part of the unwritten rules about how `min-content: auto` applies to block elements.) Normally, replaced elements don't have children, but the way we check (looking at `firstChild()`) can return true for <video> elements with controls, <img> elements that have text recognition overlays, and possibly other cases where a UA shadow root has been attached.
Attachments
Patch
(7.11 KB, patch)
2022-01-10 21:18 PST
,
Cameron McCormack (:heycam)
no flags
Details
Formatted Diff
Diff
Patch
(7.18 KB, patch)
2022-01-12 15:51 PST
,
Cameron McCormack (:heycam)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Cameron McCormack (:heycam)
Comment 1
2022-01-10 20:05:14 PST
rdar://85505101
Cameron McCormack (:heycam)
Comment 2
2022-01-10 21:18:24 PST
Created
attachment 448830
[details]
Patch
Cameron McCormack (:heycam)
Comment 3
2022-01-12 15:51:36 PST
Created
attachment 449009
[details]
Patch
cathiechen
Comment 4
2022-01-12 18:30:36 PST
Comment on
attachment 449009
[details]
Patch Hi Cameron, thanks for working on this! The patch looks good to me.
zalan
Comment 5
2022-01-13 16:07:22 PST
Comment on
attachment 449009
[details]
Patch rs=me
EWS
Comment 6
2022-01-13 18:54:32 PST
Committed
r288003
(
246029@main
): <
https://commits.webkit.org/246029@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 449009
[details]
.
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