LayoutTests:
Reviewed by john
<rdar://problem/
5012665>
Removing indent from list moves the caret to the line below
No new layout tests needed because the new results
for these tests and the removed FIXMEs cover the bug fix:
* editing/execCommand/indent-list-item.html:
* editing/execCommand/indent-list-item-expected.checksum:
* editing/execCommand/indent-list-item-expected.png:
* editing/execCommand/indent-list-item-expected.txt:
* editing/execCommand/remove-list-1.html:
* editing/execCommand/remove-list-1-expected.checksum:
* editing/execCommand/remove-list-1-expected.png:
* editing/execCommand/remove-list-1-expected.txt:
WebCore:
Reviewed by john
<rdar://problem/
5012665>
Removing indent from list moves the caret to the line below
Selection preservation during indent, outdent and list
operations uses rangeFromLocationAndLength. Ranges returned
by rangeFromLocationAndLength were incorrect for locations
just before the line breaks that are emitted after blocks.
This is because TextIterator emitted bad ranges for these line
breaks (ranges that started and ended *after* the block).
The fix corrects the start but not the end. This is acceptible
because there is code in rangeFromLocationAndLength that corrects
the ends of runs using the start of the run and VisiblePosition
creation.
* editing/TextIterator.cpp:
(WebCore::TextIterator::exitNode): Emit a position *inside*
the block, after its contents.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19780
268f45cc-cd09-0410-ab3c-
d52691b4dbfc