Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IFC] Incorrect out-of-flow box placement when text-indent is present…
… (display: inline) https://bugs.webkit.org/show_bug.cgi?id=254492 Reviewed by Antti Koivisto. Take text-ident (mainly each-line) into account when computing the static position for a "display: inline" out-of-flow box on "overflowing line" after the last line with inline content. * LayoutTests/fast/inline/out-of-flow-inline-with-text-indent-on-last-line-expected.html: Added. * LayoutTests/fast/inline/out-of-flow-inline-with-text-indent-on-last-line.html: Added. * Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp: (WebCore::Layout::InlineFormattingGeometry::lineBoxOffsetAfterLastLine const): (WebCore::Layout::InlineFormattingGeometry::staticPositionForOutOfFlowInlineLevelBox const): * Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.h: Canonical link: https://commits.webkit.org/262170@main
- Loading branch information
1 parent
6485d96
commit fd637ab
Showing
4 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
LayoutTests/fast/inline/out-of-flow-inline-with-text-indent-on-last-line-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,24 @@ | ||
<style> | ||
.container { | ||
width: 50px; | ||
height: 45px; | ||
font-size: 10px; | ||
color: transparent; | ||
font-family: Ahem; | ||
background-color: green; | ||
} | ||
.ref { | ||
display: inline-block; | ||
width: 25px; | ||
height: 25px; | ||
background-color: blue; | ||
position: relative; | ||
} | ||
</style> | ||
<div class=container>some text<br><div class=ref></div></div> | ||
<div class=container>some text<br><div class=ref style="left: 25px;"></div></div> | ||
<div class=container>some text<br><div class=ref style="left: -25px;"></div></div> | ||
<div class=container>some text<br><div class=ref></div></div> | ||
<div class=container>some text<br><div class=ref style="left: 50px;"></div></div> | ||
<div class=container>some text<br><div class=ref style="left: 20px; top: 0px; height: 30px;"></div></div> | ||
<div class=container></div> |
24 changes: 24 additions & 0 deletions
24
LayoutTests/fast/inline/out-of-flow-inline-with-text-indent-on-last-line.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> | ||
.container { | ||
width: 50px; | ||
height: 45px; | ||
font-size: 10px; | ||
color: transparent; | ||
font-family: Ahem; | ||
background-color: green; | ||
} | ||
.out_of_flow { | ||
display: inline; | ||
width: 25px; | ||
height: 25px; | ||
background-color: blue; | ||
position: absolute; | ||
} | ||
</style> | ||
<div class=container style="text-indent: 10px;">some text<br><div class=out_of_flow></div></div> | ||
<div class=container style="text-indent: 25px each-line;">some text<br><div class=out_of_flow></div></div> | ||
<div class=container style="text-indent: -25px each-line;">some text<br><div class=out_of_flow></div></div> | ||
<div class=container style="direction: rtl; text-indent: 25px each-line;">some text<br><div class=out_of_flow></div></div> | ||
<div class=container style="direction: rtl; text-indent: -25px each-line;">some text<br><div class=out_of_flow></div></div> | ||
<div class=container style="writing-mode: vertical-lr; text-indent: 20px each-line;">some text<br><div class=out_of_flow></div></div> | ||
<div class=container style="writing-mode: vertical-lr; text-indent: -20px each-line;">some text<br><div class=out_of_flow></div></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