mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:17:34 +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)
|
ValueComparingNonnullRefPtr<LengthStyleValue> LengthStyleValue::create(Length const& length)
|
||||||
{
|
{
|
||||||
if (length.is_auto()) {
|
VERIFY(!length.is_auto());
|
||||||
static auto value = adopt_ref(*new LengthStyleValue(CSS::Length::make_auto()));
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
if (length.is_px()) {
|
if (length.is_px()) {
|
||||||
if (length.raw_value() == 0) {
|
if (length.raw_value() == 0) {
|
||||||
static auto value = adopt_ref(*new LengthStyleValue(CSS::Length::make_px(0)));
|
static auto value = adopt_ref(*new LengthStyleValue(CSS::Length::make_px(0)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue