ladybird/Tests/LibWeb/Layout/input/svg/foreignObject-and-mask-with-different-viewbox.html
Andreas Kling aae0b52403 LibWeb: Resolve mask/clip in foreignObject's own coordinate space
We were neglecting to resolve these correctly, which caused them to get
the same metrics as the nearest viewport above the foreignObject.
2025-07-09 14:36:08 +02:00

8 lines
No EOL
479 B
HTML

<!doctype html><style>
* { outline: 1px solid black; }
#lol {
width: 100px;
height: 100px;
background: orange;
}
</style><body><svg viewBox="0 0 1 1" style="position:absolute;"><mask id="theMask" maskContentUnits="objectBoundingBox"><circle fill="white" cx="0.5" cy="0.5" r="0.5"></circle></mask></svg><svg width="100" height="100" viewBox="0 0 100 100"><foreignObject x="0" y="0" width="40" height="40" mask="url(#theMask)"><div id="lol"></div></foreignObject></svg>