diff options
author | Andreas Kling <kling@serenityos.org> | 2023-05-19 18:14:37 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-20 08:49:42 +0200 |
commit | f0560fd08786e18563b8c63a8b1dab0a830a4915 (patch) | |
tree | e29b5c88a917038e9885c5fabd6ba6df80f849b1 /Tests/LibWeb/Layout/expected/svg/svg-fill-with-bogus-url.txt | |
parent | 28d2e266788e88ae595b4645ac03f9a04351b877 (diff) | |
download | serenity-f0560fd08786e18563b8c63a8b1dab0a830a4915.zip |
LibWeb: Support <svg> elements with `display: block`
There are a couple of things that went into this:
- We now calculate the intrinsic width/height and aspect ratio of <svg>
elements based on the spec algorithm instead of our previous ad-hoc
guesswork solution.
- Replaced elements with automatic size and intrinsic aspect ratio but
no intrinsic dimensions are now sized with the stretch-fit width
formula.
- We take care to assign both used width and used height to <svg>
elements before running their SVG formatting contexts. This ensures
that the inside SVG content is laid out with knowledge of its
viewport geometry.
- We avoid infinite recursion in tentative_height_for_replaced_element()
by using the already-calculated used width instead of calling the
function that calculates the used width (since that may call us right
back again).
Diffstat (limited to 'Tests/LibWeb/Layout/expected/svg/svg-fill-with-bogus-url.txt')
-rw-r--r-- | Tests/LibWeb/Layout/expected/svg/svg-fill-with-bogus-url.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Tests/LibWeb/Layout/expected/svg/svg-fill-with-bogus-url.txt b/Tests/LibWeb/Layout/expected/svg/svg-fill-with-bogus-url.txt index 6dddd2e8da..5e727c696e 100644 --- a/Tests/LibWeb/Layout/expected/svg/svg-fill-with-bogus-url.txt +++ b/Tests/LibWeb/Layout/expected/svg/svg-fill-with-bogus-url.txt @@ -1,7 +1,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer <html> at (0,0) content-size 800x37.835937 [BFC] children: not-inline - BlockContainer <body> at (8,8) content-size 784x21.835937 children: inline - line 0 width: 0, height: 21.835937, bottom: 21.835937, baseline: 100 - frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 0x0] - SVGSVGBox <svg> at (8,8) content-size 0x0 [SVG] children: not-inline - SVGGeometryBox <rect> at (8,8) content-size 100x100 children: not-inline + BlockContainer <html> at (0,0) content-size 800x800 [BFC] children: not-inline + BlockContainer <body> at (8,8) content-size 784x784 children: inline + line 0 width: 784, height: 784, bottom: 784, baseline: 784 + frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x784] + SVGSVGBox <svg> at (8,8) content-size 784x784 [SVG] children: not-inline + SVGGeometryBox <rect> at (8,8) content-size 784x784 children: not-inline |