[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:24:10 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 2de85976c826fb06203c0ddcc5a407d58e4ec2d9
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jul 12 20:16:55 2002 +0000
top level:
* configure.in: Don't play games with RANLIB; we don't need that any more and it
just messes things up in the libiftest directory.
* Tests/libiftest/Makefile.am: Remove all the explicit options and just let libiftest.a
be built as the default kind of library (static, I assume).
WebKit:
Fix cancelling. My recent check-in broke it for downloads.
* WebCoreSupport.subproj/IFResourceURLHandleClient.m:
(-[IFResourceURLHandleClient receivedError:forHandle:]): Helper function to save code.
(-[IFResourceURLHandleClient IFURLHandleResourceDidCancelLoading:]): Use an error for
cancel rather than -1,-1 progress.
* WebView.subproj/IFMainURLHandleClient.mm:
(-[IFMainURLHandleClient receivedProgressWithHandle:complete:]): Remove -1,-1 handling
here; instead we treat it as an error.
(-[IFMainURLHandleClient receivedError:forHandle:]): Remove most of the parameters
since they are things we can compute ourselves.
(-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]): Use an error for
cancel rather than -1,-1 progress.
* WebView.subproj/IFWebControllerPrivate.mm:
(-[IFWebController _receivedProgress:forResourceHandle:fromDataSource:complete:]):
Remove the -1,-1 cancel handling; we use an error instead.
(-[IFWebController _mainReceivedProgress:forResourceHandle:fromDataSource:complete:]):
Remove the -1,-1 cancel handling; we use an error instead.
(-[IFWebController _receivedError:forResourceHandle:partialProgress:fromDataSource:]):
Remove the _isStopping check. We want to do the additional work even if already stopping.
(-[IFWebController _mainReceivedError:forResourceHandle:partialProgress:fromDataSource:]):
Remove the _isStopping check. We want to do the additional work even if already stopping.
* WebView.subproj/IFWebView.mm: (-[IFWebView keyDown:]): Use NSDeleteCharacter.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b57fb9a..ac487a8 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,34 @@
2002-07-12 Darin Adler <darin at apple.com>
+ Fix cancelling. My recent check-in broke it for downloads.
+
+ * WebCoreSupport.subproj/IFResourceURLHandleClient.m:
+ (-[IFResourceURLHandleClient receivedError:forHandle:]): Helper function to save code.
+ (-[IFResourceURLHandleClient IFURLHandleResourceDidCancelLoading:]): Use an error for
+ cancel rather than -1,-1 progress.
+
+ * WebView.subproj/IFMainURLHandleClient.mm:
+ (-[IFMainURLHandleClient receivedProgressWithHandle:complete:]): Remove -1,-1 handling
+ here; instead we treat it as an error.
+ (-[IFMainURLHandleClient receivedError:forHandle:]): Remove most of the parameters
+ since they are things we can compute ourselves.
+ (-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]): Use an error for
+ cancel rather than -1,-1 progress.
+
+ * WebView.subproj/IFWebControllerPrivate.mm:
+ (-[IFWebController _receivedProgress:forResourceHandle:fromDataSource:complete:]):
+ Remove the -1,-1 cancel handling; we use an error instead.
+ (-[IFWebController _mainReceivedProgress:forResourceHandle:fromDataSource:complete:]):
+ Remove the -1,-1 cancel handling; we use an error instead.
+ (-[IFWebController _receivedError:forResourceHandle:partialProgress:fromDataSource:]):
+ Remove the _isStopping check. We want to do the additional work even if already stopping.
+ (-[IFWebController _mainReceivedError:forResourceHandle:partialProgress:fromDataSource:]):
+ Remove the _isStopping check. We want to do the additional work even if already stopping.
+
+ * WebView.subproj/IFWebView.mm: (-[IFWebView keyDown:]): Use NSDeleteCharacter.
+
+2002-07-12 Darin Adler <darin at apple.com>
+
* WebView.subproj/IFWebDataSource.mm:
(+[IFWebDataSource registerRepresentationClass:forMIMEType:]):
Use self instead of [self class].
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index b57fb9a..ac487a8 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,34 @@
2002-07-12 Darin Adler <darin at apple.com>
+ Fix cancelling. My recent check-in broke it for downloads.
+
+ * WebCoreSupport.subproj/IFResourceURLHandleClient.m:
+ (-[IFResourceURLHandleClient receivedError:forHandle:]): Helper function to save code.
+ (-[IFResourceURLHandleClient IFURLHandleResourceDidCancelLoading:]): Use an error for
+ cancel rather than -1,-1 progress.
+
+ * WebView.subproj/IFMainURLHandleClient.mm:
+ (-[IFMainURLHandleClient receivedProgressWithHandle:complete:]): Remove -1,-1 handling
+ here; instead we treat it as an error.
+ (-[IFMainURLHandleClient receivedError:forHandle:]): Remove most of the parameters
+ since they are things we can compute ourselves.
+ (-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]): Use an error for
+ cancel rather than -1,-1 progress.
+
+ * WebView.subproj/IFWebControllerPrivate.mm:
+ (-[IFWebController _receivedProgress:forResourceHandle:fromDataSource:complete:]):
+ Remove the -1,-1 cancel handling; we use an error instead.
+ (-[IFWebController _mainReceivedProgress:forResourceHandle:fromDataSource:complete:]):
+ Remove the -1,-1 cancel handling; we use an error instead.
+ (-[IFWebController _receivedError:forResourceHandle:partialProgress:fromDataSource:]):
+ Remove the _isStopping check. We want to do the additional work even if already stopping.
+ (-[IFWebController _mainReceivedError:forResourceHandle:partialProgress:fromDataSource:]):
+ Remove the _isStopping check. We want to do the additional work even if already stopping.
+
+ * WebView.subproj/IFWebView.mm: (-[IFWebView keyDown:]): Use NSDeleteCharacter.
+
+2002-07-12 Darin Adler <darin at apple.com>
+
* WebView.subproj/IFWebDataSource.mm:
(+[IFWebDataSource registerRepresentationClass:forMIMEType:]):
Use self instead of [self class].
diff --git a/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m b/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m
index 7ff3a16..4202815 100644
--- a/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m
+++ b/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m
@@ -93,6 +93,12 @@
forResourceHandle:handle fromDataSource:dataSource complete:isComplete];
}
+- (void)receivedError:(IFError *)error forHandle:(IFURLHandle *)handle
+{
+ [[dataSource controller] _receivedError:error forResourceHandle:handle
+ partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+}
+
- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)handle
{
[self didStartLoadingWithURL:[handle url]];
@@ -109,12 +115,16 @@
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)handle
{
+ IFError *error;
+
[loader cancel];
[dataSource _removeURLHandle:handle];
- [[dataSource controller] _receivedProgress:[IFLoadProgress progress]
- forResourceHandle:handle fromDataSource:dataSource complete: YES];
+ error = [[IFError alloc] initWithErrorCode:IFURLHandleResultCancelled
+ inDomain:IFErrorCodeDomainWebFoundation failingURL:[dataSource inputURL]];
+ [self receivedError:error forHandle:handle];
+ [error release];
[self didStopLoading];
}
@@ -131,8 +141,7 @@
IFError *nonTerminalError = [handle error];
if (nonTerminalError) {
- [[dataSource controller] _receivedError:nonTerminalError forResourceHandle:handle
- partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+ [self receivedError:nonTerminalError forHandle:handle];
}
[self receivedProgressWithHandle:handle complete:YES];
@@ -148,8 +157,7 @@
[dataSource _removeURLHandle:handle];
- [[dataSource controller] _receivedError:error forResourceHandle:handle
- partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+ [self receivedError:error forHandle:handle];
[self didStopLoading];
}
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index 7ff3a16..4202815 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -93,6 +93,12 @@
forResourceHandle:handle fromDataSource:dataSource complete:isComplete];
}
+- (void)receivedError:(IFError *)error forHandle:(IFURLHandle *)handle
+{
+ [[dataSource controller] _receivedError:error forResourceHandle:handle
+ partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+}
+
- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)handle
{
[self didStartLoadingWithURL:[handle url]];
@@ -109,12 +115,16 @@
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)handle
{
+ IFError *error;
+
[loader cancel];
[dataSource _removeURLHandle:handle];
- [[dataSource controller] _receivedProgress:[IFLoadProgress progress]
- forResourceHandle:handle fromDataSource:dataSource complete: YES];
+ error = [[IFError alloc] initWithErrorCode:IFURLHandleResultCancelled
+ inDomain:IFErrorCodeDomainWebFoundation failingURL:[dataSource inputURL]];
+ [self receivedError:error forHandle:handle];
+ [error release];
[self didStopLoading];
}
@@ -131,8 +141,7 @@
IFError *nonTerminalError = [handle error];
if (nonTerminalError) {
- [[dataSource controller] _receivedError:nonTerminalError forResourceHandle:handle
- partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+ [self receivedError:nonTerminalError forHandle:handle];
}
[self receivedProgressWithHandle:handle complete:YES];
@@ -148,8 +157,7 @@
[dataSource _removeURLHandle:handle];
- [[dataSource controller] _receivedError:error forResourceHandle:handle
- partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+ [self receivedError:error forHandle:handle];
[self didStopLoading];
}
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index 7ff3a16..4202815 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -93,6 +93,12 @@
forResourceHandle:handle fromDataSource:dataSource complete:isComplete];
}
+- (void)receivedError:(IFError *)error forHandle:(IFURLHandle *)handle
+{
+ [[dataSource controller] _receivedError:error forResourceHandle:handle
+ partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+}
+
- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)handle
{
[self didStartLoadingWithURL:[handle url]];
@@ -109,12 +115,16 @@
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)handle
{
+ IFError *error;
+
[loader cancel];
[dataSource _removeURLHandle:handle];
- [[dataSource controller] _receivedProgress:[IFLoadProgress progress]
- forResourceHandle:handle fromDataSource:dataSource complete: YES];
+ error = [[IFError alloc] initWithErrorCode:IFURLHandleResultCancelled
+ inDomain:IFErrorCodeDomainWebFoundation failingURL:[dataSource inputURL]];
+ [self receivedError:error forHandle:handle];
+ [error release];
[self didStopLoading];
}
@@ -131,8 +141,7 @@
IFError *nonTerminalError = [handle error];
if (nonTerminalError) {
- [[dataSource controller] _receivedError:nonTerminalError forResourceHandle:handle
- partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+ [self receivedError:nonTerminalError forHandle:handle];
}
[self receivedProgressWithHandle:handle complete:YES];
@@ -148,8 +157,7 @@
[dataSource _removeURLHandle:handle];
- [[dataSource controller] _receivedError:error forResourceHandle:handle
- partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+ [self receivedError:error forHandle:handle];
[self didStopLoading];
}
diff --git a/WebKit/WebView.subproj/IFMainURLHandleClient.mm b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
index c2bd2ce..1747097 100644
--- a/WebKit/WebView.subproj/IFMainURLHandleClient.mm
+++ b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
@@ -74,18 +74,10 @@
{
IFLoadProgress *progress = [IFLoadProgress progressWithURLHandle:handle];
- if([dataSource contentPolicy] == IFContentPolicySaveAndOpenExternally || [dataSource contentPolicy] == IFContentPolicySave){
- if(isComplete)
- [dataSource _setPrimaryLoadComplete: YES];
-
- if (progress->bytesSoFar == -1 && progress->totalToLoad == -1) {
- IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled
- inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
- [dataSource _setMainDocumentError: error];
- [downloadProgressHandler receivedError: error forResourceHandle: handle partialProgress: progress fromDataSource: dataSource];
- [error release];
+ if ([dataSource contentPolicy] == IFContentPolicySaveAndOpenExternally || [dataSource contentPolicy] == IFContentPolicySave) {
+ if (isComplete) {
+ [dataSource _setPrimaryLoadComplete:YES];
}
-
[downloadProgressHandler receivedProgress:progress forResourceHandle:handle
fromDataSource:dataSource complete:isComplete];
} else {
@@ -94,14 +86,16 @@
}
}
-- (void)_receivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)theDataSource
+- (void)receivedError:(IFError *)error forHandle:(IFURLHandle *)handle
{
- if([dataSource contentPolicy] == IFContentPolicySaveAndOpenExternally || [dataSource contentPolicy] == IFContentPolicySave){
- [downloadProgressHandler receivedError:error forResourceHandle:resourceHandle
- partialProgress:progress fromDataSource:theDataSource];
- }else{
- [[dataSource controller] _mainReceivedError:error forResourceHandle:resourceHandle
- partialProgress:progress fromDataSource:theDataSource];
+ IFLoadProgress *progress = [IFLoadProgress progressWithURLHandle:handle];
+
+ if ([dataSource contentPolicy] == IFContentPolicySaveAndOpenExternally || [dataSource contentPolicy] == IFContentPolicySave) {
+ [downloadProgressHandler receivedError:error forResourceHandle:handle
+ partialProgress:progress fromDataSource:dataSource];
+ } else {
+ [[dataSource controller] _mainReceivedError:error forResourceHandle:handle
+ partialProgress:progress fromDataSource:dataSource];
}
}
@@ -114,9 +108,15 @@
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)handle
{
+ IFError *error;
+
WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "url = %s\n", DEBUG_OBJECT([handle url]));
- [self receivedProgressWithHandle:handle complete:YES];
+ // FIXME: Maybe we should be passing the URL from the handle here, not from the dataSource.
+ error = [[IFError alloc] initWithErrorCode:IFURLHandleResultCancelled
+ inDomain:IFErrorCodeDomainWebFoundation failingURL:[dataSource inputURL]];
+ [self receivedError:error forHandle:handle];
+ [error release];
[downloadHandler release];
downloadHandler = nil;
@@ -144,8 +144,7 @@
// Either send a final error message or a final progress message.
IFError *nonTerminalError = [handle error];
if (nonTerminalError){
- [self _receivedError:nonTerminalError forResourceHandle:handle
- partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+ [self receivedError:nonTerminalError forHandle:handle];
}
else {
[self receivedProgressWithHandle:handle complete:YES];
@@ -243,8 +242,7 @@
WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
- [self _receivedError:result forResourceHandle:handle
- partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+ [self receivedError:result forHandle:handle];
[downloadHandler cancel];
[downloadHandler release];
diff --git a/WebKit/WebView.subproj/IFWebControllerPrivate.mm b/WebKit/WebView.subproj/IFWebControllerPrivate.mm
index e4f7159..c1ba2e4 100644
--- a/WebKit/WebView.subproj/IFWebControllerPrivate.mm
+++ b/WebKit/WebView.subproj/IFWebControllerPrivate.mm
@@ -66,37 +66,18 @@
@implementation IFWebController (IFPrivate)
-- (void)_receivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource complete: (BOOL)isComplete
+- (void)_receivedProgress:(IFLoadProgress *)progress forResourceHandle:(IFURLHandle *)resourceHandle fromDataSource:(IFWebDataSource *)dataSource complete:(BOOL)isComplete
{
IFWebFrame *frame = [dataSource webFrame];
WEBKIT_ASSERT (dataSource != nil);
- if (progress->bytesSoFar == -1 && progress->totalToLoad == -1){
- WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
- if (frame != nil) {
- NSString *resourceString;
- IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
- [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
- if (resourceHandle != nil) {
- resourceString = [[resourceHandle url] absoluteString];
- } else {
- WEBKIT_ASSERT ([error failingURL] != nil);
- resourceString = [[error failingURL] absoluteString];
- }
- [dataSource _addError: error forResource: [[resourceHandle url] absoluteString]];
- [error release];
- [frame _checkLoadComplete];
- }
- return;
- }
-
[[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle
fromDataSource: dataSource complete:isComplete];
- // This resouce has completed, so check if the load is complete for all frames.
- if (isComplete){
- if (frame != nil){
+ // This resource has completed, so check if the load is complete for all frames.
+ if (isComplete) {
+ if (frame != nil) {
[frame _transitionProvisionalToLayoutAcceptable];
[frame _checkLoadComplete];
}
@@ -109,17 +90,6 @@
WEBKIT_ASSERT (dataSource != nil);
- if (progress->bytesSoFar == -1 && progress->totalToLoad == -1){
- WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
- [dataSource _setPrimaryLoadComplete: YES];
- IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
- [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
- [dataSource _setMainDocumentError: error];
- [error release];
- [frame _checkLoadComplete];
- return;
- }
-
[[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle
fromDataSource: dataSource complete:isComplete];
@@ -160,9 +130,6 @@
[[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
- if ([dataSource _isStopping])
- return;
-
WEBKIT_ASSERT (frame != nil);
[dataSource _addError: error forResource:
@@ -178,9 +145,6 @@
[[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
- if ([dataSource _isStopping])
- return;
-
WEBKIT_ASSERT (frame != nil);
[dataSource _setPrimaryLoadComplete: YES];
diff --git a/WebKit/WebView.subproj/IFWebView.mm b/WebKit/WebView.subproj/IFWebView.mm
index 8b34507..3eaf28b 100644
--- a/WebKit/WebView.subproj/IFWebView.mm
+++ b/WebKit/WebView.subproj/IFWebView.mm
@@ -23,8 +23,9 @@
#import <WebFoundation/IFNSURLExtensions.h>
#import <WebFoundation/WebFoundation.h>
-#define SpaceKey 0x0020
-#define DeleteKey 0x007F
+enum {
+ SpaceKey = 0x0020
+};
@implementation IFWebView
@@ -227,7 +228,7 @@
count = [characters length];
for (index = 0; index < count; ++index) {
switch ([characters characterAtIndex:index]) {
- case DeleteKey:
+ case NSDeleteCharacter:
[self _goBack];
callSuper = NO;
break;
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index e4f7159..c1ba2e4 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -66,37 +66,18 @@
@implementation IFWebController (IFPrivate)
-- (void)_receivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource complete: (BOOL)isComplete
+- (void)_receivedProgress:(IFLoadProgress *)progress forResourceHandle:(IFURLHandle *)resourceHandle fromDataSource:(IFWebDataSource *)dataSource complete:(BOOL)isComplete
{
IFWebFrame *frame = [dataSource webFrame];
WEBKIT_ASSERT (dataSource != nil);
- if (progress->bytesSoFar == -1 && progress->totalToLoad == -1){
- WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
- if (frame != nil) {
- NSString *resourceString;
- IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
- [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
- if (resourceHandle != nil) {
- resourceString = [[resourceHandle url] absoluteString];
- } else {
- WEBKIT_ASSERT ([error failingURL] != nil);
- resourceString = [[error failingURL] absoluteString];
- }
- [dataSource _addError: error forResource: [[resourceHandle url] absoluteString]];
- [error release];
- [frame _checkLoadComplete];
- }
- return;
- }
-
[[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle
fromDataSource: dataSource complete:isComplete];
- // This resouce has completed, so check if the load is complete for all frames.
- if (isComplete){
- if (frame != nil){
+ // This resource has completed, so check if the load is complete for all frames.
+ if (isComplete) {
+ if (frame != nil) {
[frame _transitionProvisionalToLayoutAcceptable];
[frame _checkLoadComplete];
}
@@ -109,17 +90,6 @@
WEBKIT_ASSERT (dataSource != nil);
- if (progress->bytesSoFar == -1 && progress->totalToLoad == -1){
- WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
- [dataSource _setPrimaryLoadComplete: YES];
- IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
- [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
- [dataSource _setMainDocumentError: error];
- [error release];
- [frame _checkLoadComplete];
- return;
- }
-
[[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle
fromDataSource: dataSource complete:isComplete];
@@ -160,9 +130,6 @@
[[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
- if ([dataSource _isStopping])
- return;
-
WEBKIT_ASSERT (frame != nil);
[dataSource _addError: error forResource:
@@ -178,9 +145,6 @@
[[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
- if ([dataSource _isStopping])
- return;
-
WEBKIT_ASSERT (frame != nil);
[dataSource _setPrimaryLoadComplete: YES];
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 8b34507..3eaf28b 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -23,8 +23,9 @@
#import <WebFoundation/IFNSURLExtensions.h>
#import <WebFoundation/WebFoundation.h>
-#define SpaceKey 0x0020
-#define DeleteKey 0x007F
+enum {
+ SpaceKey = 0x0020
+};
@implementation IFWebView
@@ -227,7 +228,7 @@
count = [characters length];
for (index = 0; index < count; ++index) {
switch ([characters characterAtIndex:index]) {
- case DeleteKey:
+ case NSDeleteCharacter:
[self _goBack];
callSuper = NO;
break;
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index c2bd2ce..1747097 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -74,18 +74,10 @@
{
IFLoadProgress *progress = [IFLoadProgress progressWithURLHandle:handle];
- if([dataSource contentPolicy] == IFContentPolicySaveAndOpenExternally || [dataSource contentPolicy] == IFContentPolicySave){
- if(isComplete)
- [dataSource _setPrimaryLoadComplete: YES];
-
- if (progress->bytesSoFar == -1 && progress->totalToLoad == -1) {
- IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled
- inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
- [dataSource _setMainDocumentError: error];
- [downloadProgressHandler receivedError: error forResourceHandle: handle partialProgress: progress fromDataSource: dataSource];
- [error release];
+ if ([dataSource contentPolicy] == IFContentPolicySaveAndOpenExternally || [dataSource contentPolicy] == IFContentPolicySave) {
+ if (isComplete) {
+ [dataSource _setPrimaryLoadComplete:YES];
}
-
[downloadProgressHandler receivedProgress:progress forResourceHandle:handle
fromDataSource:dataSource complete:isComplete];
} else {
@@ -94,14 +86,16 @@
}
}
-- (void)_receivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)theDataSource
+- (void)receivedError:(IFError *)error forHandle:(IFURLHandle *)handle
{
- if([dataSource contentPolicy] == IFContentPolicySaveAndOpenExternally || [dataSource contentPolicy] == IFContentPolicySave){
- [downloadProgressHandler receivedError:error forResourceHandle:resourceHandle
- partialProgress:progress fromDataSource:theDataSource];
- }else{
- [[dataSource controller] _mainReceivedError:error forResourceHandle:resourceHandle
- partialProgress:progress fromDataSource:theDataSource];
+ IFLoadProgress *progress = [IFLoadProgress progressWithURLHandle:handle];
+
+ if ([dataSource contentPolicy] == IFContentPolicySaveAndOpenExternally || [dataSource contentPolicy] == IFContentPolicySave) {
+ [downloadProgressHandler receivedError:error forResourceHandle:handle
+ partialProgress:progress fromDataSource:dataSource];
+ } else {
+ [[dataSource controller] _mainReceivedError:error forResourceHandle:handle
+ partialProgress:progress fromDataSource:dataSource];
}
}
@@ -114,9 +108,15 @@
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)handle
{
+ IFError *error;
+
WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "url = %s\n", DEBUG_OBJECT([handle url]));
- [self receivedProgressWithHandle:handle complete:YES];
+ // FIXME: Maybe we should be passing the URL from the handle here, not from the dataSource.
+ error = [[IFError alloc] initWithErrorCode:IFURLHandleResultCancelled
+ inDomain:IFErrorCodeDomainWebFoundation failingURL:[dataSource inputURL]];
+ [self receivedError:error forHandle:handle];
+ [error release];
[downloadHandler release];
downloadHandler = nil;
@@ -144,8 +144,7 @@
// Either send a final error message or a final progress message.
IFError *nonTerminalError = [handle error];
if (nonTerminalError){
- [self _receivedError:nonTerminalError forResourceHandle:handle
- partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+ [self receivedError:nonTerminalError forHandle:handle];
}
else {
[self receivedProgressWithHandle:handle complete:YES];
@@ -243,8 +242,7 @@
WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
- [self _receivedError:result forResourceHandle:handle
- partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+ [self receivedError:result forHandle:handle];
[downloadHandler cancel];
[downloadHandler release];
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index c2bd2ce..1747097 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -74,18 +74,10 @@
{
IFLoadProgress *progress = [IFLoadProgress progressWithURLHandle:handle];
- if([dataSource contentPolicy] == IFContentPolicySaveAndOpenExternally || [dataSource contentPolicy] == IFContentPolicySave){
- if(isComplete)
- [dataSource _setPrimaryLoadComplete: YES];
-
- if (progress->bytesSoFar == -1 && progress->totalToLoad == -1) {
- IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled
- inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
- [dataSource _setMainDocumentError: error];
- [downloadProgressHandler receivedError: error forResourceHandle: handle partialProgress: progress fromDataSource: dataSource];
- [error release];
+ if ([dataSource contentPolicy] == IFContentPolicySaveAndOpenExternally || [dataSource contentPolicy] == IFContentPolicySave) {
+ if (isComplete) {
+ [dataSource _setPrimaryLoadComplete:YES];
}
-
[downloadProgressHandler receivedProgress:progress forResourceHandle:handle
fromDataSource:dataSource complete:isComplete];
} else {
@@ -94,14 +86,16 @@
}
}
-- (void)_receivedError: (IFError *)error forResourceHandle: (IFURLHandle *)resourceHandle partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)theDataSource
+- (void)receivedError:(IFError *)error forHandle:(IFURLHandle *)handle
{
- if([dataSource contentPolicy] == IFContentPolicySaveAndOpenExternally || [dataSource contentPolicy] == IFContentPolicySave){
- [downloadProgressHandler receivedError:error forResourceHandle:resourceHandle
- partialProgress:progress fromDataSource:theDataSource];
- }else{
- [[dataSource controller] _mainReceivedError:error forResourceHandle:resourceHandle
- partialProgress:progress fromDataSource:theDataSource];
+ IFLoadProgress *progress = [IFLoadProgress progressWithURLHandle:handle];
+
+ if ([dataSource contentPolicy] == IFContentPolicySaveAndOpenExternally || [dataSource contentPolicy] == IFContentPolicySave) {
+ [downloadProgressHandler receivedError:error forResourceHandle:handle
+ partialProgress:progress fromDataSource:dataSource];
+ } else {
+ [[dataSource controller] _mainReceivedError:error forResourceHandle:handle
+ partialProgress:progress fromDataSource:dataSource];
}
}
@@ -114,9 +108,15 @@
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)handle
{
+ IFError *error;
+
WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "url = %s\n", DEBUG_OBJECT([handle url]));
- [self receivedProgressWithHandle:handle complete:YES];
+ // FIXME: Maybe we should be passing the URL from the handle here, not from the dataSource.
+ error = [[IFError alloc] initWithErrorCode:IFURLHandleResultCancelled
+ inDomain:IFErrorCodeDomainWebFoundation failingURL:[dataSource inputURL]];
+ [self receivedError:error forHandle:handle];
+ [error release];
[downloadHandler release];
downloadHandler = nil;
@@ -144,8 +144,7 @@
// Either send a final error message or a final progress message.
IFError *nonTerminalError = [handle error];
if (nonTerminalError){
- [self _receivedError:nonTerminalError forResourceHandle:handle
- partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+ [self receivedError:nonTerminalError forHandle:handle];
}
else {
[self receivedProgressWithHandle:handle complete:YES];
@@ -243,8 +242,7 @@
WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
- [self _receivedError:result forResourceHandle:handle
- partialProgress:[IFLoadProgress progressWithURLHandle:handle] fromDataSource:dataSource];
+ [self receivedError:result forHandle:handle];
[downloadHandler cancel];
[downloadHandler release];
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index e4f7159..c1ba2e4 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -66,37 +66,18 @@
@implementation IFWebController (IFPrivate)
-- (void)_receivedProgress: (IFLoadProgress *)progress forResourceHandle: (IFURLHandle *)resourceHandle fromDataSource: (IFWebDataSource *)dataSource complete: (BOOL)isComplete
+- (void)_receivedProgress:(IFLoadProgress *)progress forResourceHandle:(IFURLHandle *)resourceHandle fromDataSource:(IFWebDataSource *)dataSource complete:(BOOL)isComplete
{
IFWebFrame *frame = [dataSource webFrame];
WEBKIT_ASSERT (dataSource != nil);
- if (progress->bytesSoFar == -1 && progress->totalToLoad == -1){
- WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
- if (frame != nil) {
- NSString *resourceString;
- IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
- [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
- if (resourceHandle != nil) {
- resourceString = [[resourceHandle url] absoluteString];
- } else {
- WEBKIT_ASSERT ([error failingURL] != nil);
- resourceString = [[error failingURL] absoluteString];
- }
- [dataSource _addError: error forResource: [[resourceHandle url] absoluteString]];
- [error release];
- [frame _checkLoadComplete];
- }
- return;
- }
-
[[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle
fromDataSource: dataSource complete:isComplete];
- // This resouce has completed, so check if the load is complete for all frames.
- if (isComplete){
- if (frame != nil){
+ // This resource has completed, so check if the load is complete for all frames.
+ if (isComplete) {
+ if (frame != nil) {
[frame _transitionProvisionalToLayoutAcceptable];
[frame _checkLoadComplete];
}
@@ -109,17 +90,6 @@
WEBKIT_ASSERT (dataSource != nil);
- if (progress->bytesSoFar == -1 && progress->totalToLoad == -1){
- WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
- [dataSource _setPrimaryLoadComplete: YES];
- IFError *error = [[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled inDomain:IFErrorCodeDomainWebFoundation failingURL: [dataSource inputURL]];
- [[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
- [dataSource _setMainDocumentError: error];
- [error release];
- [frame _checkLoadComplete];
- return;
- }
-
[[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle
fromDataSource: dataSource complete:isComplete];
@@ -160,9 +130,6 @@
[[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
- if ([dataSource _isStopping])
- return;
-
WEBKIT_ASSERT (frame != nil);
[dataSource _addError: error forResource:
@@ -178,9 +145,6 @@
[[self resourceProgressHandler] receivedError: error forResourceHandle: resourceHandle partialProgress: progress fromDataSource: dataSource];
- if ([dataSource _isStopping])
- return;
-
WEBKIT_ASSERT (frame != nil);
[dataSource _setPrimaryLoadComplete: YES];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list