Ensure transparent hit test region is sized and positioned correctly.

This commit is contained in:
Josh Matthews 2019-02-06 15:17:29 -05:00
parent a34c8f952e
commit f59e95ee3d
3 changed files with 65 additions and 3 deletions

View file

@ -12659,6 +12659,12 @@
{}
]
],
"mozilla/hit-test-background.html": [
[
"/_mozilla/mozilla/hit-test-background.html",
{}
]
],
"mozilla/hit_test_multiple_sc.html": [
[
"/_mozilla/mozilla/hit_test_multiple_sc.html",
@ -19418,6 +19424,10 @@
"9baa0cdcd5abad00b321e8b9351a1bc162783ed5",
"support"
],
"mozilla/hit-test-background.html": [
"5212954e4ee6ecb684212e7373e24a2268434b1c",
"testharness"
],
"mozilla/hit_test_multiple_sc.html": [
"1c79d25ea06f80eb515282fb0a53a34f92a25698",
"testharness"

View file

@ -0,0 +1,33 @@
<title>Hit testing backgrounds of content should report the same element as the content</title>
<style>
* {
margin: 0;
padding: 0;
border-width: 0;
}
.tiles {
background-color: red;
overflow: hidden;
}
.tile-image {
background-color: green;
border: 1px solid black;
height: 100px;
width: 160px;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="bg" class="tiles">
<a id="anchor" href="about:blank">
<div id="tile" class="tile-image duckduckgo"></div>
</a>
</div>
<script>
var t = async_test();
onload = t.step_func_done(function() {
var tile = document.getElementById('tile');
assert_equals(document.elementFromPoint(10, 10), tile);
});
</script>