Update gesture swipe shadow style
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Apr 2015 00:02:53 +0000 (00:02 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Apr 2015 00:02:53 +0000 (00:02 +0000)
commitad5143445d86653c080fbed5906962f0940aa46c
treeedd528167d22009b42c630f4f1778ac13723f068
parent1432d007bda49f5e4a8b6e98cd6cba0c11b61dff
Update gesture swipe shadow style
https://bugs.webkit.org/show_bug.cgi?id=143616
<rdar://problem/19295843>

Reviewed by Darin Adler.

* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
For the modern shadow style, use a layer stretched along the edge of the swiping content
with the newly added PNGs as the layer contents.

Add a dimming layer over the lower layer of content which fades in/out
during the swipe.

(WebKit::ViewGestureController::handleSwipeGesture):
Fade the dimming layer in and out during the entire swipe.
Fade the shadow layer out during the last few pixels of the swipe.

(WebKit::ViewGestureController::removeSwipeSnapshot):
Unparent the new layers.

* WebKit2.xcodeproj/project.pbxproj:
* Resources/SwipeShadow.png:
* Resources/SwipeShadow@2x.png:
Add the new resources.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Resources/SwipeShadow.png [new file with mode: 0644]
Source/WebKit2/Resources/SwipeShadow@2x.png [new file with mode: 0644]
Source/WebKit2/UIProcess/mac/ViewGestureController.h
Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj