Skip to content

Commit

Permalink
SVG: Fix viewport-relative size invalidation
Browse files Browse the repository at this point in the history
We should call InvalidateSVGRootsWithRelativeLengthDescendents() on
relayout due to scrollbars in NGBlockNode::Layout()

Bug: 1500476
Change-Id: I34ba41e65104dadddbb6a791fc5a912e837ec84c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5020338
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Auto-Submit: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1224043}
  • Loading branch information
tkent-google authored and chromium-wpt-export-bot committed Nov 14, 2023
1 parent bb3e6bb commit d0d3b96
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
10 changes: 10 additions & 0 deletions svg/painting/reftests/mask-percentage-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<body>
<svg
width="100%" height="100%"
xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="100%" height="100%" fill='lime'></rect>
</svg>
</body>
</html>
23 changes: 23 additions & 0 deletions svg/painting/reftests/mask-percentage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<title>Percentages in a mask</title>
<link rel="help" href="https://crbug.com/1500476" />
<link rel="match" href="mask-percentage-ref.html" />
<body>
<svg
width="100%" height="100%"
xmlns="http://www.w3.org/2000/svg">

<defs>
<mask id='corner'>
<g><rect x="0" y="0" height="100%" width="100%" fill="white" /></g>
</mask>
</defs>

<rect x="0" y="0" width="100%" height="100%" fill="red"></rect>
<g mask='url(#corner)'>
<rect x="0" y="0" width="100%" height="100%" fill='lime'></rect>
</g>
</svg>
</body>
</html>

0 comments on commit d0d3b96

Please sign in to comment.