Automatic update from web-platform-tests Move css-scoping/ tests to css-shadow/ to match spec Change-Id: Ie65e06f4160b9edfee12c1dbcad05f26b17a77b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7484758 Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/main@{#1570418} -- wpt-commits: 1242323699cb7c21b584ce0554e621d172b6d985 wpt-pr: 57244
37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<title>Same clip-path id's in different tree scopes</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-values/#local-urls">
|
|
<link rel="help" href="https://drafts.csswg.org/css-shadow-1/#css-tree-scoped-reference">
|
|
<link rel="match" href="reference/green-box.html">
|
|
<style>
|
|
div.container {
|
|
position: absolute;
|
|
width: 100px;
|
|
height: 100px;
|
|
}
|
|
div.one {
|
|
background-color: red;
|
|
}
|
|
</style>
|
|
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
|
<div class="container one">
|
|
<svg style="display: block; width: 100%; height: 100%">
|
|
<rect width="100" height="100" fill="green" clip-path="url(#clip)"/>
|
|
<clipPath id="clip">
|
|
<rect width="50" height="100"/>
|
|
</clipPath>
|
|
</svg>
|
|
</div>
|
|
<div class="container two"></div>
|
|
<script>
|
|
const scoped = document.querySelector('div.two');
|
|
scoped.attachShadow({ mode: 'open' });
|
|
scoped.shadowRoot.innerHTML = `
|
|
<svg style="display: block; width: 100%; height: 100%">
|
|
<rect width="100" height="100" fill="green" clip-path="url(#clip)"/>
|
|
<clipPath id="clip">
|
|
<rect x="50" width="50" height="100"/>
|
|
</clipPath>
|
|
</svg>`;
|
|
</script>
|