at (11,11) content-size 194x206 table-row children: not-inline
+ BlockContainer at (12,12) content-size 192x204 table-cell [BFC] children: not-inline
+ TableWrapper <(anonymous)> at (158.890625,12) content-size 45.109375x204 [BFC] children: not-inline
+ Box at (159.890625,13) content-size 43.109375x202 table-box [TFC] children: not-inline
+ Box at (159.890625,13) content-size 39.109375x198 table-row-group children: not-inline
+ Box at (161.890625,15) content-size 39.109375x198 table-row children: not-inline
+ BlockContainer at (162.890625,105.265625) content-size 37.109375x17.46875 table-cell [BFC] children: inline
+ line 0 width: 37.109375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
+ frag 0 from TextNode start: 0, length: 5, rect: [162.890625,105.265625 37.109375x17.46875]
+ "right"
+ TextNode <#text>
+
+ViewportPaintable (Viewport<#document>) [0,0 800x600]
+ PaintableWithLines (BlockContainer) [0,0 800x228]
+ PaintableWithLines (BlockContainer) [8,8 784x212]
+ PaintableWithLines (TableWrapper(anonymous)) [8,8 200x212]
+ PaintableBox (Box) [8,8 200x212]
+ PaintableBox (Box) [9,9 194x206] overflow: [9,9 196x208]
+ PaintableBox (Box) [11,11 194x206]
+ PaintableWithLines (BlockContainer) [11,11 194x206]
+ PaintableWithLines (TableWrapper(anonymous)) [158.890625,12 45.109375x204]
+ PaintableBox (Box) [158.890625,12 45.109375x204]
+ PaintableBox (Box) [159.890625,13 39.109375x198] overflow: [159.890625,13 41.109375x200]
+ PaintableBox (Box) [161.890625,15 39.109375x198]
+ PaintableWithLines (BlockContainer) [161.890625,15 39.109375x198]
+ TextPaintable (TextNode<#text>)
diff --git a/Tests/LibWeb/Layout/input/table/nested-table-alignment.html b/Tests/LibWeb/Layout/input/table/nested-table-alignment.html
new file mode 100644
index 0000000000..2c6a4f9294
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/table/nested-table-alignment.html
@@ -0,0 +1,6 @@
+right
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp
index 973f8a8bf7..8959afac95 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp
@@ -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());
|
|
| | | |