[Webkit-unassigned] [Bug 235058] New: automatic minimum block-size aspect-ratio rules should not apply to replaced elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 10 19:57:34 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=235058

            Bug ID: 235058
           Summary: automatic minimum block-size aspect-ratio rules should
                    not apply to replaced elements
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: heycam at apple.com
                CC: bfulgham at webkit.org, cathiechen at igalia.com,
                    simon.fraser at apple.com, zalan at apple.com

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220111/598c87e4/attachment.htm>


More information about the webkit-unassigned mailing list