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

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

Issue 1034433003: Hittest for RootInlineBox/InlineFlowBox should take care of border-radius. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 5 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 | LayoutTests/fast/borders/border-hittest-inlineFlowBox-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 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <style>
6 span {
7 background-color: lightgray;
8 border-radius: 2em;
9 padding: 1em;
10 line-height: 4em;
11 }
12
13 label {
14 padding: 2em;
15 background-color: lightgreen;
16 border-radius: 2em;
17 }
18 </style>
19 </head>
20 <body>
21 <span id="A">
22 Two lines with <br/>a hard line break.
23 </span>
24 <br/><br/><br/>
leviw_travelin_and_unemployed 2015/03/30 20:45:57 Why not just put the tests inside of blocks instea
Abhijeet Kandalkar Slow 2015/03/31 06:20:04 Added <div> tag with margin to separate test and a
25 <span id="B">B<label href="#" id="C">C</label></span>
26 <br/><br/><br/>
leviw_travelin_and_unemployed 2015/03/30 20:45:57 Ditto.
Abhijeet Kandalkar Slow 2015/03/31 06:20:04 Added <div> tag with margin to separate test and a
27 <span id="D" style="padding: 2em;">D<label id="E" href="#" style="padding: 1em;" >E</label></span>
28 <div id="console"></div>
29 </body>
30 <script>
31 description('If this test passes, area outside border radius is body element.');
32
33 var rects = document.getElementById('A').getClientRects();
34 var elementInTopLeftCorner = document.elementFromPoint(rects[0].left, rects[0].t op);
35 shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'BODY');
36 elementInTopLeftCorner = document.elementFromPoint(rects[1].left, rects[1].top);
37 shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'SPAN');
38
39 var rect = document.getElementById('B').getBoundingClientRect();
40 elementInTopLeftCorner = document.elementFromPoint(rect.left, rect.top);
41 shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'BODY');
42
43 rect = document.getElementById('C').getBoundingClientRect();
44 elementInTopLeftCorner = document.elementFromPoint(rect.left, rect.top);
45 shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'BODY');
46
47 rect = document.getElementById('D').getBoundingClientRect();
48 elementInTopLeftCorner = document.elementFromPoint(rect.left, rect.top);
49 shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'BODY');
50
51 rect = document.getElementById('E').getBoundingClientRect();
52 elementInTopLeftCorner = document.elementFromPoint(rect.left, rect.top);
53 shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'SPAN');
54 </script>
55 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/borders/border-hittest-inlineFlowBox-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698