mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 22:52:10 +02:00
LibWeb: Map dimension attributes for table elements
(cherry picked from commit 140dc95e6769a41542f98abef333d5bc32b86e39)
This commit is contained in:
committed by
Nico Weber
parent
ea8914aeac
commit
be7110a3a4
@@ -48,15 +48,15 @@ void HTMLTableRowElement::apply_presentational_hints(CSS::StyleProperties& style
|
||||
auto color = parse_legacy_color_value(value);
|
||||
if (color.has_value())
|
||||
style.set_property(CSS::PropertyID::BackgroundColor, CSS::CSSColorValue::create_from_color(color.value()));
|
||||
return;
|
||||
} else if (name == HTML::AttributeNames::background) {
|
||||
if (auto parsed_value = document().parse_url(value); parsed_value.is_valid())
|
||||
style.set_property(CSS::PropertyID::BackgroundImage, CSS::ImageStyleValue::create(parsed_value));
|
||||
return;
|
||||
} else if (name == HTML::AttributeNames::height) {
|
||||
if (auto parsed_value = parse_dimension_value(value))
|
||||
style.set_property(CSS::PropertyID::Height, *parsed_value);
|
||||
} else if (name == HTML::AttributeNames::valign) {
|
||||
if (auto parsed_value = parse_css_value(CSS::Parser::ParsingContext { document() }, value, CSS::PropertyID::VerticalAlign))
|
||||
style.set_property(CSS::PropertyID::VerticalAlign, parsed_value.release_nonnull());
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user