Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Incorrect inline box decoration position when content box is vertical…
…ly shifted https://bugs.webkit.org/show_bug.cgi?id=245209 <rdar://problem/99950939> Reviewed by Simon Fraser. 1. the logical top of an inline box points to the edge of the border box. 2. the logical top of an inline box is relative to its parent inline box. 3. the vertical padding/border on an inline box does not make it any taller (and does not stretch the line). It simply means that putting vertical padding/border on an inline box has no impact on its content box's vertical position. <div><span style="padding-top: 200px">with padding</span></div> and <div><span style="padding-top: 0px">without padding</span></div> produce the same layout. However the top value always includes both the border and the padding values (e.g. in the example above, the <span>'s logical top is resolved to -200px). In this patch we ensure that the content box's top is used when paining the underline/overline/etc foreground decorations. * LayoutTests/fast/inline/inline-box-decoration-with-border-and-padding-expected.html: Added. * LayoutTests/fast/inline/inline-box-decoration-with-border-and-padding.html: Added. * Source/WebCore/rendering/TextBoxPainter.cpp: (WebCore::TextBoxPainter<TextBoxPath>::collectDecoratingBoxesForTextBox): Canonical link: https://commits.webkit.org/254554@main
- Loading branch information