Skip to content

Commit

Permalink
Consider a clip-path url() reference an empty clip while it's loading
Browse files Browse the repository at this point in the history
While an external clip path is loading, we'll currently render as if no
clip path is applied. Not applying a clip is what the spec prescribes
for invalid references. While the resource is loading though, we
shouldn't consider it invalid. Instead let an empty Path represent the
external reference while it is loading.

Fixed: 371112520
Change-Id: Icbdf1d6bf6f981f53c139df22d320b36afa1aab5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5905324
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1364171}
  • Loading branch information
Fredrik Söderquist authored and chromium-wpt-export-bot committed Oct 4, 2024
1 parent 4c768ef commit 7270b19
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<html class="reftest-wait">
<title>clip-path url()s are represented as empty paths while loading</title>
<script src="/common/reftest-wait.js"></script>
<script src="/common/rendering-utils.js"></script>
<link rel="help" href="">
<link rel="match" href="reference/green-100x100.html">
<div style="width: 100px; height: 100px; background-color: green">
<div id="target" style="width: 100px; height: 100px; background-color: red"></div>
</div>
<script>
onload = () => {
const div = document.getElementById('target');
div.style.clipPath = `url("support/resources.svg?pipe=trickle(d10)#circleClip")`;
waitForAtLeastOneFrame().then(takeScreenshot);
};
</script>

0 comments on commit 7270b19

Please sign in to comment.