mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb: Verify we don't accidentally create an auto
LengthStyleValue
This commit is contained in:
parent
e3b557fa64
commit
4ddacf4740
Notes:
sideshowbarker
2024-07-17 06:20:50 +09:00
Author: https://github.com/AtkinsSJ
Commit: 4ddacf4740
Pull-request: https://github.com/SerenityOS/serenity/pull/18430
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