mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
In `InlineLevelIterator`, whenever we call `skip_to_next()` and enter a node with box model metrics, we could potentially accumulate leading and trailing metrics. This lead to a weird situation where an element with `display: inline-block` could adopt the leading metrics of an inline element that follows it, since we perform the call to `add_extra_box_model_metrics_to_item()` too late. Move `skip_to_next()` down so it no longer interferes with the `Item` we're creating. The test expectation for `atomic-inline-with-percentage-vertical-align.html` is updated, although neither the old nor new results are 100% accurate since either box jumps one pixel to the right.
80 lines
4.2 KiB
Plaintext
80 lines
4.2 KiB
Plaintext
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|
BlockContainer <html> at (0,0) content-size 800x76 [BFC] children: not-inline
|
|
BlockContainer <body> at (8,8) content-size 784x60 children: not-inline
|
|
BlockContainer <div#a> at (9,9) content-size 782x18 children: inline
|
|
frag 0 from BlockContainer start: 0, length: 0, rect: [9,9 88.453125x18] baseline: 13.796875
|
|
BlockContainer <i> at (9,9) content-size 88.453125x18 inline-block [BFC] children: inline
|
|
frag 0 from TextNode start: 0, length: 12, rect: [9,9 88.453125x18] baseline: 13.796875
|
|
"inline-block"
|
|
TextNode <#text>
|
|
InlineNode <b>
|
|
frag 0 from TextNode start: 0, length: 6, rect: [117.453125,9 41.296875x18] baseline: 13.796875
|
|
"inline"
|
|
TextNode <#text>
|
|
InlineNode <u>
|
|
frag 0 from TextNode start: 0, length: 6, rect: [158.75,9 41.296875x18] baseline: 13.796875
|
|
"inline"
|
|
TextNode <#text>
|
|
BlockContainer <(anonymous)> at (8,28) content-size 784x0 children: inline
|
|
TextNode <#text>
|
|
BlockContainer <div#b> at (9,29) content-size 782x18 children: inline
|
|
frag 0 from BlockContainer start: 0, length: 0, rect: [70.296875,29 88.453125x18] baseline: 13.796875
|
|
InlineNode <i>
|
|
frag 0 from TextNode start: 0, length: 6, rect: [9,29 41.296875x18] baseline: 13.796875
|
|
"inline"
|
|
TextNode <#text>
|
|
BlockContainer <b> at (70.296875,29) content-size 88.453125x18 inline-block [BFC] children: inline
|
|
frag 0 from TextNode start: 0, length: 12, rect: [70.296875,29 88.453125x18] baseline: 13.796875
|
|
"inline-block"
|
|
TextNode <#text>
|
|
InlineNode <u>
|
|
frag 0 from TextNode start: 0, length: 6, rect: [158.75,29 41.296875x18] baseline: 13.796875
|
|
"inline"
|
|
TextNode <#text>
|
|
BlockContainer <(anonymous)> at (8,48) content-size 784x0 children: inline
|
|
TextNode <#text>
|
|
BlockContainer <div#c> at (9,49) content-size 782x18 children: inline
|
|
frag 0 from BlockContainer start: 0, length: 0, rect: [131.59375,49 88.453125x18] baseline: 13.796875
|
|
InlineNode <i>
|
|
frag 0 from TextNode start: 0, length: 6, rect: [9,49 41.296875x18] baseline: 13.796875
|
|
"inline"
|
|
TextNode <#text>
|
|
InlineNode <b>
|
|
frag 0 from TextNode start: 0, length: 6, rect: [70.296875,49 41.296875x18] baseline: 13.796875
|
|
"inline"
|
|
TextNode <#text>
|
|
BlockContainer <u> at (131.59375,49) content-size 88.453125x18 inline-block [BFC] children: inline
|
|
frag 0 from TextNode start: 0, length: 12, rect: [131.59375,49 88.453125x18] baseline: 13.796875
|
|
"inline-block"
|
|
TextNode <#text>
|
|
BlockContainer <(anonymous)> at (8,68) content-size 784x0 children: inline
|
|
TextNode <#text>
|
|
|
|
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|
PaintableWithLines (BlockContainer<HTML>) [0,0 800x76]
|
|
PaintableWithLines (BlockContainer<BODY>) [8,8 784x60]
|
|
PaintableWithLines (BlockContainer<DIV>#a) [8,8 784x20]
|
|
PaintableWithLines (BlockContainer<I>) [9,9 88.453125x18]
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (InlineNode<B>)
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (InlineNode<U>)
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer(anonymous)) [8,28 784x0]
|
|
PaintableWithLines (BlockContainer<DIV>#b) [8,28 784x20]
|
|
PaintableWithLines (InlineNode<I>)
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer<B>) [70.296875,29 88.453125x18]
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (InlineNode<U>)
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer(anonymous)) [8,48 784x0]
|
|
PaintableWithLines (BlockContainer<DIV>#c) [8,48 784x20]
|
|
PaintableWithLines (InlineNode<I>)
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (InlineNode<B>)
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer<U>) [131.59375,49 88.453125x18]
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer(anonymous)) [8,68 784x0]
|