[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:29:50 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 532f06924a9d650b1ae80e4085f81d9065434451
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Mar 15 02:29:36 2003 +0000
Fixed: 3198961 - REGRESSION: Stopping load of plug-in content is not reflected in UI
Reviewed by mjs.
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient cancelWithError:]): call receivedError so [dataSource _receivedError:error complete:YES] is called
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 06fb86a..cccd19f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2003-03-14 Chris Blumenberg <cblu at apple.com>
+
+ Fixed: 3198961 - REGRESSION: Stopping load of plug-in content is not reflected in UI
+
+ Reviewed by mjs.
+
+ * WebView.subproj/WebMainResourceClient.m:
+ (-[WebMainResourceClient cancelWithError:]): call receivedError so [dataSource _receivedError:error complete:YES] is called
+
2003-03-14 Maciej Stachowiak <mjs at apple.com>
Reviewed by Don.
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
index 61213d2..1b43a73 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
@@ -22,6 +22,7 @@
#import <WebFoundation/WebAssertions.h>
#import <WebFoundation/WebHTTPRequest.h>
+#import <WebFoundation/WebNSDataExtras.h>
#import <WebFoundation/WebNSStringExtras.h>
#import <WebFoundation/WebNSURLExtras.h>
@@ -62,6 +63,11 @@ typedef struct {
@end
+ at interface NSData (PluginExtras)
+- (unsigned)locationAfterFirstBlankLine;
+ at end
+
+
@implementation WebBaseNetscapePluginView
#pragma mark EVENTS
@@ -1113,15 +1119,14 @@ typedef struct {
return [self loadRequest:request inTarget:cTarget withNotifyData:NULL];
}
--(NPError)postURLNotify:(const char *)URLCString
- target:(const char *)cTarget
- len:(UInt32)len
- buf:(const char *)buf
- file:(NPBool)file
- notifyData:(void *)notifyData
+- (NPError)_postURLNotify:(const char *)URLCString
+ target:(const char *)target
+ len:(UInt32)len
+ buf:(const char *)buf
+ file:(NPBool)file
+ notifyData:(void *)notifyData
+ allowHeaders:(BOOL)allowHeaders
{
- LOG(Plugins, "NPN_PostURLNotify: %s", URLCString);
-
if (!len || !buf) {
return NPERR_INVALID_PARAM;
}
@@ -1153,9 +1158,34 @@ typedef struct {
WebRequest *request = [self requestWithURLCString:URLCString];
[request setRequestMethod:@"POST"];
+
+ if (allowHeaders) {
+ unsigned location = [postData locationAfterFirstBlankLine];
+ if (location != NSNotFound) {
+ // If the blank line is somewhere in the middle of postData, everything before is the header.
+ NSData *headerData = [postData subdataWithRange:NSMakeRange(0, location)];
+ NSDictionary *header = [headerData _web_parseRFC822HeaderFields];
+ if (header) {
+ [request setHeader:header];
+ }
+ // Everything after the blank line is the actual content of the POST.
+ postData = [postData subdataWithRange:NSMakeRange(location, [postData length] - location)];
+ }
+ }
+
[request setRequestData:postData];
-
- return [self loadRequest:request inTarget:cTarget withNotifyData:notifyData];
+ return [self loadRequest:request inTarget:target withNotifyData:notifyData];
+}
+
+- (NPError)postURLNotify:(const char *)URLCString
+ target:(const char *)target
+ len:(UInt32)len
+ buf:(const char *)buf
+ file:(NPBool)file
+ notifyData:(void *)notifyData
+{
+ LOG(Plugins, "NPN_PostURLNotify: %s", URLCString);
+ return [self _postURLNotify:URLCString target:target len:len buf:buf file:file notifyData:notifyData allowHeaders:YES];
}
-(NPError)postURL:(const char *)URLCString
@@ -1165,7 +1195,7 @@ typedef struct {
file:(NPBool)file
{
LOG(Plugins, "NPN_PostURL: %s", URLCString);
- return [self postURLNotify:URLCString target:target len:len buf:buf file:file notifyData:NULL];
+ return [self _postURLNotify:URLCString target:target len:len buf:buf file:file notifyData:NULL allowHeaders:NO];
}
-(NPError)newStream:(NPMIMEType)type target:(const char *)target stream:(NPStream**)stream
@@ -1267,3 +1297,27 @@ typedef struct {
}
@end
+
+ at implementation NSData (PluginExtras)
+
+- (unsigned)locationAfterFirstBlankLine
+{
+ const char *bytes = (const char *)[self bytes];
+ unsigned length = [self length];
+
+ unsigned i;
+ for (i = 0; i < length - 2; i++) {
+ if (bytes[i] == '\n' && (i == 0 || bytes[i+1] == '\n')){
+ i++;
+ while (i < length - 2 && bytes[i] == '\n') {
+ i++;
+ }
+ return i;
+ }
+ }
+
+ return NSNotFound;
+}
+
+ at end
+
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 3b9d333..f352662 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -85,7 +85,8 @@
-(void)cancelWithError:(WebError *)error
{
[self cancelContentPolicy];
- [super cancelWithError:error];
+ [resource cancel];
+ [self receivedError:error];
}
- (WebError *)interruptForPolicyChangeError
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 3b9d333..f352662 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -85,7 +85,8 @@
-(void)cancelWithError:(WebError *)error
{
[self cancelContentPolicy];
- [super cancelWithError:error];
+ [resource cancel];
+ [self receivedError:error];
}
- (WebError *)interruptForPolicyChangeError
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list