mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibWeb: Support align attribute on table elements
This commit is contained in:
committed by
Andreas Kling
parent
7a766bdb83
commit
a54e62bea0
@@ -61,6 +61,15 @@ void HTMLTableElement::apply_presentational_hints(CSS::StyleProperties& style) c
|
||||
style.set_property(CSS::PropertyID::Height, parsed_value.release_nonnull());
|
||||
return;
|
||||
}
|
||||
if (name == HTML::AttributeNames::align) {
|
||||
if (value.equals_ignoring_ascii_case("center"sv)) {
|
||||
style.set_property(CSS::PropertyID::MarginLeft, CSS::IdentifierStyleValue::create(CSS::ValueID::Auto));
|
||||
style.set_property(CSS::PropertyID::MarginRight, CSS::IdentifierStyleValue::create(CSS::ValueID::Auto));
|
||||
} else if (auto parsed_value = parse_css_value(CSS::Parser::ParsingContext { document() }, value.view(), CSS::PropertyID::Float)) {
|
||||
style.set_property(CSS::PropertyID::Float, parsed_value.release_nonnull());
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (name == HTML::AttributeNames::bgcolor) {
|
||||
// https://html.spec.whatwg.org/multipage/rendering.html#tables-2:rules-for-parsing-a-legacy-colour-value
|
||||
auto color = parse_legacy_color_value(value);
|
||||
|
||||
Reference in New Issue
Block a user