Fix an internal build failure after r240292
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2019 00:43:18 +0000 (00:43 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2019 00:43:18 +0000 (00:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193580

Rubber-stamped by Wenson Hsieh.

* SourcesCocoa.txt:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKMenuTarget forwardContextMenuAction:]):
* WebKit.xcodeproj/project.pbxproj:
It was apparently unclear to the compiler sometimes which "state" selector to use, and this apparently mattered.
Tell the compiler to use the NSMenuItem selector, but at runtime it doesn't matter.

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

Source/WebKit/ChangeLog
Source/WebKit/SourcesCocoa.txt
Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
Source/WebKit/WebKit.xcodeproj/project.pbxproj

index 5addb61..f884697 100644 (file)
@@ -1,3 +1,17 @@
+2019-01-22  Alex Christensen  <achristensen@webkit.org>
+
+        Fix an internal build failure after r240292
+        https://bugs.webkit.org/show_bug.cgi?id=193580
+
+        Rubber-stamped by Wenson Hsieh.
+
+        * SourcesCocoa.txt:
+        * UIProcess/mac/WebContextMenuProxyMac.mm:
+        (-[WKMenuTarget forwardContextMenuAction:]):
+        * WebKit.xcodeproj/project.pbxproj:
+        It was apparently unclear to the compiler sometimes which "state" selector to use, and this apparently mattered.
+        Tell the compiler to use the NSMenuItem selector, but at runtime it doesn't matter.
+
 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         Unreviewed, fix -Wunused-but-set-variable warning
index 5dee761..66964cd 100644 (file)
@@ -255,6 +255,7 @@ UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm
 UIProcess/API/Cocoa/_WKWebsitePolicies.mm
 UIProcess/API/Cocoa/APIAttachmentCocoa.mm
 UIProcess/API/Cocoa/APIContentRuleListStoreCocoa.mm
+UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm
 UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm
 UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm
 UIProcess/API/Cocoa/LegacyBundleForClass.mm
index 6ade9ab..1e57474 100644 (file)
         return;
     }
 
-    WebKit::WebContextMenuItemData item(WebCore::ActionType, static_cast<WebCore::ContextMenuAction>([sender tag]), [sender title], [sender isEnabled], [sender state] == NSControlStateValueOn);
+    ASSERT(!sender || [sender isKindOfClass:NSMenuItem.class]);
+    WebKit::WebContextMenuItemData item(WebCore::ActionType, static_cast<WebCore::ContextMenuAction>([sender tag]), [sender title], [sender isEnabled], [(NSMenuItem *)sender state] == NSControlStateValueOn);
     if (representedObject) {
         ASSERT([representedObject isKindOfClass:[WKUserDataWrapper class]]);
         item.setUserData([static_cast<WKUserDataWrapper *>(representedObject) userData]);
index bd9132d..959e283 100644 (file)
                5CD286551E7235B80094FDC8 /* WKContentRuleListInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CD2864C1E722F440094FDC8 /* WKContentRuleListInternal.h */; };
                5CD286571E7235C90094FDC8 /* WKContentRuleListStoreInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CD2864F1E722F440094FDC8 /* WKContentRuleListStoreInternal.h */; };
                5CD286581E7235D10094FDC8 /* WKContentRuleListStorePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CD286501E722F440094FDC8 /* WKContentRuleListStorePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               5CE43B7221F7CC020093BCC5 /* APIHTTPCookieStoreCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CA46E7A21F1A23900CE86B4 /* APIHTTPCookieStoreCocoa.mm */; };
                5CE85B201C88E64B0070BFCE /* PingLoad.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CE85B1F1C88E6430070BFCE /* PingLoad.h */; };
                617A52D81F43A9DA00DCDC0A /* ServiceWorkerClientFetchMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 617A52D71F43A9B600DCDC0A /* ServiceWorkerClientFetchMessageReceiver.cpp */; };
                63108F961F96719C00A0DB84 /* _WKApplicationManifest.h in Headers */ = {isa = PBXBuildFile; fileRef = 63108F941F96719C00A0DB84 /* _WKApplicationManifest.h */; settings = {ATTRIBUTES = (Private, ); }; };
                                2D92A787212B6AB100F493FD /* ShareableBitmap.cpp in Sources */,
                                2DE6943D18BD2A68005C15E5 /* SmartMagnificationControllerMessageReceiver.cpp in Sources */,
                                1A334DED16DE8F88006A8E38 /* StorageAreaMapMessageReceiver.cpp in Sources */,
-                               5CE43B7221F7CC020093BCC5 /* APIHTTPCookieStoreCocoa.mm in Sources */,
                                1AB31A9616BC688100F6DBC9 /* StorageManagerMessageReceiver.cpp in Sources */,
                                2D92A783212B6A7100F493FD /* StringReference.cpp in Sources */,
                                2D11B7512126A282006F8878 /* UnifiedSource1-mm.mm in Sources */,