Implement "Jump to Selection" in WebKit2
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2011 21:00:51 +0000 (21:00 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2011 21:00:51 +0000 (21:00 +0000)
commit18e13b4b95efc8ec3e8132c82291dd7fae5b7190
tree07a1fb2fc7773d7ebf28aa5b7cac11a9f3700f38
parent1552a0298f90aae488149c149bd3ffa33bb7382f
Implement "Jump to Selection" in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=64569

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm:
(-[WKView centerSelectionInVisibleArea:]): Call WebPageProxy::centerSelectionInVisibleArea().
(-[WKView validateUserInterfaceItem:]): Enable the centerSelectionInVisibleArea: selector if there's a selection
range or if there's an insertion point in an editable area.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::showFindIndicatorInSelection): Call updateFindIndicator() to show the find indicator.
* WebProcess/WebPage/FindController.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::centerSelectionInVisibleArea): Use the selection in the focused or main frame.
After scrolling the selection into view, flash the find indicator.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/WebProcess/WebPage/FindController.cpp
Source/WebKit2/WebProcess/WebPage/FindController.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp