iOS WebKit2 find-in-page doesn't support multi-line results, is often blank
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Aug 2015 18:40:24 +0000 (18:40 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Aug 2015 18:40:24 +0000 (18:40 +0000)
commit37304469a4fb3cfee1528caf6e3ebe1230af2ab4
tree92e26b3a3c050e0041841959f70050718407185d
parentefb2999b070417bdbdb29cbc8782e71b96347d36
iOS WebKit2 find-in-page doesn't support multi-line results, is often blank
https://bugs.webkit.org/show_bug.cgi?id=148599
<rdar://problem/17914031>

Reviewed by Beth Dakin.

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString):
(WebKit::FindController::didFindString):
* WebProcess/WebPage/FindController.h:
Add didFindString() for FindControllerIOS.

* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindIndicatorOverlayClientIOS::drawRect):
(WebKit::FindController::updateFindIndicator):
(WebKit::setCompositionSelectionChangeEnabledInAllFrames):
(WebKit::FindController::willFindString):
(WebKit::FindController::didFindString):
(WebKit::FindController::didFailToFindString):
(WebKit::FindController::didHideFindIndicator):
* WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
(WebKit::FindIndicatorOverlayClientIOS::FindIndicatorOverlayClientIOS):
Adopt TextIndicator and shrink-wrapping.

We'll re-create the indicator if the device/page scale factor change;
this is the only case in which a TextIndicator sticks around when
page scale changes -- we should come up with a better model!

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::getClippedVisibleTextRectangles):
(WebCore::FrameSelection::getTextRectangles):
* editing/FrameSelection.h:
* page/TextIndicator.cpp:
(WebCore::initializeIndicator):
* page/TextIndicator.h:
Make it possible to create a TextIndicator that isn't clipped to the visible rect,
because iOS find-in-page TextIndicators persist while scrolling the page,
and are already constrained to the document rect anyway.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/FrameSelection.h
Source/WebCore/page/TextIndicator.cpp
Source/WebCore/page/TextIndicator.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/FindController.cpp
Source/WebKit2/WebProcess/WebPage/FindController.h
Source/WebKit2/WebProcess/WebPage/ios/FindControllerIOS.mm
Source/WebKit2/WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h