Use a layer delegate instead of web_disableAllActions wherever possible
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 May 2014 18:30:02 +0000 (18:30 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 May 2014 18:30:02 +0000 (18:30 +0000)
commit4600abba53c7c63f1529185f1d2554224a755988
treec0e7431cad5c85830d67a18ebb65e8d6b46d3bee
parent7a5514b9e4d6a49e8eba90b48fe30da1e03e397f
Use a layer delegate instead of web_disableAllActions wherever possible
https://bugs.webkit.org/show_bug.cgi?id=132560
<rdar://problem/16459284>

Reviewed by Simon Fraser.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::commonInit):
If we own the platform layer, set its delegate to the action-disabling WebActionDisablingCALayerDelegate.
If we don't, its actual owner might want to control the delegate, so continue using web_disableAllActions.

* platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h: Added.
* platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm: Added.
(+[WebActionDisablingCALayerDelegate shared]):
(-[WebActionDisablingCALayerDelegate actionForLayer:forKey:]):
Add a class that can act as the delegate of a CALayer, and disables all actions.

* platform/graphics/cocoa/WebCoreCALayerExtras.h: Renamed from Source/WebCore/platform/graphics/mac/WebCoreCALayerExtras.h.
* platform/graphics/cocoa/WebCoreCALayerExtras.mm: Renamed from Source/WebCore/platform/graphics/mac/WebCoreCALayerExtras.mm.
(-[CALayer web_disableAllActions]):
Move WebCoreCALayerExtras from mac/ to cocoa/.

* UIProcess/API/mac/WKView.mm:
(-[WKView _setAcceleratedCompositingModeRootLayer:]):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Make use of WebActionDisablingCALayerDelegate where possible.
Also, UIKit disables actions for us, so don't bother doing anything on iOS.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
Source/WebCore/platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h [new file with mode: 0644]
Source/WebCore/platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm [new file with mode: 0644]
Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.h [moved from Source/WebCore/platform/graphics/mac/WebCoreCALayerExtras.h with 100% similarity]
Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm [moved from Source/WebCore/platform/graphics/mac/WebCoreCALayerExtras.mm with 99% similarity]
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm
Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm
Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm
Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm