WebKit places caret in front of pasted Numbers cells instead of behind
https://bugs.webkit.org/show_bug.cgi?id=143627
Reviewed by Darin Adler.
The bug was caused by Position::downstream not respecting modern position types inside a table.
Fixed it by using Position::atStartOfNode which respects before/after positions.
This bug doesn't reproduce when there is no whitespace after td element in the pasted content
because positionAtEndOfInsertedContent() will be inside the last pasted cell inside
ReplaceSelectionCommand::completeHTMLReplacement in those cases. This related but separate bug
is tracked in https://webkit.org/b/143628.
Tests: editing/pasteboard/paste-table-with-unrendered-text-nodes.html
* dom/Position.cpp:
(WebCore::Position::downstream):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182656
268f45cc-cd09-0410-ab3c-
d52691b4dbfc