https://bugs.webkit.org/show_bug.cgi?id=66584
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Nov 2011 00:06:02 +0000 (00:06 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Nov 2011 00:06:02 +0000 (00:06 +0000)
commit917fc78e219ccaf123454471a0d033a8bea1c8cd
tree692525f76b2c77181c03fefce64d26a600750dee
parentf05f43c49f2e7e67eebeac206850046caa6c14bd
https://bugs.webkit.org/show_bug.cgi?id=66584
WebKit2's find bouncy looks blurry after dragging window onto >1.0 scale factor
display
-and corresponding-
<rdar://problem/9987559>

Reviewed by Anders Carlsson.

The setFindIndicator message and various functions of the same name must all take
an additional parameter indicating whether or not setting the find indicator
should result in a bounce animation. This is because when the device scale factor
changes, if there is currently a find indicator, it must be re-set to a higher or
lower resolution version, but we don't want the bounce animation to happen again.
* UIProcess/API/mac/FindIndicatorWindow.h:
* UIProcess/API/mac/FindIndicatorWindow.mm:
(WebKit::FindIndicatorWindow::setFindIndicator):
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setFindIndicator):
* UIProcess/API/mac/WKView.mm:
(-[WKView _setFindIndicator:fadeOut:animate:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setFindIndicator):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:

New function FindController::isShowingOverlay() is used to determine if
FindController::deviceScaleFactorDidChange() needs to be called.
* WebProcess/WebPage/FindController.h:
(WebKit::FindController::isShowingOverlay):

FindController::deviceScaleFactorDidChange() calls updateFindIndicator to re-
generate the bitmap at the appropriate scale factor, but tells it not to animate
this time.
(WebKit::FindController::deviceScaleFactorDidChange):

updateFindIndicator() takes a new parameter indicating whether or not the
FindIndicator should animate. It defaults to true since the deviceScaleFactor
changing is the only case currently where we do not want it to animate.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
(WebKit::FindController::hideFindIndicator):

Calls into FindController::deviceScaleFactorDidChange() when the scale factor has
changed and the find overlay is showing.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setDeviceScaleFactor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h
Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm
Source/WebKit2/UIProcess/API/mac/PageClientImpl.h
Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebProcess/WebPage/FindController.cpp
Source/WebKit2/WebProcess/WebPage/FindController.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp