Files
ladybird/Tests/LibWeb/Layout/input/img-max-width-border-box.html
Shannon Booth af03e07f90 LibWeb: Clamp replaced element min/max sizes in the content box space
The replaced element sizing code was comparing tentative used sizes
min-width/min-height and max-width/max-height. For box-sizing:
border-box, that mixes content-box and border-box measurements, which
can clamp replaced-like elements incorrectly.

This could make, for example search/text inputs with explicit height
and padding render too short.

Resolve min/max constraints with calculate_inner_width() and
calculate_inner_height() before clamping so the comparison uses
the same inner sizing space as the tentative replaced size.

Fixes the sizing of the search bar on:

https://tv.apple.com/se
2026-04-06 12:35:12 +02:00

11 lines
165 B
HTML

<!DOCTYPE html>
<style>
img {
box-sizing: border-box;
border: 10px solid;
padding: 5px;
max-width: 80px;
}
</style>
<img src="../../Assets/120.png">