diff --git a/Libraries/LibWeb/Layout/Node.cpp b/Libraries/LibWeb/Layout/Node.cpp index b76f23bf37ded..0718c53198c83 100644 --- a/Libraries/LibWeb/Layout/Node.cpp +++ b/Libraries/LibWeb/Layout/Node.cpp @@ -1094,6 +1094,7 @@ void NodeWithStyle::reset_table_box_computed_values_used_by_wrapper_to_init_valu // Note that there may be more properties that need to be added to this list. values.set_z_index(CSS::InitialValues::z_index()); values.set_clip(CSS::InitialValues::clip()); + values.set_vertical_align(CSS::InitialValues::vertical_align()); }); } @@ -1125,6 +1126,9 @@ void NodeWithStyle::transfer_table_box_computed_values_to_wrapper_computed_value builder->set_z_index(computed_values().z_index()); // "clip" only takes effect on absolutely-positioned elements; the table box isn't one — the wrapper is. builder->set_clip(computed_values().clip()); + // AD-HOC: The wrapper box participates in inline layout in place of the table box, so vertical-align + // must be moved to the wrapper to have any effect. + builder->set_vertical_align(computed_values().vertical_align()); reset_table_box_computed_values_used_by_wrapper_to_init_values(); } diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/CSS2/borders/border-bottom-applies-to-014.xht b/Tests/LibWeb/Ref/input/wpt-import/css/CSS2/borders/border-bottom-applies-to-014.xht new file mode 100644 index 0000000000000..544138be3fccd --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/CSS2/borders/border-bottom-applies-to-014.xht @@ -0,0 +1,45 @@ + + +
+Test passes if there is a short horizontal green line.
+ +Test passes if there is a short horizontal green line.
+ +Test passes if there is a short horizontal green line.
+ +Test passes if there is a short horizontal green line.
+ +