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

Side by Side Diff: third_party/WebKit/LayoutTests/hittesting/inner-border-radius-hittest.html

Issue 1897753002: Check scrollbars before hit testing border radius (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove all insiders Created 4 years, 8 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 | third_party/WebKit/LayoutTests/hittesting/inner-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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/js-test.js"></script> 2 <script src="../resources/js-test.js"></script>
3 <script> 3 <script>
4 var x, y; 4 var x, y;
5 function test() { 5 function test() {
6 var rectWithoutScrollbars = roundedBoxWithoutScrollbars.getBoundingClientRec t(); 6 var rectWithoutScrollbars = roundedBoxWithoutScrollbars.getBoundingClientRec t();
7 x = rectWithoutScrollbars.left; 7 x = rectWithoutScrollbars.left;
8 y = rectWithoutScrollbars.top; 8 y = rectWithoutScrollbars.top;
9 // At top-left corner, outside the outer border radius. 9 // At top-left corner, outside the outer border radius.
10 shouldBe("document.elementFromPoint(x + 20, y + 20).id", "'container'"); 10 shouldBe("document.elementFromPoint(x + 20, y + 20).id", "'container'");
11 // At top-left corner, inside outer border radius. 11 // At top-left corner, inside outer border radius.
12 shouldBe("document.elementFromPoint(x + 35, y + 35).id", "'roundedBoxWithout Scrollbars'"); 12 shouldBe("document.elementFromPoint(x + 35, y + 35).id", "'roundedBoxWithout Scrollbars'");
13 shouldBe("document.elementFromPoint(x + 60, y + 60).id", "'roundedBoxWithout Scrollbars'"); 13 shouldBe("document.elementFromPoint(x + 60, y + 60).id", "'roundedBoxWithout Scrollbars'");
14 // At top-left corner, insider inner border radius. 14 // At top-left corner, inside inner border radius.
15 shouldBe("document.elementFromPoint(x + 68, y + 68).id", "'roundedBoxChildWi thoutScrollbars'"); 15 shouldBe("document.elementFromPoint(x + 68, y + 68).id", "'roundedBoxChildWi thoutScrollbars'");
16 // At top-left corner, fully inside border. 16 // At top-left corner, fully inside border.
17 shouldBe("document.elementFromPoint(x + 80, y + 80).id", "'roundedBoxChildWi thoutScrollbars'"); 17 shouldBe("document.elementFromPoint(x + 80, y + 80).id", "'roundedBoxChildWi thoutScrollbars'");
18 // At bottom-right corner, inside inner border radius. 18 // At bottom-right corner, inside inner border radius.
19 shouldBe("document.elementFromPoint(x + 230, y + 230).id", "'roundedBoxChild WithoutScrollbars'"); 19 shouldBe("document.elementFromPoint(x + 230, y + 230).id", "'roundedBoxChild WithoutScrollbars'");
20 // At bottom-right corner, insider inner border radius. 20 // At bottom-right corner, inside inner border radius.
21 shouldBe("document.elementFromPoint(x + 240, y + 240).id", "'roundedBoxWitho utScrollbars'"); 21 shouldBe("document.elementFromPoint(x + 240, y + 240).id", "'roundedBoxWitho utScrollbars'");
22 shouldBe("document.elementFromPoint(x + 265, y + 265).id", "'roundedBoxWitho utScrollbars'"); 22 shouldBe("document.elementFromPoint(x + 265, y + 265).id", "'roundedBoxWitho utScrollbars'");
23 // At bottom-right corner, outside the outer border radius. 23 // At bottom-right corner, outside the outer border radius.
24 shouldBe("document.elementFromPoint(x + 275, y + 275).id", "'container'"); 24 shouldBe("document.elementFromPoint(x + 275, y + 275).id", "'container'");
25 25
26 var rectWithScrollbars = roundedBoxWithScrollbars.getBoundingClientRect(); 26 var rectWithScrollbars = roundedBoxWithScrollbars.getBoundingClientRect();
27 x = rectWithScrollbars.left; 27 x = rectWithScrollbars.left;
28 y = rectWithScrollbars.top; 28 y = rectWithScrollbars.top;
29 // At top-left corner with scrollbars, outside the outer border radius. 29 // At top-left corner with scrollbars, outside the outer border radius.
30 shouldBe("document.elementFromPoint(x + 20, y + 20).id", "'container'"); 30 shouldBe("document.elementFromPoint(x + 20, y + 20).id", "'container'");
31 // At top-left corner with scrollbars, inside outer border radius. 31 // At top-left corner with scrollbars, inside outer border radius.
32 shouldBe("document.elementFromPoint(x + 35, y + 35).id", "'roundedBoxWithScr ollbars'"); 32 shouldBe("document.elementFromPoint(x + 35, y + 35).id", "'roundedBoxWithScr ollbars'");
33 shouldBe("document.elementFromPoint(x + 60, y + 60).id", "'roundedBoxWithScr ollbars'"); 33 shouldBe("document.elementFromPoint(x + 60, y + 60).id", "'roundedBoxWithScr ollbars'");
34 // At top-left corner with scrollbars, insider inner border radius. 34 // At top-left corner with scrollbars, inside inner border radius.
35 shouldBe("document.elementFromPoint(x + 68, y + 68).id", "'roundedBoxWithScr ollbarsChild'"); 35 shouldBe("document.elementFromPoint(x + 68, y + 68).id", "'roundedBoxWithScr ollbarsChild'");
36 // At top-left corner with scrollbars, fully inside border. 36 // At top-left corner with scrollbars, fully inside border.
37 shouldBe("document.elementFromPoint(x + 80, y + 80).id", "'roundedBoxWithScr ollbarsChild'"); 37 shouldBe("document.elementFromPoint(x + 80, y + 80).id", "'roundedBoxWithScr ollbarsChild'");
38 // At bottom-right corner with scrollbars, inside inner border radius. 38 // At bottom-right corner with scrollbars, inside inner border radius.
39 shouldBe("document.elementFromPoint(x + 230, y + 230).id", "'roundedBoxWithS crollbarsChild'"); 39 shouldBe("document.elementFromPoint(x + 230, y + 230).id", "'roundedBoxWithS crollbarsChild'");
40 // At bottom-right corner with scrollbars, insider inner border radius. 40 // At bottom-right corner with scrollbars, inside inner border radius.
41 shouldBe("document.elementFromPoint(x + 265, y + 265).id", "'roundedBoxWithS crollbars'"); 41 shouldBe("document.elementFromPoint(x + 265, y + 265).id", "'roundedBoxWithS crollbars'");
42 // At bottom-right corner with scrollbars, outside the outer border radius. 42 // At bottom-right corner with scrollbars, outside the outer border radius.
43 shouldBe("document.elementFromPoint(x + 275, y + 275).id", "'container'"); 43 shouldBe("document.elementFromPoint(x + 275, y + 275).id", "'container'");
44 // At bottom-center on scrollbar and inside inner border radius.
45 shouldBe("document.elementFromPoint(x + 150, y + 240).id", "'roundedBoxWithS crollbars'");
46 // At center-right on scrollbar and inside inner border radius.
47 shouldBe("document.elementFromPoint(x + 240, y + 150).id", "'roundedBoxWithS crollbars'");
44 } 48 }
45 </script> 49 </script>
46 <style> 50 <style>
47 #container { 51 #container {
48 display: inline-block; 52 display: inline-block;
49 background-color: black; 53 background-color: black;
50 } 54 }
51 .roundedBox { 55 .roundedBox {
52 width: 200px; 56 width: 200px;
53 height: 200px; 57 height: 200px;
(...skipping 25 matching lines...) Expand all
79 <div id="container"> 83 <div id="container">
80 <div id="roundedBoxWithoutScrollbars" class="roundedBox"> 84 <div id="roundedBoxWithoutScrollbars" class="roundedBox">
81 <div id="roundedBoxChildWithoutScrollbars" class="roundedBoxChild">< /div> 85 <div id="roundedBoxChildWithoutScrollbars" class="roundedBoxChild">< /div>
82 </div> 86 </div>
83 <div id="roundedBoxWithScrollbars" class="roundedBox"> 87 <div id="roundedBoxWithScrollbars" class="roundedBox">
84 <div id="roundedBoxWithScrollbarsChild" class="roundedBoxChild"></di v> 88 <div id="roundedBoxWithScrollbarsChild" class="roundedBoxChild"></di v>
85 </div> 89 </div>
86 </div> 90 </div>
87 <div id="console"></div> 91 <div id="console"></div>
88 </body> 92 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/hittesting/inner-border-radius-hittest-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698