1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:47:44 +00:00

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
parent 8bdc6f5390
commit 4cbec00c44
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 {