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
Out-of-flow <br> should not trigger a line break
https://bugs.webkit.org/show_bug.cgi?id=259631 Reviewed by Antti Koivisto. This is just to make sure we don't include out-of-flow line break in inflow inline layout producing forced line break at such boxes. However this patch does not address the incorrect offsetTop/left/client rect etc values. (In order to support a full-fledged out-of-flow line break, we would need to inherit RenderLineBreak from RenderBox which is quite a memory waste considering RenderLineBreak is in-flow most of the time -also, it would require some involved changes as currently some code assumes that RenderLineBreak is never a RenderBox.) * LayoutTests/fast/inline/out-of-flow-forced-line-break-expected.html: Added. * LayoutTests/fast/inline/out-of-flow-forced-line-break.html: Added. * Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp: (WebCore::Layout::InlineItemsBuilder::collectInlineItems): * Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp: (WebCore::LayoutIntegration::BoxTree::adjustStyleIfNeeded): * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::updateLineBreakBoxDimensions): (WebCore::LayoutIntegration::LineLayout::updateRenderTreePositions): Canonical link: https://commits.webkit.org/266475@main
- Loading branch information
1 parent
c22c66c
commit f71ea9e
Showing
5 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
LayoutTests/fast/inline/out-of-flow-forced-line-break-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,7 @@ | ||
<style> | ||
div { | ||
font-family: monospace; | ||
} | ||
</style> | ||
<div>PASS if no line break.</div> | ||
<div>PASS if no line break.</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<style> | ||
div { | ||
font-family: monospace; | ||
} | ||
</style> | ||
<div>PASS if<br style="position: absolute;"> no line break.</div> | ||
<div>PASS if<br style="position: fixed;"> no line break.</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