VisibleSelection should only accept Range by reference
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Apr 2015 02:14:45 +0000 (02:14 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Apr 2015 02:14:45 +0000 (02:14 +0000)
commit8bdcc8d2d318386a52e2eb1394a05e77e28d025d
tree3b052a7b9e6502226ed427d9ca8ca25cc47f51d4
parentb4c704c9ea788cddbebb3a9ae2a951a060761d0d
VisibleSelection should only accept Range by reference
https://bugs.webkit.org/show_bug.cgi?id=144047

Reviewed by Tim Horton.

Source/WebCore:

Update VisibleSelection to expect a Range reference argument, rather than a
Range*. Also update all uses of VisibleSelection to pass a reference instead
of a pointer.

No change in behavior, so new tests.

* editing/Editor.cpp:
(WebCore::Editor::selectionForCommand):
(WebCore::Editor::advanceToNextMisspelling):
(WebCore::Editor::markMisspellingsAfterTypingToWord):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::transpose):
(WebCore::Editor::findString):
(WebCore::Editor::rangeOfString):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelectedRange):
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::VisibleSelection):
* editing/VisibleSelection.h:
* editing/mac/EditorMac.mm:
(WebCore::Editor::replaceNodeFromPasteboard):
* page/DragController.cpp:
(WebCore::selectElement):
* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithRange):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):
* rendering/SelectionSubtreeRoot.cpp:
(WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):

Source/WebKit/mac:

Update all uses of VisibleSelection to pass a Range reference instead
of a Range pointer.

* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::imageForCurrentSharingServicePickerItem):
* WebView/WebFrame.mm:
(-[WebFrame _selectNSRange:]):

Source/WebKit2:

Update all uses of VisibleSelection to pass a Range reference instead
of a Range pointer.

* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::renderedImage):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::getImageForFindMatch):
(WebKit::FindController::selectFindMatch):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::insertTextAsync):
(WebKit::WebPage::setCompositionAsync):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::insertDictatedTextAsync):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/SpellingCorrectionCommand.cpp
Source/WebCore/editing/VisibleSelection.cpp
Source/WebCore/editing/VisibleSelection.h
Source/WebCore/editing/mac/EditorMac.mm
Source/WebCore/page/DragController.cpp
Source/WebCore/page/TextIndicator.cpp
Source/WebCore/page/mac/EventHandlerMac.mm
Source/WebCore/rendering/SelectionSubtreeRoot.cpp
Source/WebKit/ios/WebCoreSupport/WebFrameIOS.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
Source/WebKit/mac/WebView/WebFrame.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp
Source/WebKit2/WebProcess/WebPage/FindController.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm