summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/multicol/inline-getclientrects.html
diff options
context:
space:
mode:
authormstensho@opera.com <mstensho@opera.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2014-04-30 08:26:07 +0000
committermstensho@opera.com <mstensho@opera.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2014-04-30 08:26:07 +0000
commitc852ab8a62d70fd44f86ec1fdbca7e5a7e1b1cad (patch)
treef9ee4e8c2ccb47c1cd7b8667d0f893d5f986ed74 /third_party/WebKit/LayoutTests/fast/multicol/inline-getclientrects.html
parent13d38062819879ad0d4492979a2c0c8c763c2297 (diff)
downloadchromium_src-c852ab8a62d70fd44f86ec1fdbca7e5a7e1b1cad.zip
chromium_src-c852ab8a62d70fd44f86ec1fdbca7e5a7e1b1cad.tar.gz
chromium_src-c852ab8a62d70fd44f86ec1fdbca7e5a7e1b1cad.tar.bz2
[New Multicolumn] Make offsetLeft, offsetTop and getClientRects() behave.
Get rid of mapFromFlowToRegion() and mapLocalToContainer() in RenderFlowThread, and reimplement columnOffset() in RenderMultiColumnFlowThread instead. This method is already used a lot in the engine, but it has up until now only worked with the old multicol implementation. Need to add a call from RenderBox::offsetFromContainer(), since the one that's already there is for old multicol only and does special stuff. This incidentally also gets rid of assertion failures in RenderGeometryMap when compositing is turned on (what used to be in RenderFlowThread::mapLocalToContainer() did the wrong thing if the target was that flow thread itself). Re-enable tests that used to fail on that assertion. BUG=367688,364960 Review URL: https://codereview.chromium.org/256743006 git-svn-id: svn://svn.chromium.org/blink/trunk@172961 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/multicol/inline-getclientrects.html')
-rw-r--r--third_party/WebKit/LayoutTests/fast/multicol/inline-getclientrects.html36
1 files changed, 36 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/multicol/inline-getclientrects.html b/third_party/WebKit/LayoutTests/fast/multicol/inline-getclientrects.html
new file mode 100644
index 0000000..9a7b7f5
--- /dev/null
+++ b/third_party/WebKit/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>