mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-25 09:04:53 +00:00
LibWeb: Turn <td bgcolor> into background-color
This commit is contained in:
@@ -37,4 +37,15 @@ HTMLTableCellElement::~HTMLTableCellElement()
|
||||
{
|
||||
}
|
||||
|
||||
void HTMLTableCellElement::apply_presentational_hints(StyleProperties& style) const
|
||||
{
|
||||
for_each_attribute([&](auto& name, auto& value) {
|
||||
if (name == HTML::AttributeNames::bgcolor) {
|
||||
auto color = Color::from_string(value);
|
||||
if (color.has_value())
|
||||
style.set_property(CSS::PropertyID::BackgroundColor, ColorStyleValue::create(color.value()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user