diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-04-17 20:30:49 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-19 18:25:18 +0200 |
commit | 4ddacf4740052f0d1ed34a08c95fe82a05c462bf (patch) | |
tree | 5dfc87b2841c89a91a9c2a0cb5440b4aa8acf0d6 /Userland | |
parent | e3b557fa6446849434ea9e77aed29d6eaa07f311 (diff) | |
download | serenity-4ddacf4740052f0d1ed34a08c95fe82a05c462bf.zip |
LibWeb: Verify we don't accidentally create an `auto` LengthStyleValue
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/StyleValues/LengthStyleValue.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/LengthStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/LengthStyleValue.cpp index 15f24b324e..5cdf60da94 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValues/LengthStyleValue.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleValues/LengthStyleValue.cpp @@ -13,10 +13,7 @@ namespace Web::CSS { ValueComparingNonnullRefPtr<LengthStyleValue> LengthStyleValue::create(Length const& length) { - if (length.is_auto()) { - static auto value = adopt_ref(*new LengthStyleValue(CSS::Length::make_auto())); - return value; - } + VERIFY(!length.is_auto()); if (length.is_px()) { if (length.raw_value() == 0) { static auto value = adopt_ref(*new LengthStyleValue(CSS::Length::make_px(0))); |