mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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:
parent
9cd1b861ec
commit
602b45a372
4 changed files with 43 additions and 8 deletions
|
@ -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",
|
||||
|
|
27
tests/wpt/mozilla/tests/mozilla/hit_test_multiple_sc.html
Normal file
27
tests/wpt/mozilla/tests/mozilla/hit_test_multiple_sc.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue