mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 17:28:48 +00:00
LibWeb: Support valign
attribute on td
elements
This presentational hint maps to the CSS `vertical-align` property. Fixes #19786.
This commit is contained in:
parent
a75377d014
commit
477a96820d
Notes:
sideshowbarker
2024-07-17 04:32:07 +09:00
Author: https://github.com/awesomekling
Commit: 477a96820d
Pull-request: https://github.com/SerenityOS/serenity/pull/19789
Issue: https://github.com/SerenityOS/serenity/issues/19786
Reviewed-by: https://github.com/Hendiadyoin1
3 changed files with 35 additions and 0 deletions
|
@ -39,6 +39,11 @@ void HTMLTableCellElement::apply_presentational_hints(CSS::StyleProperties& styl
|
|||
style.set_property(CSS::PropertyID::BackgroundColor, CSS::ColorStyleValue::create(color.value()).release_value_but_fixme_should_propagate_errors());
|
||||
return;
|
||||
}
|
||||
if (name == HTML::AttributeNames::valign) {
|
||||
if (auto parsed_value = parse_css_value(CSS::Parser::ParsingContext { document() }, value.view(), CSS::PropertyID::VerticalAlign).release_value_but_fixme_should_propagate_errors())
|
||||
style.set_property(CSS::PropertyID::VerticalAlign, parsed_value.release_nonnull());
|
||||
return;
|
||||
}
|
||||
if (name == HTML::AttributeNames::align) {
|
||||
if (value.equals_ignoring_ascii_case("center"sv) || value.equals_ignoring_ascii_case("middle"sv)) {
|
||||
style.set_property(CSS::PropertyID::TextAlign, CSS::IdentifierStyleValue::create(CSS::ValueID::LibwebCenter).release_value_but_fixme_should_propagate_errors());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue