Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[IFC][Integration][Line clamp]
LineClamp.currentLineCount
should be…
… propagated to the parent layoutState. https://bugs.webkit.org/show_bug.cgi?id=255487 Reviewed by Alan Baradlay. Since multiple children share the same parent context for line clamp, `LineClamp.currentLineCount` set to the individual child should be propagated to their parent layoutState. Otherwise, subsequent children may not see the current state of this value during layout, causing incorrect line clamp results. * LayoutTests/fast/block/line-clamp-nested-blocks-with-layout-state-expected.html: Added. * LayoutTests/fast/block/line-clamp-nested-blocks-with-layout-state.html: Added. * Source/WebCore/page/LocalFrameViewLayoutContext.cpp: (WebCore::LocalFrameViewLayoutContext::popLayoutState): Canonical link: https://commits.webkit.org/263360@main
- Loading branch information
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
LayoutTests/fast/block/line-clamp-nested-blocks-with-layout-state-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,15 @@ | ||
<style> | ||
.clamped { | ||
font-family: Ahem; | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; | ||
-webkit-line-clamp: 2; | ||
overflow: hidden; | ||
} | ||
</style> | ||
<body> | ||
<div class="clamped"> | ||
<span>TEST<br />CASE</span> | ||
<div>FAIL</div> | ||
</div> | ||
</body> |
22 changes: 22 additions & 0 deletions
22
LayoutTests/fast/block/line-clamp-nested-blocks-with-layout-state.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,22 @@ | ||
<style> | ||
.clamped { | ||
font-family: Ahem; | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; | ||
-webkit-line-clamp: 2; | ||
overflow: hidden; | ||
} | ||
</style> | ||
<body> | ||
<div class="clamped"> | ||
<span id="test">TEST</span> | ||
<div>FAIL</div> | ||
</div> | ||
</body> | ||
<script> | ||
if (window.testRunner) testRunner.waitUntilDone(); | ||
setTimeout(() => { | ||
document.getElementById("test").innerHTML = "TEST<br />CASE"; | ||
if (window.testRunner) testRunner.notifyDone(); | ||
}, 0); | ||
</script> |
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