mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:47:37 +00:00
LibWeb: Forbid usage of indefinite width in calculate_min{max}_height
Changing `calculate_min_content_heigh()` and `calculate_min_content_heigh()` to accept width as `CSSPixels`, instead of `AvailableSize` that might be indefinite, makes it more explicit that width is supposed to be known by the time height is measured. This change has a bit of collateral damage which is rows height calculation regression in `table/inline-table-width` that worked before by accident.
This commit is contained in:
parent
9b61339261
commit
e25b1f76e1
8 changed files with 52 additions and 80 deletions
|
@ -164,14 +164,8 @@ struct LayoutState {
|
|||
Optional<CSSPixels> min_content_width;
|
||||
Optional<CSSPixels> max_content_width;
|
||||
|
||||
// NOTE: Since intrinsic heights depend on the amount of available width, we have to cache
|
||||
// three separate kinds of results, depending on the available width at the time of calculation.
|
||||
HashMap<CSSPixels, Optional<CSSPixels>> min_content_height_with_definite_available_width;
|
||||
HashMap<CSSPixels, Optional<CSSPixels>> max_content_height_with_definite_available_width;
|
||||
Optional<CSSPixels> min_content_height_with_min_content_available_width;
|
||||
Optional<CSSPixels> max_content_height_with_min_content_available_width;
|
||||
Optional<CSSPixels> min_content_height_with_max_content_available_width;
|
||||
Optional<CSSPixels> max_content_height_with_max_content_available_width;
|
||||
HashMap<CSSPixels, Optional<CSSPixels>> min_content_height;
|
||||
HashMap<CSSPixels, Optional<CSSPixels>> max_content_height;
|
||||
};
|
||||
|
||||
HashMap<JS::GCPtr<NodeWithStyleAndBoxModelMetrics const>, NonnullOwnPtr<IntrinsicSizes>> mutable intrinsic_sizes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue