1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:18:12 +00:00

LibWeb: Make the base StyleValue::to_length() return an undefined length

Previously it was returning an "auto" length. This caused all the new
"initial" values to effectively turn into auto values long before layout
had a chance to resolve them.

This broke replaced elements with intrinsic size but no specified width
or height, and is the reason that Mr. ACID2 temporarily lost his eyes.
This commit is contained in:
Andreas Kling 2021-08-26 13:19:22 +02:00
parent 243e9a8b4a
commit 1fa5fba432

View file

@ -276,7 +276,7 @@ public:
}
virtual String to_string() const = 0;
virtual Length to_length() const { return Length::make_auto(); }
virtual Length to_length() const { return {}; }
virtual Color to_color(const DOM::Document&) const { return {}; }
CSS::ValueID to_identifier() const;