Make HTMLConverter take two Positions in preparation to make it work with shadow DOM
https://bugs.webkit.org/show_bug.cgi?id=192613
Reviewed by Darin Adler.
This patch makes HTMLConverter store two Position's instead of a Range so that HTMLConverter can work with
a selection which spans across shadow boundaries in the future.
No new tests since there should be no observable behavioral change.
* editing/cocoa/EditorCocoa.mm:
(WebCore::Editor::writeSelectionToPasteboard): Uses the newly introduced writeSelectionToPasteboard.
(WebCore::Editor::writeSelection): Ditto.
* editing/cocoa/HTMLConverter.h:
* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::HTMLConverter): Now takes two Position's.
(HTMLConverter::convert): Updated to work with Position's.
(HTMLConverter::_processText): Ditto.
(HTMLConverter::_traverseNode): Ditto.
(HTMLConverter::_traverseFooterNode): Ditto.
(HTMLConverterCaches::cacheAncestorsOfStartToBeConverted): Ditto.
(WebCore::attributedStringFromRange): Ditto.
(WebCore::attributedStringFromSelection): Added. For now, we first create a Range via toNormalizedRange
in order to preserve the exact behavior.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239127
268f45cc-cd09-0410-ab3c-
d52691b4dbfc