diff --git a/Tests/LibWeb/Layout/expected/table/tr-valign.txt b/Tests/LibWeb/Layout/expected/table/tr-valign.txt new file mode 100644 index 0000000000..23b54f47f2 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/table/tr-valign.txt @@ -0,0 +1,24 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x526 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x510 children: not-inline + TableWrapper <(anonymous)> at (8,8) content-size 216x510 [BFC] children: not-inline + Box at (9,9) content-size 214x508 table-box [TFC] children: not-inline + Box at (9,9) content-size 208x504 table-row-group children: not-inline + Box at (11,11) content-size 208x504 table-row children: not-inline + BlockContainer
at (12,12) content-size 102x502 table-cell [BFC] children: not-inline + BlockContainer
at (13,13) content-size 100x500 children: not-inline + BlockContainer
at (118,12) content-size 102x102 table-cell [BFC] children: not-inline + BlockContainer
at (119,13) content-size 100x100 children: inline + TextNode <#text> + +ViewportPaintable (Viewport<#document>) [0,0 800x600] + PaintableWithLines (BlockContainer) [0,0 800x526] + PaintableWithLines (BlockContainer) [8,8 784x510] + PaintableWithLines (TableWrapper(anonymous)) [8,8 216x510] + PaintableBox (Box) [8,8 216x510] + PaintableBox (Box) [9,9 208x504] overflow: [9,9 212x506] + PaintableBox (Box) [11,11 208x504] overflow: [11,11 210x504] + PaintableWithLines (BlockContainer
) [11,11 104x504] + PaintableWithLines (BlockContainer
) [12,12 102x502] + PaintableWithLines (BlockContainer
) [117,11 104x504] + PaintableWithLines (BlockContainer
) [118,12 102x102] diff --git a/Tests/LibWeb/Layout/input/table/tr-valign.html b/Tests/LibWeb/Layout/input/table/tr-valign.html new file mode 100644 index 0000000000..7ebea0c16d --- /dev/null +++ b/Tests/LibWeb/Layout/input/table/tr-valign.html @@ -0,0 +1,11 @@ +
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLTableRowElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLTableRowElement.cpp index 2c1bfc68c8..6358da3a2f 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLTableRowElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLTableRowElement.cpp @@ -5,8 +5,11 @@ */ #include +#include +#include #include #include +#include #include #include #include @@ -49,6 +52,10 @@ void HTMLTableRowElement::apply_presentational_hints(CSS::StyleProperties& style 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::valign) { + if (auto parsed_value = parse_css_value(CSS::Parser::ParsingContext { document() }, value.view(), CSS::PropertyID::VerticalAlign)) + style.set_property(CSS::PropertyID::VerticalAlign, parsed_value.release_nonnull()); + return; } }); }