mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:37:42 +00:00
LibWeb: Verify we don't accidentally create an auto
LengthStyleValue
This commit is contained in:
parent
e3b557fa64
commit
4ddacf4740
1 changed files with 1 additions and 4 deletions
|
@ -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)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue