Skip to content

Commit 6f5749e

Browse files
progerschromium-wpt-export-bot
authored andcommitted
Consider visual overflow when hit testing border-shape
This patch ensures we do not early-out before hit testing visual overflow when hit testing for occlusion in the presence of border-shape. Fixed: 517155893 Change-Id: Idfdc39607ddf7f9d6c893e0d7cb08652893d9362 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7880691 Reviewed-by: Stefan Zager <szager@chromium.org> Commit-Queue: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1637424}
1 parent 5e1c3a9 commit 6f5749e

2 files changed

Lines changed: 71 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<meta name="viewport" content="width=device-width,initial-scale=1">
3+
<script src="/resources/testharness.js"></script>
4+
<script src="/resources/testharnessreport.js"></script>
5+
<style>
6+
#target {
7+
position: absolute;
8+
left: 100px;
9+
top: 100px;
10+
width: 100px;
11+
height: 100px;
12+
background: blue;
13+
}
14+
#occluder {
15+
position: absolute;
16+
left: 300px;
17+
top: 100px;
18+
width: 10px;
19+
height: 10px;
20+
border-shape: circle(5px at 50% 50%);
21+
box-shadow: -150px 0 0 100px black;
22+
background: red;
23+
}
24+
</style>
25+
<div id="target"></div>
26+
<div id="occluder"></div>
27+
28+
<script>
29+
setup({ single_test: true });
30+
const target = document.getElementById("target");
31+
new IntersectionObserver(entries => {
32+
assert_false(entries[0].isVisible);
33+
done();
34+
}, {trackVisibility: true, delay: 100}).observe(target);
35+
</script>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!DOCTYPE html>
2+
<meta name="viewport" content="width=device-width,initial-scale=1">
3+
<script src="/resources/testharness.js"></script>
4+
<script src="/resources/testharnessreport.js"></script>
5+
<style>
6+
#target {
7+
position: absolute;
8+
left: 100px;
9+
top: 100px;
10+
width: 100px;
11+
height: 100px;
12+
background: blue;
13+
}
14+
#occluder {
15+
position: absolute;
16+
left: 300px;
17+
top: 100px;
18+
width: 10px;
19+
height: 10px;
20+
border-shape: circle(5px at 50% 50%);
21+
box-shadow: -150px 0 0 100px black;
22+
background: red;
23+
overflow: hidden;
24+
}
25+
</style>
26+
<div id="target"></div>
27+
<div id="occluder"></div>
28+
29+
<script>
30+
setup({ single_test: true });
31+
const target = document.getElementById("target");
32+
new IntersectionObserver(entries => {
33+
assert_false(entries[0].isVisible);
34+
done();
35+
}, {trackVisibility: true, delay: 100}).observe(target);
36+
</script>

0 commit comments

Comments
 (0)