-
-
Notifications
You must be signed in to change notification settings - Fork 496
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Propagate margin and offset when computing a box's baseline
When traversing the layout tree to find an appropriate box child to derive the baseline from. Only the child's margin and offset was being applied. Now we sum each offset on the recursive call.
- Loading branch information
1 parent
c8e29ad
commit 3c897e7
Showing
32 changed files
with
134 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Tests/LibWeb/Layout/expected/block-and-inline/button-image-only.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...LibWeb/Layout/expected/block-and-inline/button-should-have-vertically-aligned-content.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Tests/LibWeb/Layout/expected/block-and-inline/button-with-after-pseudo.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Tests/LibWeb/Layout/expected/block-and-inline/button-with-before-pseudo.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Tests/LibWeb/Layout/expected/block-and-inline/button-with-min-height.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Tests/LibWeb/Layout/expected/block-and-inline/button-with-multiple-words-text-node-label.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Tests/LibWeb/Layout/expected/block-and-inline/button-with-text-node-label-and-font-size.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Tests/LibWeb/Layout/expected/block-and-inline/button-with-text-node-label.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
Tests/LibWeb/Layout/expected/block-and-inline/inline-block-baseline-1.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
Tests/LibWeb/Layout/expected/block-and-inline/inline-block-baseline-2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Tests/LibWeb/Layout/expected/block-and-inline/margin-collapse-5.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
Tests/LibWeb/Layout/expected/box-sizing-border-box-for-definite-sizes-without-layout.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline | ||
BlockContainer <html> at (0,0) content-size 800x67 [BFC] children: not-inline | ||
BlockContainer <body> at (8,8) content-size 784x51 children: inline | ||
frag 0 from Box start: 0, length: 0, rect: [28,39 49.71875x0] baseline: 6 | ||
Box <div.button> at (28,39) content-size 49.71875x0 flex-container(row) [FFC] children: not-inline | ||
BlockContainer <(anonymous)> at (28,28) content-size 49.71875x22 flex-item [BFC] children: inline | ||
frag 0 from TextNode start: 0, length: 5, rect: [28,28 49.71875x22] baseline: 17 | ||
BlockContainer <html> at (0,0) content-size 800x56 [BFC] children: not-inline | ||
BlockContainer <body> at (8,8) content-size 784x40 children: inline | ||
frag 0 from Box start: 0, length: 0, rect: [28,28 49.71875x0] baseline: 26 | ||
Box <div.button> at (28,28) content-size 49.71875x0 flex-container(row) [FFC] children: not-inline | ||
BlockContainer <(anonymous)> at (28,17) content-size 49.71875x22 flex-item [BFC] children: inline | ||
frag 0 from TextNode start: 0, length: 5, rect: [28,17 49.71875x22] baseline: 17 | ||
"Hello" | ||
TextNode <#text> | ||
|
||
ViewportPaintable (Viewport<#document>) [0,0 800x600] | ||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x67] | ||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x51] | ||
PaintableBox (Box<DIV>.button) [8,19 89.71875x40] | ||
PaintableWithLines (BlockContainer(anonymous)) [28,28 49.71875x22] | ||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x56] | ||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x40] | ||
PaintableBox (Box<DIV>.button) [8,8 89.71875x40] | ||
PaintableWithLines (BlockContainer(anonymous)) [28,17 49.71875x22] | ||
TextPaintable (TextNode<#text>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
Tests/LibWeb/Layout/expected/flex/inline-flex-baseline-of-child.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline | ||
BlockContainer <html> at (1,1) content-size 798x106 [BFC] children: not-inline | ||
BlockContainer <body> at (10,10) content-size 780x88 children: not-inline | ||
BlockContainer <div> at (11,11) content-size 778x86 children: inline | ||
frag 0 from Box start: 0, length: 0, rect: [12,32 180x64] baseline: 14.296875 | ||
frag 1 from Box start: 0, length: 0, rect: [194,32 180x64] baseline: 34.296875 | ||
frag 2 from Box start: 0, length: 0, rect: [376,32 180x64] baseline: 14.296875 | ||
Box <span> at (12,32) content-size 180x64 flex-container(row) [FFC] children: not-inline | ||
BlockContainer <(anonymous)> at (12,32) content-size 6.34375x64 flex-item [BFC] children: inline | ||
frag 0 from TextNode start: 0, length: 1, rect: [12,32 6.34375x17] baseline: 13.296875 | ||
"1" | ||
TextNode <#text> | ||
Box <span> at (194,32) content-size 180x64 flex-container(row) [FFC] children: not-inline | ||
BlockContainer <(anonymous)> at (194,32) content-size 8.8125x64 flex-item [BFC] children: inline | ||
frag 0 from TextNode start: 0, length: 1, rect: [194,32 8.8125x17] baseline: 13.296875 | ||
"2" | ||
TextNode <#text> | ||
Box <span> at (376,32) content-size 180x64 flex-container(row) [FFC] children: not-inline | ||
BlockContainer <(anonymous)> at (376,32) content-size 9.09375x64 flex-item [BFC] children: inline | ||
frag 0 from TextNode start: 0, length: 1, rect: [376,32 9.09375x17] baseline: 13.296875 | ||
"3" | ||
TextNode <#text> | ||
BlockContainer <(anonymous)> at (10,98) content-size 780x0 children: inline | ||
TextNode <#text> | ||
|
||
ViewportPaintable (Viewport<#document>) [0,0 800x600] | ||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x108] | ||
PaintableWithLines (BlockContainer<BODY>) [9,9 782x90] | ||
PaintableWithLines (BlockContainer<DIV>) [10,10 780x88] | ||
PaintableBox (Box<SPAN>) [11,31 182x66] | ||
PaintableWithLines (BlockContainer(anonymous)) [12,32 6.34375x64] | ||
TextPaintable (TextNode<#text>) | ||
PaintableBox (Box<SPAN>) [193,31 182x66] | ||
PaintableWithLines (BlockContainer(anonymous)) [194,32 8.8125x64] | ||
TextPaintable (TextNode<#text>) | ||
PaintableBox (Box<SPAN>) [375,31 182x66] | ||
PaintableWithLines (BlockContainer(anonymous)) [376,32 9.09375x64] | ||
TextPaintable (TextNode<#text>) | ||
PaintableWithLines (BlockContainer(anonymous)) [10,98 780x0] |
2 changes: 1 addition & 1 deletion
2
Tests/LibWeb/Layout/expected/flex/inline-flex-early-resolution-of-percentage-height.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Tests/LibWeb/Layout/expected/flex/inline-flex-with-main-axis-margin-on-flex-container.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.