summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-26 13:19:22 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-26 13:25:52 +0200
commit1fa5fba432c338e5e5924feb9e82fa22b22e098b (patch)
treedefec3f79eccde2243f34bd7d17401ff159511f1 /Userland/Libraries
parent243e9a8b4a3e66cf8a5556ed6f5e8051c6d57b0b (diff)
downloadserenity-1fa5fba432c338e5e5924feb9e82fa22b22e098b.zip
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.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValue.h2
1 files changed, 1 insertions, 1 deletions
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;