Ver Fonte

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.
Andreas Kling há 3 anos atrás
pai
commit
1fa5fba432
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      Userland/Libraries/LibWeb/CSS/StyleValue.h

+ 1 - 1
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;