Skip to content

Commit

Permalink
content-visibility: Add a clipper fix for content-visibility.
Browse files Browse the repository at this point in the history
This patch adds a few checks in the svg painting code which may access
a content-visibility locked element via an svg reference.

R=fs@opera.com,jarhar@chromium.org

Bug: 1247196
Change-Id: I4dcb4ef298fb8d51aa0ec1a3b3bc130cfb560791
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3149811
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#920209}
  • Loading branch information
vmpstr authored and chromium-wpt-export-bot committed Sep 10, 2021
1 parent 0f30a48 commit 5305143
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html class="test-wait">
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="help" href="https://crbug.com/1247196">
<meta name="assert" content="Clip path with content-visibility does not cause an assert">

<svg width="138">
<defs>
<clipPath id="snowglobe_clipPath">
<circle cx="34" />
</clipPath>
</defs>
<circle />
<g class="group-snow" clip-path="url(#snowglobe_clipPath)">
<g class="snowContainer">
<circle class="snow" />
</g>
</g>
</svg>
<script type="text/javascript">
onload = () => {
var test0 = document.getElementById("snowglobe_clipPath");
test0.style.setProperty("content-visibility", "auto ", "important");
test0.innerHTML = "";
test0.offsetHeight;

requestAnimationFrame(() => document.documentElement.classList.remove('test-wait'));
};
</script>
</html>

0 comments on commit 5305143

Please sign in to comment.