[Webkit-unassigned] [Bug 243321] [css-aspect-ratio] The transferred min/max sizes should be constrained by defined sizes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 1 13:21:20 PDT 2022


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

--- Comment #10 from Rob Buis <rbuis at igalia.com> ---
Comment on attachment 461335
  --> https://bugs.webkit.org/attachment.cgi?id=461335
WIP-patch

View in context: https://bugs.webkit.org/attachment.cgi?id=461335&action=review

> Source/WebCore/rendering/RenderBox.cpp:744
> +    return std::clamp(logicalWidth, computedMinWidth, computedMaxWidth);

Here we should take care to optimize the non preferred aspect ratio case, which should be the more common one.

> Source/WebCore/rendering/RenderBox.cpp:766
> +    LayoutUnit MaxH = computedLogicalMaxHeight ? computedLogicalMaxHeight.value() : LayoutUnit::max();

Variable names should not start with capitals.

> Source/WebCore/rendering/RenderBox.cpp:767
> +    LayoutUnit MinH = computedLogicalMinHeight ? computedLogicalMinHeight.value() : LayoutUnit();

Ditto.

> Source/WebCore/rendering/RenderBox.cpp:770
> +    return std::clamp(logicalHeight, MinH, MaxH);

See above.

-- 
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/20220801/4da76b45/attachment.htm>


More information about the webkit-unassigned mailing list