Cannot invoke action menus anymore
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Mar 2015 01:34:25 +0000 (01:34 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Mar 2015 01:34:25 +0000 (01:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142797
<rdar://problem/20032670>

* UIProcess/API/mac/WKView.mm:
Need a respondsToSelector check.

* WebView/WebHTMLView.mm:
(-[WebHTMLView otherMouseDown:]):
Need a respondsToSelector check.

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

Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebHTMLView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm

index 9bf93a4..4bd5d96 100644 (file)
@@ -1,5 +1,15 @@
 2015-03-17  Tim Horton  <timothy_horton@apple.com>
 
+        Cannot invoke action menus anymore
+        https://bugs.webkit.org/show_bug.cgi?id=142797
+        <rdar://problem/20032670>
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView otherMouseDown:]):
+        Need a respondsToSelector check.
+
+2015-03-17  Tim Horton  <timothy_horton@apple.com>
+
         Fix the iOS build
 
         * WebView/WebHTMLView.mm:
index afdbc23..12c8ad4 100644 (file)
@@ -5388,7 +5388,7 @@ static BOOL writingDirectionKeyBindingsEnabled()
 #if !PLATFORM(IOS)
 - (void)otherMouseDown:(NSEvent *)event
 {
-    if ([event buttonNumber] != 2 || [NSMenu menuTypeForEvent:event] == NSMenuTypeActionMenu) {
+    if ([event buttonNumber] != 2 || ([NSMenu respondsToSelector:@selector(menuTypeForEvent:)] && [NSMenu menuTypeForEvent:event] == NSMenuTypeActionMenu)) {
         [super otherMouseDown:event];
         return;
     }
index 908b82c..4e0f807 100644 (file)
@@ -4,6 +4,15 @@
         https://bugs.webkit.org/show_bug.cgi?id=142797
         <rdar://problem/20032670>
 
+        * UIProcess/API/mac/WKView.mm:
+        Need a respondsToSelector check.
+
+2015-03-17  Tim Horton  <timothy_horton@apple.com>
+
+        Cannot invoke action menus anymore
+        https://bugs.webkit.org/show_bug.cgi?id=142797
+        <rdar://problem/20032670>
+
         Reviewed by Beth Dakin.
 
         * UIProcess/API/mac/WKView.mm:
index d9a6f8a..3e5ef0a 100644 (file)
@@ -1177,7 +1177,7 @@ static NSToolbarItem *toolbarItem(id <NSValidatedUserInterfaceItem> item)
             }]; \
             return; \
         } \
-        if ([NSMenu menuTypeForEvent:theEvent] == NSMenuTypeActionMenu) { \
+        if ([NSMenu respondsToSelector:@selector(menuTypeForEvent:)] && [NSMenu menuTypeForEvent:theEvent] == NSMenuTypeActionMenu) { \
             [super Selector:theEvent]; \
             return; \
         } \