From 1fa5fba432c338e5e5924feb9e82fa22b22e098b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 26 Aug 2021 13:19:22 +0200 Subject: 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. --- Userland/Libraries/LibWeb/CSS/StyleValue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Libraries') diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValue.h index 1ff81ecfca..4f40744a92 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValue.h +++ b/Userland/Libraries/LibWeb/CSS/StyleValue.h @@ -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; -- cgit v1.2.3