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

Side by Side Diff: third_party/WebKit/LayoutTests/hittesting/hittest-overlapping-floats.html

Issue 2386553002: Hit test floats in visual painting order (Closed)
Patch Set: Created 4 years, 2 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/Source/core/layout/LayoutBlockFlow.cpp » ('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/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <style>
5 #left {
6 float: left;
7 width: 500px;
8 background: rgba(200, 200, 200, 0.8);
9 margin-right: -100px;
10 }
11 #left:hover {
12 background: rgb(200, 200, 200);
13 }
14 #right {
15 float: right;
16 width: 400px;
17 background-color: rgba(0, 128, 0, 0.8);
18 padding-bottom: 1px;
19 }
20 #right:hover {
21 background: rgb(0, 128, 0);
22 }
23 </style>
24 <div style="width: 800px;">
25 <div id="left">foo</div>
26 <div id="right">bar</div>
27 <div style="height:0px; width:0px; clear:left;"></div>
28 </div>
29 <div id="log"></div>
30 <script>
31 test(function(t)
32 {
33 var rightElement = document.getElementById("right");
34 var x = rightElement.offsetLeft + 10;
35 var y = rightElement.offsetTop + rightElement.offsetHeight / 2;
36
37 var element = document.elementFromPoint(x, y);
38 assert_equals(element.nodeName, 'DIV');
39 assert_equals(element.id, 'right');
40 }, "elementFromPoint should return the topmost floating element when two floats overlap");
41 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698