Skip to content

Commit 14e5f5f

Browse files
authored
Merge pull request #4497 from w3c/sync_fcc4056c57ce640a51358aa733c1e145d08a7af7
The fieldset's border drawing display item shouldn't participate in hit-testing. That's handled by its background item already.
2 parents 0f9eac9 + fcc4056 commit 14e5f5f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

cssom-view/elementFromPoint.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@
5252
<area id="rectG" shape="rect" coords="0,0,90,100" href="#" alt="area 1"/>
5353
<area id="circleO" shape="circle" coords="120,60,30" href="#" alt="area 2"/>
5454
<area id="polyLE" shape="poly" coords="280,0,310,0,360,30,360,90,280,90" href="#" alt="area 3"/>
55+
<!-- Test for fieldsets not doing weird things. Use a 200x200 div to hold
56+
all the bits for this test. Also, place it top/right, so it is not below
57+
the bottom edge of the viewport. -->
58+
<div style="position: absolute; width: 200px; height: 200px; right: 0; top: 0">
59+
<div id="fieldset-div"
60+
class="size" style="position: absolute; top: 0; left: 0">
61+
</div>
62+
<fieldset class="size" style="position: absolute; top: 100px; left: 100px">
63+
<!-- Place the child span so the overflow area of the fieldset overlaps
64+
the div -->
65+
<span style="position: absolute; top: -100px; left: -100px; height: 1px; width: 1px"></span>
66+
</fieldset>
67+
</div>
5568
<script>
5669
setup({explicit_done:true});
5770
window.onload = function () {
@@ -168,6 +181,15 @@
168181
image,
169182
"Should have returned the image element");
170183
}, "Image Maps");
184+
185+
test(function(){
186+
var fieldsetDiv = document.getElementById("fieldset-div");
187+
var divRect = fieldsetDiv.getBoundingClientRect();
188+
assert_equals(document.elementFromPoint(divRect.left + divRect.width/2,
189+
divRect.top + divRect.height/2),
190+
fieldsetDiv,
191+
"The fieldset should not cover up the div it doesn't even overlap");
192+
}, "Fieldsets");
171193
done();
172194
}
173195
</script>

0 commit comments

Comments
 (0)