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

Unified Diff: LayoutTests/fast/multicol/inline-getclientrects.html

Issue 256743006: [New Multicolumn] Make offsetLeft, offsetTop and getClientRects() behave. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/multicol/inline-getclientrects.html
diff --git a/LayoutTests/fast/multicol/inline-getclientrects.html b/LayoutTests/fast/multicol/inline-getclientrects.html
new file mode 100644
index 0000000000000000000000000000000000000000..9a7b7f53125700f0628ae6a18af2dc723f7e0e76
--- /dev/null
+++ b/LayoutTests/fast/multicol/inline-getclientrects.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ if (window.internals)
+ internals.settings.setRegionBasedColumnsEnabled(true);
+</script>
+<body style="margin-left:10px; margin-top:15px;">
+ <!-- Make a container with 9 lines. With three columns, that means three lines per column. -->
+ <div style="-webkit-columns:3; columns:3; column-gap:1em; -webkit-column-gap:1em; width:32em; orphans:1; widows:1;">
+ <br>
+ <br>
+ <br>
+ <br>
+ <br>
+ <span id="elm">
+ <!-- This is at a column boundary, where the first line fits in the second column, while
+ the second line is in the third column. -->
+ XXXXXXXXXXXXXXXXXXXXXXXXXX
+ XXXXXXXXXXXXXXXXXXXXXXXXXX
+ </span><br>
+ <br>
+ <br>
+ </div>
+ <script>
+ var rects = document.getElementById('elm').getClientRects();
+ shouldBe("rects.length", "2");
+ shouldBeGreaterThan("rects[1].left", "rects[0].left");
+ shouldBeGreaterThan("rects[0].top", "rects[1].top");
+ shouldBeGreaterThan("rects[0].right - rects[0].left", "0");
+ shouldBe("rects[1].right - rects[1].left", "rects[0].right - rects[0].left");
+ shouldBeGreaterThan("rects[0].bottom - rects[0].top", "0");
+ shouldBe("rects[1].bottom - rects[1].top", "rects[0].bottom - rects[0].top");
+ </script>
+</body>
« no previous file with comments | « LayoutTests/fast/multicol/cssom-view-expected.txt ('k') | LayoutTests/fast/multicol/inline-getclientrects-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698