Bug 302617
| Summary: | SVG: WPT test failure on svg/layout/svg-foreign-relayout-001.html (canvas inside foreignObject) | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Karl Dubost <karlcow> |
| Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | sabouhallawa, webkit-bug-importer, zimmermann |
| Priority: | P2 | Keywords: | InRadar, WPTImpact |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://wpt.live/svg/layout/svg-foreign-relayout-001.html | ||
| Bug Depends on: | 23113 | ||
| Bug Blocks: | |||
Karl Dubost
Go to http://wpt.live/svg/layout/svg-foreign-relayout-001.html
https://wpt.fyi/results/svg/layout/svg-foreign-relayout-002.html (same issue)
Safari fails, Firefox/Chrome pass
http://wpt.fyi/svg/layout/svg-foreign-relayout-001.html
Test is
```
<body>
<p>Test passes if there is a filled green square.</p>
<svg width="100" height="100">
<foreignObject id="target" width="100" height="100">
<canvas id="inner" style="background: green; position: absolute; width: 100px; height: 100px; left: 0; top: 0;" width="100"></canvas>
</foreignObject>
</svg>
<script>
document.body.offsetTop;
document.getElementById('inner').width = '100';
document.getElementById('target').setAttribute('width', '100');
</script>
</body>
```
There is a filled green square but not at the right place.
The green square covers the text.
In this test we better see that the canvas element doesn't stay contained in the foreignObject.
https://codepen.io/webcompat/pen/xbVgMYe
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/165326097>