Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/inline-block/hittest-inline-block-with-abspos.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/inline-block/hittest-inline-block-with-abspos.html b/third_party/WebKit/LayoutTests/fast/inline-block/hittest-inline-block-with-abspos.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..48780e911a94c193b3d142da40bc2edd1453e3a2 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/inline-block/hittest-inline-block-with-abspos.html |
| @@ -0,0 +1,32 @@ |
| +<!DOCTYPE html> |
|
pdr.
2016/01/31 21:32:36
It looks like this test is intended to show the be
Miyoung Shin(c)
2016/02/18 04:52:42
Done. I've updated the change description.
|
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<style> |
| +#abs { |
| + position: absolute; |
| + top: 0px; |
| + left: 0px; |
| + visibility: hidden; |
|
pdr.
2016/01/31 21:32:36
This seems like it would prevent this test from wo
Miyoung Shin(c)
2016/02/18 04:52:42
I had changed the condition like below at http://c
|
| +} |
| +#abs-inner { |
| + width: 96px; |
| + height: 96px; |
| + display: inline-block; |
| + border-radius: 50%; |
| +} |
| +</style> |
| +<span id="inner"> Mouse over me! </span> |
| +<div id="abs"><div id="abs-inner"></div> </div> |
| +<div id="log"></div> |
| +<script> |
| +test(function(t) |
| +{ |
| + var element = document.getElementById("inner"); |
| + var x = element.offsetLeft + element.offsetWidth / 2; |
| + var y = element.offsetTop + element.offsetHeight / 2; |
| + |
| + var element = document.elementFromPoint(x, y); |
| + assert_equals(element.nodeName, 'SPAN'); |
| + assert_equals(element.id, 'inner'); |
| +}, "elementFromPoint should return an element under a point"); |
| +</script> |