haikuwebkit/LayoutTests/fast/inline/incorrect-tab-position-expe...

7 lines
110 B
HTML
Raw Permalink Normal View History

[Inline] Overlapping content when margin-right is present https://bugs.webkit.org/show_bug.cgi?id=213629 <rdar://problem/64391403> Reviewed by Simon Fraser. Source/WebCore: 1. computeInlineDirectionPositionsForSegment loops through the Bidi runs and computes their logical widths. 2. Text measuring needs the current logical left position in order to compute the run width properly (e.g tab size) 3. The current logical left includes margins, boders and paddings (e.g <span style="margin: 100px;">text content</span> 'text content' starts at 100px -ignore the line offset for now) 4. The BiDi loop jumps over empty inline containers (e.g. text<span style="border: 10px solid green"></span>content) and it lacks the information to be able to resolve nested inline containers. This patch pre-computes the spacing offset for each InlineTextBox so that we could use it later to compute the logical left position for the text measuring. <span style="margin-right: 1px">[1]<span style="margin: 2px">[2]</span>[3]</span>[4] [1] -> 0px offset [2] -> 2px offset [3] -> 4px offset [4] -> 5px offset Test: fast/inline/incorrect-tab-position.html * rendering/ComplexLineLayout.cpp: (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment): LayoutTests: * fast/inline/incorrect-tab-position-expected.html: Added. * fast/inline/incorrect-tab-position.html: Added. Canonical link: https://commits.webkit.org/226428@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-06-26 04:17:47 +00:00
<style>
.outer {
white-space: pre-wrap;
}
</style>
<span class=outer> should<span>not overlap</span></span>