Fix the build for pre-Yosemite systems after r175417
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Oct 2014 20:41:57 +0000 (20:41 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Oct 2014 20:41:57 +0000 (20:41 +0000)
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView initWithFrame:context:configuration:webView:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformActionMenuHitTest):
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175420 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
Source/WebKit2/UIProcess/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/mac/WKActionMenuController.h
Source/WebKit2/UIProcess/mac/WKActionMenuController.mm

index f6965418591ec1f800da5ad2016edd8044f2f6eb..e318ec7dd4032da47906b4fbb9e3ad66d537c779 100644 (file)
@@ -1,3 +1,16 @@
+2014-10-31  Timothy Horton  <timothy_horton@apple.com>
+
+        Fix the build for pre-Yosemite systems after r175417
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView dealloc]):
+        (-[WKView initWithFrame:context:configuration:webView:]):
+        * UIProcess/API/mac/WKViewInternal.h:
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::didPerformActionMenuHitTest):
+        * UIProcess/mac/WKActionMenuController.h:
+        * UIProcess/mac/WKActionMenuController.mm:
+
 2014-10-31  Timothy Horton  <timothy_horton@apple.com>
 
         Remove "Add to iPhoto" from the action menu's sharing menu
index 96977c5889aab0d4bbdd5144381d4f94da048a13..e6643c9ab5fab34397564a175f7f019747696a54 100644 (file)
@@ -251,13 +251,12 @@ struct WKViewInterpretKeyEventsParameters {
 
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
     BOOL _automaticallyAdjustsContentInsets;
+    RetainPtr<WKActionMenuController> _actionMenuController;
 #endif
 
 #if WK_API_ENABLED
     _WKThumbnailView *_thumbnailView;
 #endif
-
-    RetainPtr<WKActionMenuController> _actionMenuController;
 }
 
 @end
@@ -304,7 +303,9 @@ struct WKViewInterpretKeyEventsParameters {
 
 - (void)dealloc
 {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
     [_data->_actionMenuController willDestroyView:self];
+#endif
 
     _data->_page->close();
 
@@ -3534,12 +3535,14 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
 
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:NSApp];
 
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
     if ([self respondsToSelector:@selector(setActionMenu:)]) {
         RetainPtr<NSMenu> menu = adoptNS([[NSMenu alloc] init]);
         self.actionMenu = menu.get();
         _data->_actionMenuController = adoptNS([[WKActionMenuController alloc] initWithPage:*_data->_page view:self]);
         self.actionMenu.delegate = _data->_actionMenuController.get();
     }
+#endif
 
     return self;
 }
@@ -3638,6 +3641,8 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
         _data->_gestureController->removeSwipeSnapshot();
 }
 
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+
 - (void)prepareForMenu:(NSMenu *)menu withEvent:(NSEvent *)event
 {
     [_data->_actionMenuController prepareForMenu:menu withEvent:event];
@@ -3658,6 +3663,8 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
     [_data->_actionMenuController didPerformActionMenuHitTest:hitTestResult];
 }
 
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+
 @end
 
 @implementation WKView (Private)
index 5f7f6bb5a89c0cc8cb9ef51f5053fdc6998a9c3d..7f0bedd257440857117742b2b563a90a55424395 100644 (file)
@@ -125,6 +125,8 @@ struct WebPageConfiguration;
 @property (readonly) WKFullScreenWindowController *_fullScreenWindowController;
 - (void)_closeFullScreenWindowController;
 
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
 - (void)_didPerformActionMenuHitTest:(const WebKit::ActionMenuHitTestResult&)hitTestResult;
+#endif
 
 @end
index 85a08d5b656d1ffd26dc85892efbdaca7718912f..936d28f881de1e51f4e515f63954fbe5d42f90ad 100644 (file)
@@ -755,7 +755,9 @@ CGRect PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates(CALayer *laye
 
 void PageClientImpl::didPerformActionMenuHitTest(const ActionMenuHitTestResult& result)
 {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
     [m_wkView _didPerformActionMenuHitTest:result];
+#endif
 }
 
 } // namespace WebKit
index 42b2b56311903611b22ee74b4bddcc2948317e4f..e0f28055919d938fb7b731ad9009e90a0fa5ca3d 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef WKActionMenuController_h
 #define WKActionMenuController_h
 
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+
 #import "ActionMenuHitTestResult.h"
 #import "WKActionMenuItemTypes.h"
 #import "WKActionMenuTypes.h"
@@ -66,4 +68,6 @@ enum class ActionMenuState {
 
 @end
 
+#endif // PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+
 #endif // WKActionMenuController_h
index 1afe366cb3ee20cf0871d85d2d97dfa8db9629dc..3646dc467030decad992b7a12659b356a02cc0ae 100644 (file)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "WKActionMenuController.h"
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
 
 #import "WKNSURLExtras.h"
 #import "WKViewInternal.h"