Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Take
min/max-height
into account in get_min_max_width
for images
This includes a rework of the size calculations for images, so that min/max constraints are always honored. Previously, constraints were ignored in some cases to maintain aspect ratio. See the last part of the section on min/max widths in [1] for the spec on the matter. TODO: While the containing block is not set yet on the frame during min/max-width determination, it can already be determined in some cases due to fixed dimensions on the ancestor forming the containing block. In such cases, percentage values could be resolved already. This needs more consideration, e.g. in regards to min/max dimensions on the parent and percentages, which could necessitate checking further ancestors. Maybe `get_min_max_width` could receive preliminary containing-block dimensions, which would still be undefined if an `auto` width/height is encountered. [1] https://www.w3.org/TR/CSS21/visudet.html#min-max-widths Fixes #2738
- Loading branch information
Showing
7 changed files
with
273 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.