gfx: Don't mutate the same point multiple times while translating it to other stacking context space.

I don't know how neither review or a test caught this.
This commit is contained in:
Emilio Cobos Álvarez 2017-01-16 14:28:04 +01:00
parent 9cd1b861ec
commit 602b45a372
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 43 additions and 8 deletions

View file

@ -8432,6 +8432,12 @@
"url": "/_mozilla/mozilla/globals/entry.worker.html"
}
],
"mozilla/hit_test_multiple_sc.html": [
{
"path": "mozilla/hit_test_multiple_sc.html",
"url": "/_mozilla/mozilla/hit_test_multiple_sc.html"
}
],
"mozilla/hit_test_nested_sc.html": [
{
"path": "mozilla/hit_test_nested_sc.html",

View file

@ -0,0 +1,27 @@
<!doctype html>
<meta charset="utf-8">
<title>Hit testing works for following stacking contexts</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
.stacking-context {
z-index: 100;
opacity: 0.99;
width: 100px;
height: 100px;
background: green;
}
</style>
<div class="stacking-context"></div>
<div class="stacking-context" id="second-sc"></div>
<script>
async_test(function(t) {
window.onload = t.step_func(function() {
var points = document.elementsFromPoint(50, 150);
assert_true(points.length > 0, "Should report at least one element");
assert_true(points[0].id === "second-sc",
"Should be the second stacking context");
t.done();
})
});
</script>