- fixed <rdar://problem/
4034603> REGRESSION (185-188): RadarWeb can't send enclosures anymore
* WebView.subproj/WebFormDataStream.m:
(closeCurrentStream): Release currentData when closing the stream.
(advanceCurrentStream): Set up and retain currentData when the current stream is reading that data, so the
data won't be released while in use.
(formCreate): Initialize currentData to NULL.
- fixed <rdar://problem/
4037562> Tiger8A402: Help Viewer crashed when viewing help for iChat (infinite recursion in WebView)
* WebView.subproj/WebView.m: (-[WebView _responderValidateUserInterfaceItem:]):
Check for the case where we ourselves are the responder. This avoids an infinite loop.
The actual code to perform operations avoids this with a global variable, but this lighter weight
solution is sufficient here because validate operations don't call through to the next responder.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8793
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-03-05 Darin Adler <darin@apple.com>
+
+ Reviewed by John.
+
+ - fixed <rdar://problem/4034603> REGRESSION (185-188): RadarWeb can't send enclosures anymore
+
+ * WebView.subproj/WebFormDataStream.m:
+ (closeCurrentStream): Release currentData when closing the stream.
+ (advanceCurrentStream): Set up and retain currentData when the current stream is reading that data, so the
+ data won't be released while in use.
+ (formCreate): Initialize currentData to NULL.
+
+ - fixed <rdar://problem/4037562> Tiger8A402: Help Viewer crashed when viewing help for iChat (infinite recursion in WebView)
+
+ * WebView.subproj/WebView.m: (-[WebView _responderValidateUserInterfaceItem:]):
+ Check for the case where we ourselves are the responder. This avoids an infinite loop.
+ The actual code to perform operations avoids this with a global variable, but this lighter weight
+ solution is sufficient here because validate operations don't call through to the next responder.
+
2005-03-04 Richard Williamson <rjw@apple.com>
Fixed <rdar://problem/3968753> REGRESSION: Poor performance with differing multiple animated GIFs (was fast in Panther)
CFMutableSetRef scheduledRunLoopPairs;
CFMutableArrayRef formDataArray;
CFReadStreamRef currentStream;
+ CFDataRef currentData;
CFReadStreamRef formStream;
} FormStreamFields;
CFRelease(form->currentStream);
form->currentStream = NULL;
}
+ if (form->currentData) {
+ CFRelease(form->currentData);
+ form->currentData = NULL;
+ }
}
static void scheduleWithPair(const void *value, void *context)
// nextInput is a CFData containing an absolute path
CFDataRef data = (CFDataRef)nextInput;
form->currentStream = CFReadStreamCreateWithBytesNoCopy(alloc, CFDataGetBytePtr(data), CFDataGetLength(data), kCFAllocatorNull);
+ form->currentData = data;
+ CFRetain(data);
} else {
// nextInput is a CFString containing an absolute path
CFStringRef path = (CFStringRef)nextInput;
newInfo->scheduledRunLoopPairs = CFSetCreateMutable(alloc, 0, &runLoopAndModeCallBacks);
newInfo->formDataArray = CFArrayCreateMutableCopy(alloc, CFArrayGetCount(formDataArray), formDataArray);
newInfo->currentStream = NULL;
+ newInfo->currentData = NULL;
newInfo->formStream = stream; // Don't retain. That would create a reference cycle.
return newInfo;
}
- (BOOL)_responderValidateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item
{
id responder = [self _responderForResponderOperations];
- if ([responder respondsToSelector:[item action]]) {
+ if (responder != self && [responder respondsToSelector:[item action]]) {
if ([responder respondsToSelector:@selector(validateUserInterfaceItem:)]) {
return [responder validateUserInterfaceItem:item];
}
}
#define VALIDATE(name) \
-else if (action == @selector(name:)) { return [self _responderValidateUserInterfaceItem:item]; }
+ else if (action == @selector(name:)) { return [self _responderValidateUserInterfaceItem:item]; }
- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item
{