mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb: Use LibwebLeft and LibwebRight to align table cells
This commit is contained in:
committed by
Andreas Kling
parent
ccea69ad40
commit
5df52a5082
Notes:
sideshowbarker
2024-07-16 19:42:24 +09:00
Author: https://github.com/implicitfield Commit: https://github.com/SerenityOS/serenity/commit/5df52a5082 Pull-request: https://github.com/SerenityOS/serenity/pull/22000 Reviewed-by: https://github.com/kalenikaliaksandr ✅
@@ -60,6 +60,10 @@ void HTMLTableCellElement::apply_presentational_hints(CSS::StyleProperties& styl
|
||||
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));
|
||||
} else if (value.equals_ignoring_ascii_case("left"sv)) {
|
||||
style.set_property(CSS::PropertyID::TextAlign, CSS::IdentifierStyleValue::create(CSS::ValueID::LibwebLeft));
|
||||
} else if (value.equals_ignoring_ascii_case("right"sv)) {
|
||||
style.set_property(CSS::PropertyID::TextAlign, CSS::IdentifierStyleValue::create(CSS::ValueID::LibwebRight));
|
||||
} else {
|
||||
if (auto parsed_value = parse_css_value(CSS::Parser::ParsingContext { document() }, value.view(), CSS::PropertyID::TextAlign))
|
||||
style.set_property(CSS::PropertyID::TextAlign, parsed_value.release_nonnull());
|
||||
|
||||
Reference in New Issue
Block a user