[webkit-changes] cvs commit: WebKit/Carbon.subproj HIWebView.m
Timothy
thatcher at opensource.apple.com
Mon Dec 12 15:22:49 PST 2005
thatcher 05/12/12 15:22:48
Modified: . Tag: Safari-2-0-branch ChangeLog
Carbon.subproj Tag: Safari-2-0-branch HIWebView.m
Log:
Merged fix from TOT to Safari-2-0-branch
2005-12-09 Tim Omernick <timo at apple.com>
Reviewed by John Sullivan.
Don't call -performSelector:withObject: on a method that returns a BOOL; this is not guaranteed to work on all architectures.
-performSelector:withObject:'s return value should only be checked if the method returns an object.
* Carbon.subproj/HIWebView.m:
(UpdateCommandStatus):
Revision Changes Path
No revision
No revision
1.3118.4.91 +14 -0 WebKit/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebKit/ChangeLog,v
retrieving revision 1.3118.4.90
retrieving revision 1.3118.4.91
diff -u -r1.3118.4.90 -r1.3118.4.91
--- ChangeLog 9 Dec 2005 22:06:38 -0000 1.3118.4.90
+++ ChangeLog 12 Dec 2005 23:22:37 -0000 1.3118.4.91
@@ -1,3 +1,17 @@
+2005-12-12 Timothy Hatcher <timothy at apple.com>
+
+ Merged fix from TOT to Safari-2-0-branch
+
+ 2005-12-09 Tim Omernick <timo at apple.com>
+
+ Reviewed by John Sullivan.
+
+ Don't call -performSelector:withObject: on a method that returns a BOOL; this is not guaranteed to work on all architectures.
+ -performSelector:withObject:'s return value should only be checked if the method returns an object.
+
+ * Carbon.subproj/HIWebView.m:
+ (UpdateCommandStatus):
+
=== WebKit-417.8 ===
2005-12-08 Tim Omernick <timo at apple.com>
No revision
No revision
1.25.8.1 +5 -2 WebKit/Carbon.subproj/HIWebView.m
Index: HIWebView.m
===================================================================
RCS file: /cvs/root/WebKit/Carbon.subproj/HIWebView.m,v
retrieving revision 1.25
retrieving revision 1.25.8.1
diff -u -r1.25 -r1.25.8.1
--- HIWebView.m 21 Jan 2005 22:43:54 -0000 1.25
+++ HIWebView.m 12 Dec 2005 23:22:48 -0000 1.25.8.1
@@ -16,7 +16,7 @@
#include <CoreGraphics/CGSEvent.h>
#include <WebKit/WebKit.h>
#include "HIViewAdapter.h"
-
+#import <objc/objc-runtime.h>
extern Boolean GetEventPlatformEventRecord( EventRef inEvent, void * eventRec );
Boolean WebGetEventPlatformEventRecord( EventRef inEvent, void * eventRec );
@@ -1280,7 +1280,10 @@
{
proxy = [[MenuItemProxy alloc] initWithAction: selector];
- if ( [resp performSelector:@selector(validateUserInterfaceItem:) withObject: proxy] )
+ // Can't use -performSelector:withObject: here because the method we're calling returns BOOL, while
+ // -performSelector:withObject:'s return value is assumed to be an id.
+ BOOL (*validationFunction)(id, SEL, id) = (BOOL (*)(id, SEL, id))objc_msgSend;
+ if (validationFunction(resp, @selector(validateUserInterfaceItem:), proxy))
EnableMenuItem( inCommand->menu.menuRef, inCommand->menu.menuItemIndex );
else
DisableMenuItem( inCommand->menu.menuRef, inCommand->menu.menuItemIndex );
More information about the webkit-changes
mailing list