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

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

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm

index 8bae8aa..67c5075 100644 (file)
@@ -1,3 +1,12 @@
+2015-03-18  Tim Horton  <timothy_horton@apple.com>
+
+        Cannot invoke action menus anymore
+        https://bugs.webkit.org/show_bug.cgi?id=142797
+        <rdar://problem/20032670>
+
+        * UIProcess/API/mac/WKView.mm:
+        Need one more respondsToSelector check.
+
 2015-03-18  Chris Dumez  <cdumez@apple.com>
 
         [WK2] Log the number of network cache requests that we have never seen before
index 3e5ef0a..e43e395 100644 (file)
@@ -1213,7 +1213,7 @@ static NSToolbarItem *toolbarItem(id <NSValidatedUserInterfaceItem> item)
             LOG(TextInput, "%s was handled by text input context", String(#Selector).substring(0, String(#Selector).find("Internal")).ascii().data()); \
             return; \
         } \
-        if ([NSMenu menuTypeForEvent:theEvent] == NSMenuTypeActionMenu) { \
+        if ([NSMenu respondsToSelector:@selector(menuTypeForEvent:)] && [NSMenu menuTypeForEvent:theEvent] == NSMenuTypeActionMenu) { \
             [super Selector:theEvent]; \
             return; \
         } \