mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Support percentage attributes on SVG rect element
This makes the IMDb logo have a yellow background as expected.
This commit is contained in:
parent
99dd648475
commit
d36e5098f8
Notes:
github-actions[bot]
2025-09-28 17:26:28 +00:00
Author: https://github.com/awesomekling
Commit: d36e5098f8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6332
6 changed files with 58 additions and 41 deletions
16
Tests/LibWeb/Layout/expected/svg/rect-percentages.txt
Normal file
16
Tests/LibWeb/Layout/expected/svg/rect-percentages.txt
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-inline
|
||||
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 216 0+0+0] [BFC] children: not-inline
|
||||
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 200 0+0+8] children: inline
|
||||
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x200] baseline: 200
|
||||
SVGSVGBox <svg> at [8,8] [0+0+0 300 0+0+0] [0+0+0 200 0+0+0] [SVG] children: not-inline
|
||||
SVGGeometryBox <rect> at [83,108] [0+0+0 99 0+0+0] [0+0+0 99 0+0+0] children: not-inline
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x216]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x200]
|
||||
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x200]
|
||||
SVGPathPaintable (SVGGeometryBox<rect>) [83,108 99x99]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x216] [children: 0] (z-index: auto)
|
||||
1
Tests/LibWeb/Layout/input/svg/rect-percentages.html
Normal file
1
Tests/LibWeb/Layout/input/svg/rect-percentages.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<!doctype html><svg xmlns="http://www.w3.org/2000/svg" width="300" height="200" viewBox="0 0 64 32" version="1.1"><rect x="25%" y="50%" width="33%" height="66%" rx="5%" ry="10%" fill="red"></rect></svg>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.4 KiB |
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<meta name="fuzzy" content="maxDifference=0-1;totalPixels=0-33">
|
||||
<meta name="fuzzy" content="maxDifference=0-1;totalPixels=0-200">
|
||||
<svg width="200" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
||||
<link rel="match" href="../expected/svg-maskContentUnits-ref.html" />
|
||||
<mask id="myMask1" maskContentUnits="userSpaceOnUse">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue