Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
4 changed files
with
43 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |