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

Unified Diff: LayoutTests/fast/multicol/caret-range-anonymous-block.html

Issue 1003303005: [New Multicolumn] Correct localPoint when hitting an anonymous child block. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase master Created 5 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 | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/multicol/caret-range-anonymous-block-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/multicol/caret-range-anonymous-block.html
diff --git a/LayoutTests/fast/multicol/caret-range-anonymous-block.html b/LayoutTests/fast/multicol/caret-range-anonymous-block.html
new file mode 100644
index 0000000000000000000000000000000000000000..0d459da24e02f8c6382d497f3e2b474f15779cb5
--- /dev/null
+++ b/LayoutTests/fast/multicol/caret-range-anonymous-block.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<style>
+ body {
+ margin:0;
+ }
+
+ #mc {
+ -webkit-columns: 3;
+ -webkit-column-gap: 20px;
+ width: 280px;
+ margin:20px 100px;
+ font: 20px/1 Ahem;
+ }
+
+ #log {
+ position: absolute;
+ top: 101px;
+ }
+</style>
+<div id="log">
+ <p id="description"></p>
+ <div id="console"></div>
+</div>
+<div id="mc">
+ <div>
+ <!-- Here's an empty block to trigger wrapping of the sibling text inside an anonymous block. -->
+ </div>xxx xxx xxx xxx xxx xxx xxx xxx xxx</div>
+<script src="../../resources/js-test.js"></script>
+<script>
+ description("Test that hitting an anonymous block child of a multicol container takes us to the right text content.");
+
+ debug("First column:");
+ shouldBe("document.caretRangeFromPoint(170,39).startOffset", "3");
+ shouldBe("document.caretRangeFromPoint(170,40).startOffset", "7");
+ shouldBe("document.caretRangeFromPoint(170,79).startOffset", "11");
+
+ debug("Second column:");
+ shouldBe("document.caretRangeFromPoint(270,39).startOffset", "15");
+ shouldBe("document.caretRangeFromPoint(270,40).startOffset", "19");
+ shouldBe("document.caretRangeFromPoint(270,79).startOffset", "23");
+
+ debug("Third column:");
+ shouldBe("document.caretRangeFromPoint(370,39).startOffset", "27");
+ shouldBe("document.caretRangeFromPoint(370,40).startOffset", "31");
+ shouldBe("document.caretRangeFromPoint(370,79).startOffset", "35");
+</script>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/multicol/caret-range-anonymous-block-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698