-
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.
detik.com: Menu text is not shown in safari at top left corner of header
https://bugs.webkit.org/show_bug.cgi?id=268790 <rdar://60358063> Reviewed by Antti Koivisto. Inline content by definition is "float avoider". This is the case when inline content is wrapped inside a block container to ensure block sibling rule. e.g. <div><div> <div float></div> float avoider content. where the "float avoider content" is wrapped inside an anon block container. This helps when computing min/max content width for block content where float avoiders get accumulated on inline direction axis (as opposed to block axis). * LayoutTests/fast/block/inline-content-is-float-avoider-simple-expected.html: Added. * LayoutTests/fast/block/inline-content-is-float-avoider-simple.html: Added. * Source/WebCore/rendering/RenderBox.cpp: (WebCore::RenderBox::avoidsFloats const): Canonical link: https://commits.webkit.org/274191@main
- Loading branch information
1 parent
05129ff
commit 0e458e8
Showing
3 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
LayoutTests/fast/block/inline-content-is-float-avoider-simple-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,22 @@ | ||
<style> | ||
.container { | ||
width: 100px; | ||
color: green; | ||
font-family: Ahem; | ||
font-size: 50px; | ||
} | ||
.inline { | ||
display: inline-block; | ||
width: 50px; | ||
height: 50px; | ||
background-color: blue; | ||
} | ||
img { | ||
width: 50px; | ||
height: 50px; | ||
background-color: green; | ||
} | ||
</style> | ||
<div class=container><div class=inline></div><div class=inline style="background-color: green"></div></div> | ||
<div class=container><div class=inline></div><img></div> | ||
<div class=container><div class=inline></div><span style="vertical-align: top">X</span></div> |
28 changes: 28 additions & 0 deletions
28
LayoutTests/fast/block/inline-content-is-float-avoider-simple.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,28 @@ | ||
<style> | ||
.container { | ||
width: max-content; | ||
color: green; | ||
font-family: Ahem; | ||
font-size: 50px; | ||
} | ||
.floater { | ||
float: left; | ||
width: 50px; | ||
height: 50px; | ||
background-color: blue; | ||
} | ||
.inline { | ||
display: inline-block; | ||
width: 50px; | ||
height: 50px; | ||
background-color: green; | ||
} | ||
img { | ||
width: 50px; | ||
height: 50px; | ||
background-color: green; | ||
} | ||
</style> | ||
<div class=container><div></div><div class=floater></div><div class=inline></div></div> | ||
<div class=container><div></div><div class=floater></div><img></div> | ||
<div class=container><div></div><div class=floater></div>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