forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Do not resolve inline block height early if height is definite
This condition was included to implement flex containers with auto height, but it actually can reset the definitive height to 0 for inline blocks with only replaced elements such as an SVG. Removing the condition does not break any in-tree test, so let's improve the situation on the SVG side of things for now. (cherry picked from commit 352a66390f27fb7bbbfa823364fefc9af00d4b63)
- Loading branch information
Showing
3 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
Tests/LibWeb/Layout/expected/svg/svg-inside-inline-block.txt
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,18 @@ | ||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline | ||
BlockContainer <html> at (0,0) content-size 800x66 [BFC] children: not-inline | ||
BlockContainer <body> at (8,8) content-size 784x50 children: not-inline | ||
BlockContainer <div#a> at (8,8) content-size 100x50 children: inline | ||
frag 0 from BlockContainer start: 0, length: 0, rect: [8,8 100x50] baseline: 50 | ||
TextNode <#text> | ||
BlockContainer <div#b> at (8,8) content-size 100x50 inline-block [BFC] children: inline | ||
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x50] baseline: 50 | ||
TextNode <#text> | ||
SVGSVGBox <svg> at (8,8) content-size 100x50 [SVG] children: inline | ||
TextNode <#text> | ||
|
||
ViewportPaintable (Viewport<#document>) [0,0 800x600] | ||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x66] | ||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x50] | ||
PaintableWithLines (BlockContainer<DIV>#a) [8,8 100x50] | ||
PaintableWithLines (BlockContainer<DIV>#b) [8,8 100x50] | ||
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x50] |
19 changes: 19 additions & 0 deletions
19
Tests/LibWeb/Layout/input/svg/svg-inside-inline-block.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,19 @@ | ||
<!doctype html> | ||
<style> | ||
#a { | ||
background-color: #f00; | ||
height: 50px; | ||
width: 100px; | ||
} | ||
#b { | ||
display: inline-block; | ||
height: 100%; | ||
} | ||
svg { | ||
background-color: #0f0; | ||
height: 100%; | ||
} | ||
</style> | ||
<div id="a"> | ||
<div id="b"> | ||
<svg viewBox="0 0 100 50"> |
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