LibWeb: Actually check if percentage used flex basis is definite

Previously, we considered all LengthPercentage values for used flex
basis to be definite. This is not accurate, as percentages should only
be considered definite if the reference value they resolve against is
a definite size.

Fix this by checking the flex container's main definite size flag.
This commit is contained in:
Andreas Kling 2022-07-19 13:34:21 +02:00
commit 4cbec00c44
Notes: sideshowbarker 2024-07-17 08:34:23 +09:00
3 changed files with 15 additions and 4 deletions

View file

@ -98,8 +98,6 @@ struct TransformOrigin {
struct FlexBasisData {
CSS::FlexBasis type { CSS::FlexBasis::Auto };
Optional<CSS::LengthPercentage> length_percentage;
bool is_definite() const { return type == CSS::FlexBasis::LengthPercentage; }
};
struct ShadowData {