-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Text in flex items not breaking under specific conditions
https://bugs.webkit.org/show_bug.cgi?id=265252 <rdar://problem/118796634> Reviewed by Antti Koivisto. "zero width space" character (ZWSP) is a non-whitespace space character and is a word boundary. This patch ensures legacy preferred with computation treats "zero width space" as a breakable position. * LayoutTests/fast/text/flexing-content-fails-with-zero-width-space-expected.html: Added. * LayoutTests/fast/text/flexing-content-fails-with-zero-width-space.html: Added. * Source/WebCore/rendering/RenderText.cpp: (WebCore::isSpaceAccordingToStyle): (WebCore::RenderText::computePreferredLogicalWidths): Canonical link: https://commits.webkit.org/271122@main
- Loading branch information
1 parent
769ad4e
commit 073d844
Showing
5 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
LayoutTests/fast/text/flexing-content-fails-with-zero-width-space-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,12 @@ | ||
<style> | ||
body { | ||
font-family: Ahem; | ||
font-size: 20px; | ||
} | ||
|
||
div { | ||
color: green; | ||
} | ||
</style> | ||
<div>X<br>X<br>X</div> | ||
<br>PASS if no red |
24 changes: 24 additions & 0 deletions
24
LayoutTests/fast/text/flexing-content-fails-with-zero-width-space.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,24 @@ | ||
<style> | ||
body { | ||
font-family: Ahem; | ||
font-size: 20px; | ||
} | ||
|
||
.test { | ||
width: min-content; | ||
color: red; | ||
} | ||
|
||
.inline-block { | ||
display: inline-block; | ||
} | ||
|
||
.ref { | ||
position: absolute; | ||
top: 8px; | ||
color: green; | ||
} | ||
</style> | ||
<div class=test><div class=inline-block>X</div>X​<span>X</span></div></div> | ||
<div class=ref>X<br>X<br>X</div> | ||
<br>PASS if no red |
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
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