DescriptionCall setPosition with valid offset in another layout test.
Some layout tests call setPosition(node, offset) with large |offset| which is larger than |node|'s length but it is invalid in the standard:
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#dom-selection-collapse
A typically case is that, image following HTML:
<div>text</div>
if you want to set a caret to between 'x' and 't', you should call Selection.setPostion(div.firstChild, 3).
However, many layout tests call Selection.setPosition(div, 3), which is invalid.
Many of those tests want to just set a caret to a last position of the node so this CL changes to call setPosition(node, node.childNodes.length).
I'm going to change Selection.setPosition to throw an exception for such a invalid call through Range.setStart/End.
This CL is similar to previous one:
https://src.chromium.org/viewvc/blink?revision=173167&view=revision
BUG=
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173629
Patch Set 1 #
Messages
Total messages: 5 (0 generated)
|