Index: LayoutTests/fast/multicol/vertical-rl/caret-range-anonymous-block.html |
diff --git a/LayoutTests/fast/multicol/vertical-rl/caret-range-anonymous-block.html b/LayoutTests/fast/multicol/vertical-rl/caret-range-anonymous-block.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..da4724ad9918d263d3dad3f726dde124889f72e4 |
--- /dev/null |
+++ b/LayoutTests/fast/multicol/vertical-rl/caret-range-anonymous-block.html |
@@ -0,0 +1,48 @@ |
+<!DOCTYPE html> |
+<style> |
+ body { |
+ margin:0; |
+ } |
+ |
+ #mc { |
+ -webkit-columns: 3; |
+ -webkit-column-gap: 20px; |
+ -webkit-writing-mode: vertical-rl; |
+ height: 280px; |
+ margin:20px 100px; |
+ font: 20px/1 Ahem; |
+ background:lime; |
+ } |
+ |
+ #log { |
+ position: absolute; |
+ top: 320px; |
+ } |
+</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(159,90).startOffset", "3"); |
+ shouldBe("document.caretRangeFromPoint(120,90).startOffset", "7"); |
+ shouldBe("document.caretRangeFromPoint(100,90).startOffset", "11"); |
+ |
+ debug("Second column:"); |
+ shouldBe("document.caretRangeFromPoint(159,190).startOffset", "15"); |
+ shouldBe("document.caretRangeFromPoint(120,190).startOffset", "19"); |
+ shouldBe("document.caretRangeFromPoint(100,190).startOffset", "23"); |
+ |
+ debug("Third column:"); |
+ shouldBe("document.caretRangeFromPoint(159,290).startOffset", "27"); |
+ shouldBe("document.caretRangeFromPoint(120,290).startOffset", "31"); |
+ shouldBe("document.caretRangeFromPoint(100,290).startOffset", "35"); |
+</script> |