Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IFC] Negative letter-spacing breaks "-webkit-box-decoration-break: c…
…lone" https://bugs.webkit.org/show_bug.cgi?id=256135 <rdar://problem/108701795> Reviewed by Antti Koivisto. Trailing decoration was not taken into account when accumulating text content width for content with negative letter spacing. Let's move out m_contentLogicalWidth logic from [add new], [expand last with/without letter spacing] branches so that introducing a new branch would not result in the same error. * LayoutTests/fast/inline/webkit-box-decoration-clone-with-negative-letter-spacing-expected.html: Added. * LayoutTests/fast/inline/webkit-box-decoration-clone-with-negative-letter-spacing.html: Added. * Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp: (WebCore::Layout::Line::appendTextContent): Canonical link: https://commits.webkit.org/263540@main
- Loading branch information
1 parent
2c27397
commit f5213fd
Showing
3 changed files
with
55 additions
and
21 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...tTests/fast/inline/webkit-box-decoration-clone-with-negative-letter-spacing-expected.html
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,17 @@ | ||
<style> | ||
div { | ||
font-size: 20px; | ||
font-family: Ahem; | ||
letter-spacing: -1px; | ||
padding-left: 30px; | ||
padding-right: 30px; | ||
background-color: cyan; | ||
display: inline-block; | ||
} | ||
</style> | ||
<div>PASS if</div><br> | ||
<div>all lines</div><br> | ||
<div>have</div><br> | ||
<div>padding</div><br> | ||
<div>on the</div><br> | ||
<div>right</div> |
15 changes: 15 additions & 0 deletions
15
LayoutTests/fast/inline/webkit-box-decoration-clone-with-negative-letter-spacing.html
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,15 @@ | ||
<style> | ||
div { | ||
width: 240px; | ||
font-size: 20px; | ||
font-family: Ahem; | ||
letter-spacing: -1px; | ||
} | ||
span { | ||
-webkit-box-decoration-break: clone; | ||
padding-left: 30px; | ||
padding-right: 30px; | ||
background-color: cyan; | ||
} | ||
</style> | ||
<div><span>PASS if all lines have padding on the right</span></div> |
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