1 <body style=
"margin: 0">
2 <div style=
"margin: 50px; background-color: lightblue; width: 800px; height: 200px; -webkit-column-width:185px; -webkit-column-gap:15px; column-width:185px; column-gap:15px; column-fill:auto; font-family: Ahem; font-size: 50px; line-height: 1;">
3 123<div style=
"background-color: blue; height: 70px;"></div>abc
<br>def
<div style=
"background-color: blue; height: 60px;"></div>ghi
<br>jkl
<div style=
"background-color: blue; height: 110px;"></div>mno
</div>
4 <pre id=
"console" style=
"display: none;"></pre>
7 internals
.settings
.setEditingBehavior("mac");
8 function characterAtPoint(x
, y
)
10 var range
= document
.caretRangeFromPoint(x
, y
);
11 if (range
.startContainer
.nodeType
!== Node
.TEXT_NODE
)
13 if (range
.startOffset
>= range
.startContainer
.length
)
15 return range
.startContainer
.data
[range
.startOffset
];
20 document
.getElementById("console").appendChild(document
.createTextNode(message
+ "\n"));
23 function test(x
, y
, character
)
25 var actualCharacter
= characterAtPoint(x
, y
);
26 if (character
=== actualCharacter
)
27 log ("Character at " + x
+ ", " + y
+ " is " + character
+ " as expected.");
29 log ("FAIL: Character at " + x
+ ", " + y
+ " is " + actualCharacter
+ ". Expected " + character
+ ".");
32 if (window
.testRunner
)
33 testRunner
.dumpAsText();
50 document
.getElementById("console").style
.display
= "block";