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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/multicol/client-rect-overflowing-multicol.html
diff --git a/third_party/WebKit/LayoutTests/fast/multicol/client-rect-overflowing-multicol.html b/third_party/WebKit/LayoutTests/fast/multicol/client-rect-overflowing-multicol.html
new file mode 100644
index 0000000000000000000000000000000000000000..1a69b240e4f59053f6b8e25049403c1df908e163
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/multicol/client-rect-overflowing-multicol.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<style>body { margin:8px; }</style>
+<div style="columns:1; width:10px; height:200px; column-fill:auto;">
+ <div id="elm" style="margin-left:-20px; margin-top:-25px; width:4000px; height:40px;"></div>
+</div>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+ test(() => {
+ var elm = document.getElementById("elm");
+ var rects = elm.getClientRects();
+ assert_equals(rects.length, 1);
+ var rect = rects[0];
+ // #elm is offset -20px,-25px relatively to its multicol container, due
+ // to negative margins. BODY is offset 8px,8px due to its margin. So the
+ // absolute offset will be (-20px+8px),(-25px+8px) = -12px,-17px. The
+ // width and height will be the unclipped bounding box of #elm.
+ assert_equals(rect.left, -12);
+ assert_equals(rect.top, -17);
+ assert_equals(rect.width, 4000);
+ assert_equals(rect.height, 40);
+ }, "getClientRects should include overflow");
+</script>
« 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