Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: LayoutTests/fast/borders/border-radius-hittest.html

Issue 249133002: hitTest should take care if the location is inside rounded border if border-radius is specified (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/borders/border-radius-hittest-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <script>
4 var x, y;
5
6 function test() {
7 var innerBox = document.getElementById('roundedBox');
8 var rect = innerBox.getBoundingClientRect();
9 x = rect.left;
10 y = rect.top;
11 // At top-left corner.
12 shouldBe("document.elementFromPoint(x + 5, y + 5).id", "'container'");
13 // At top-right corner.
14 shouldBe("document.elementFromPoint(x + 195, y + 5).id", "'container'");
15 // At bottom-left corner.
16 shouldBe("document.elementFromPoint(x + 5, y + 195).id", "'container'");
17 // At bottom-right corner.
18 shouldBe("document.elementFromPoint(x + 195, y + 195).id", "'container'");
19 // At the center.
20 shouldBe("document.elementFromPoint(x + 100, y + 100).id", "'roundedBox'");
21 }
22 </script>
23 <style>
24 #container {
25 width: 200px;
26 height: 200px;
27 background-color: lightgray;
28 }
29 #roundedBox {
30 width: 200px;
31 height: 200px;
32 border-radius: 50px;
33 background-color: lightgreen;
34 }
35 </style>
36 <body onload="test()">
37 <p>This test checks that div block should not get events on clicking outside the rounded border but within the bounding box of the block.</p>
38 <div id="container">
39 <div id="roundedBox"></div>
40 </div>
41 <div id="console"></div>
42 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/borders/border-radius-hittest-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698