Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IFC][line-box-contain] line-height should not affect enclosing height
https://bugs.webkit.org/show_bug.cgi?id=255211 Reviewed by Antti Koivisto. Layout bounds geometry takes line-height into account potentially causing overlapping content while line-box-contain (by definition) should always produce non-overlapping content. * LayoutTests/fast/inline/line-box-contain-with-line-height-expected.html: Added. * LayoutTests/fast/inline/line-box-contain-with-line-height.html: Added. * Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp: (WebCore::Layout::LineBoxBuilder::adjustInlineBoxHeightsForLineBoxContainIfApplicable): Canonical link: https://commits.webkit.org/262768@main
- Loading branch information
1 parent
c0c0062
commit afa7e18
Showing
3 changed files
with
32 additions
and
9 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
LayoutTests/fast/inline/line-box-contain-with-line-height-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 @@ | ||
<!doctype html> | ||
<style> | ||
div { | ||
font-family: Ahem; | ||
font-size: 100px; | ||
background-color: green; | ||
color: green; | ||
width: 100px; | ||
padding-top: 50px; | ||
padding-bottom: 50px; | ||
} | ||
</style> | ||
<div> </div> |
17 changes: 17 additions & 0 deletions
17
LayoutTests/fast/inline/line-box-contain-with-line-height.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,17 @@ | ||
<!doctype html> | ||
<style> | ||
div { | ||
-webkit-line-box-contain: inline-box; | ||
font-size: 100px; | ||
line-height: 0; | ||
font-family: Ahem; | ||
background-color: green; | ||
width: 100px; | ||
} | ||
|
||
span { | ||
background-color: red; | ||
margin: 50px; | ||
} | ||
</style> | ||
<div><span></span></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