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

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: 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
19 div {
20 margin: 2em;
21 }
22 </style>
23 </head>
24 <body>
25 <div>
26 <span id="A">
27 Two lines with <br/>a hard line break.
28 </span>
29 </div>
30 <div>
31 <span id="B">B<label id="C">C</label></span>
32 </div>
33 <div>
34 <span id="D" style="padding: 2em;">D<label id="E" style="padding: 1em;">E</label ></span>
35 </div>
36 <div id="console"></div>
37 </body>
38 <script>
39 description('If this test passes, area outside border radius is body element.');
40
41 var rects = document.getElementById('A').getClientRects();
42 var elementInTopLeftCorner = document.elementFromPoint(rects[0].left, rects[0].t op);
43 shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'DIV');
44 elementInTopLeftCorner = document.elementFromPoint(rects[1].left, rects[1].top);
45 shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'SPAN');
46
47 var rect = document.getElementById('B').getBoundingClientRect();
48 elementInTopLeftCorner = document.elementFromPoint(rect.left, rect.top);
49 shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'DIV');
50
51 rect = document.getElementById('C').getBoundingClientRect();
52 elementInTopLeftCorner = document.elementFromPoint(rect.left, rect.top);
53 shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'BODY');
54
55 rect = document.getElementById('D').getBoundingClientRect();
56 elementInTopLeftCorner = document.elementFromPoint(rect.left, rect.top);
57 shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'BODY');
58
59 rect = document.getElementById('E').getBoundingClientRect();
60 elementInTopLeftCorner = document.elementFromPoint(rect.left, rect.top);
61 shouldBeEqualToString('elementInTopLeftCorner.nodeName', 'SPAN');
62 </script>
63 </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