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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/multicol/client-rect-overflowing-multicol.html

Issue 2750153002: getClientRects() shouldn't clip against any ancestors. (Closed)
Patch Set: Document tests. Use width/height instead of right/bottom, since that's easier to follow. Created 3 years, 9 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/fast/multicol/client-rect-overflowing-multicol-2-columns.html » ('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 <style>body { margin:8px; }</style>
3 <div style="columns:1; width:10px; height:200px; column-fill:auto;">
4 <div id="elm" style="margin-left:-20px; margin-top:-25px; width:4000px; heig ht:40px;"></div>
5 </div>
6 <script src="../../resources/testharness.js"></script>
7 <script src="../../resources/testharnessreport.js"></script>
8 <script>
9 test(() => {
10 var elm = document.getElementById("elm");
11 var rects = elm.getClientRects();
12 assert_equals(rects.length, 1);
13 var rect = rects[0];
14 // #elm is offset -20px,-25px relatively to its multicol container, due
15 // to negative margins. BODY is offset 8px,8px due to its margin. So the
16 // absolute offset will be (-20px+8px),(-25px+8px) = -12px,-17px. The
17 // width and height will be the unclipped bounding box of #elm.
18 assert_equals(rect.left, -12);
19 assert_equals(rect.top, -17);
20 assert_equals(rect.width, 4000);
21 assert_equals(rect.height, 40);
22 }, "getClientRects should include overflow");
23 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/multicol/client-rect-overflowing-multicol-2-columns.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698