-
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.
[IFC] Minimum content width with "line-break: after-white-space" shou…
…ld not include trailing whitespace https://bugs.webkit.org/show_bug.cgi?id=260617 Reviewed by Antti Koivisto. This matches legacy line layout behavior (except inside table cells with one (unbreakable) word, where legacy diverges from default behavior). * LayoutTests/fast/text/preferred-widht-with-line-break-after-whitespace-expected.html: Added. * LayoutTests/fast/text/preferred-widht-with-line-break-after-whitespace.html: Added. * Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp: (WebCore::Layout::LineBuilder::placeInlineAndFloatContent): * Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp: (WebCore::Layout::TextOnlySimpleLineBuilder::handleLineEnding): Canonical link: https://commits.webkit.org/267214@main
- Loading branch information
1 parent
2f77755
commit c9e3f24
Showing
11 changed files
with
82 additions
and
53 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
This test checks that deleting into a table works properly. When deleting three times with the cursor after the character "a" in the "after" text after the table, the "a" should be deleted, as should the "o" of "buffalo" in the last table cell. | ||
|
||
Before | ||
Foo baz | ||
bar buffalfter | ||
Foo baz | ||
bar buffalofter | ||
execDeleteCommand: <div>Before</div> <table style="border:3px solid #aaa;"> <tbody><tr> <td> Foo </td> <td> baz </td> </tr> <tr> <td> bar </td> <td> buffalo </td> </tr> </tbody></table> <span id="start">fter</span> | ||
execDeleteCommand: <div>Before</div> <table style="border:3px solid #aaa;"> <tbody><tr> <td> Foo </td> <td> baz </td> </tr> <tr> <td> bar </td> <td> buffalo fter</td></tr></tbody></table> | ||
execDeleteCommand: <div>Before</div> <table style="border:3px solid #aaa;"> <tbody><tr> <td> Foo </td> <td> baz </td> </tr> <tr> <td> bar </td> <td> buffalofter</td></tr></tbody></table> | ||
execDeleteCommand: <div>Before</div> <table style="border:3px solid #aaa;"> <tbody><tr> <td> Foo </td> <td> baz </td> </tr> <tr> <td> bar </td> <td> buffalfter</td></tr></tbody></table> |
13 changes: 13 additions & 0 deletions
13
LayoutTests/fast/text/preferred-widht-with-line-break-after-whitespace-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,13 @@ | ||
<style> | ||
div { | ||
border: 1px solid green; | ||
line-break: after-white-space; | ||
float: left; | ||
font-family: Ahem; | ||
margin-left: 10px; | ||
} | ||
</style> | ||
<div>X</div> | ||
<div>X X</div> | ||
<div>X X X</div> | ||
<div>X X X</div> |
14 changes: 14 additions & 0 deletions
14
LayoutTests/fast/text/preferred-widht-with-line-break-after-whitespace.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,14 @@ | ||
<style> | ||
div { | ||
border: 1px solid green; | ||
line-break: after-white-space; | ||
float: left; | ||
font-family: Ahem; | ||
margin-left: 10px; | ||
} | ||
</style> | ||
<!-- Pass if border hugs inline content --> | ||
<div>X </div> | ||
<div>X X </div> | ||
<div>X X X</div> | ||
<div>X X X </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
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
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
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