mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibWeb: Apply nowrap attribute as presentational hint
This commit is contained in:
committed by
Sam Atkins
parent
a4ee3fb1f0
commit
d3c51ea05e
@@ -47,6 +47,7 @@ bool HTMLTableCellElement::is_presentational_hint(FlyString const& name) const
|
||||
HTML::AttributeNames::background,
|
||||
HTML::AttributeNames::bgcolor,
|
||||
HTML::AttributeNames::height,
|
||||
HTML::AttributeNames::nowrap,
|
||||
HTML::AttributeNames::valign,
|
||||
HTML::AttributeNames::width);
|
||||
}
|
||||
@@ -92,6 +93,9 @@ void HTMLTableCellElement::apply_presentational_hints(GC::Ref<CSS::CascadedPrope
|
||||
if (auto parsed_value = document().encoding_parse_url(value); parsed_value.has_value())
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::BackgroundImage, CSS::ImageStyleValue::create(*parsed_value));
|
||||
return;
|
||||
} else if (name == HTML::AttributeNames::nowrap) {
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::WhiteSpace, CSS::CSSKeywordValue::create(CSS::Keyword::Nowrap));
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user