mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibWeb: Paint separate borders for inline tables
This commit is contained in:
parent
c838bb3f21
commit
a18500c78c
Notes:
sideshowbarker
2024-07-18 03:23:00 +09:00
Author: https://github.com/axgallo Commit: https://github.com/SerenityOS/serenity/commit/a18500c78c Pull-request: https://github.com/SerenityOS/serenity/pull/20570 Reviewed-by: https://github.com/kalenikaliaksandr
@ -1,3 +1,4 @@
|
||||
{
|
||||
"square-flex.html": "square-ref.html"
|
||||
"square-flex.html": "square-ref.html",
|
||||
"separate-borders-inline-table.html": "separate-borders-ref.html"
|
||||
}
|
||||
|
17
Tests/LibWeb/Ref/separate-borders-inline-table.html
Normal file
17
Tests/LibWeb/Ref/separate-borders-inline-table.html
Normal file
@ -0,0 +1,17 @@
|
||||
<style type="text/css">
|
||||
td {
|
||||
border: 5px solid blue;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
table {
|
||||
border: 5px solid black;
|
||||
display: inline-block;
|
||||
border-collapse: separate;
|
||||
}
|
||||
</style>
|
||||
<table>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
</table>
|
16
Tests/LibWeb/Ref/separate-borders-ref.html
Normal file
16
Tests/LibWeb/Ref/separate-borders-ref.html
Normal file
@ -0,0 +1,16 @@
|
||||
<style type="text/css">
|
||||
td {
|
||||
border: 5px solid blue;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
table {
|
||||
border: 5px solid black;
|
||||
border-collapse: separate;
|
||||
}
|
||||
</style>
|
||||
<table>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
</table>
|
@ -136,6 +136,8 @@ void StackingContext::paint_descendants(PaintContext& context, Layout::Node cons
|
||||
if (child_is_inline_or_replaced) {
|
||||
paint_node(child, context, PaintPhase::Background);
|
||||
paint_node(child, context, PaintPhase::Border);
|
||||
if (child.display().is_table_inside() && child.computed_values().border_collapse() == CSS::BorderCollapse::Separate)
|
||||
paint_table_borders(context, child);
|
||||
paint_descendants(context, child, StackingContextPaintPhase::BackgroundAndBorders);
|
||||
}
|
||||
paint_descendants(context, child, phase);
|
||||
|
Loading…
Reference in New Issue
Block a user