WebKit:
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Feb 2003 19:32:21 +0000 (19:32 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Feb 2003 19:32:21 +0000 (19:32 +0000)
        Rename WebError to WebKitError.

        Reviewed by maciej.

        * API-Issues.rtf:
        * Bookmarks.subproj/WebBookmarkImporter.m:
        (-[WebBookmarkImporter initWithPath:]):
        * Downloads.subproj/WebDownloadHandler.m:
        (-[WebDownloadHandler createFileIfNecessary]):
        (-[WebDownloadHandler writeDataForkData:resourceForkData:]):
        (-[WebDownloadHandler decodeData:]):
        (-[WebDownloadHandler finishedLoading]):
        * Misc.subproj/WebKitErrors.h:
        * Plugins.subproj/WebNetscapePluginDocumentView.m:
        (-[WebNetscapePluginDocumentView setDataSource:]):
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]):
        (-[WebBridge viewForJavaAppletWithFrame:attributes:baseURL:]):
        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate notifyDelegatesOfInterruptionByPolicyChange]):
        * WebView.subproj/WebFramePrivate.m:
        (-[WebFrame _continueAfterNavigationPolicy:]):
        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient interruptForPolicyChangeAndKeepLoading:]):
        (-[WebMainResourceClient continueAfterContentPolicy:response:]):
        * WebView.subproj/WebView.m:
        (+[WebView initialize]):
WebBrowser:
        Rename WebError to WebKitError.

        Reviewed by maciej.

        * BrowserWebController.m:
        (-[BrowserWebController unableToImplementPolicy:error:forURL:inFrame:]):
        * LoadProgressMonitor.m:
        (-[LoadProgressMonitor pluginFailedWithError:dataSource:]):
        * LocationChangeHandler.m:
        (-[LocationChangeHandler locationChangeDone:forDataSource:]):

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

14 files changed:
WebKit/API-Issues.rtf
WebKit/Bookmarks.subproj/WebBookmarkImporter.m
WebKit/ChangeLog
WebKit/Downloads.subproj/WebDownload.m
WebKit/Downloads.subproj/WebDownloadHandler.m
WebKit/Misc.subproj/WebKitErrors.h
WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
WebKit/WebCoreSupport.subproj/WebBridge.m
WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
WebKit/WebView.subproj/WebFramePrivate.m
WebKit/WebView.subproj/WebFrameView.m
WebKit/WebView.subproj/WebLoader.m
WebKit/WebView.subproj/WebMainResourceClient.m
WebKit/WebView.subproj/WebMainResourceLoader.m

index 24dae60..025e82c 100644 (file)
@@ -1,18 +1,21 @@
 {\rtf1\mac\ansicpg10000\cocoartf102
 {\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;}
 {\colortbl;\red255\green255\blue255;}
-\margl1440\margr1440\vieww14640\viewh12640\viewkind0
+\margl1440\margr1440\vieww16540\viewh12180\viewkind0
 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
 
 \f0\b\fs24 \cf0 API Cleanup:
 \f1\b0 \
 \
-1.  WebHistory currently inherits from WebCoreHistory.  No WebCore related APIs should be publicly visible. (1day)\
-2.  Methods from specific representations (WebHTMLView and WebHTMLRepresentation) need to be factored into protocols or moved to WebView and WebDataSource.  This task is mostly complete already. (3083733, 1 day)\
-3.  Need closure on whether WebFoundation APIs will be public or not.  If public, not much work needs to be done.  If private, we need to expose relevant WebFoundation APIs in WebKit (WebError, WebResourceRequest, WebResourceResponse, WebHandle).  (2 days)\
+1.  WebHistory currently inherits from WebCoreHistory.  No WebCore related APIs should be publicly visible. (1day) (DONE)\
+2.  Methods from specific representations (WebHTMLView and WebHTMLRepresentation) need to be factored into protocols or moved to WebView and WebDataSource.  This task is mostly complete already. (3083733, 1 day) (DONE)\
+3.  Need closure on whether WebFoundation APIs will be public or not.  If public, not much work needs to be done.  If private, we need to expose relevant WebFoundation APIs in WebKit (WebError, WebResourceRequest, WebResourceResponse, WebHandle).  (2 days) (DONE)\
 3a.  Need to finalize decision on use of NSString or NSURL to express URLs in APIs.  (1 day)\
-4.  WebKit error codes should use WebKit prefix.  (3078996, .5 day).\
-5.  Remove all references to DOM classes from public API and make DOM classes SPI. (.5 day)\
+4.  WebKit error codes should use WebKit prefix.  (3078996, .5 day). (DONE, still need to update WebFoundation errors)\
+5.  Remove all references to DOM classes from public API and make DOM classes SPI. (.5 day) DONE\
+6.  Separate download behavior from WebResourceLoadDelegate.\
+7.  Make NSMenuItems identifiable in WebContentMenuDelegate.\
+\
 \
 
 \f0\b Incomplete API:
index 300c449..c8d7a6b 100644 (file)
@@ -184,7 +184,7 @@ static NSString *_linkTextFromSpec(NSString *spec)
     
     NSData *data = [[NSData alloc] initWithContentsOfFile:path];
     if (!data) {
-        error = [[WebError alloc] initWithErrorCode:WebErrorCannotOpenFile inDomain:WebErrorDomainWebKit failingURL:path];
+        error = [[WebError alloc] initWithErrorCode:WebKitErrorCannotOpenFile inDomain:WebErrorDomainWebKit failingURL:path];
     }
 
     NSString *string = [[NSString alloc] initWithData:data encoding:NSISOLatin1StringEncoding];
index 2f3b1f0..72f0b1f 100644 (file)
@@ -1,3 +1,33 @@
+2003-02-06  Richard Williamson   <rjw@apple.com>
+
+        Rename WebError to WebKitError.
+        
+        Reviewed by maciej.
+
+        * API-Issues.rtf:
+        * Bookmarks.subproj/WebBookmarkImporter.m:
+        (-[WebBookmarkImporter initWithPath:]):
+        * Downloads.subproj/WebDownloadHandler.m:
+        (-[WebDownloadHandler createFileIfNecessary]):
+        (-[WebDownloadHandler writeDataForkData:resourceForkData:]):
+        (-[WebDownloadHandler decodeData:]):
+        (-[WebDownloadHandler finishedLoading]):
+        * Misc.subproj/WebKitErrors.h:
+        * Plugins.subproj/WebNetscapePluginDocumentView.m:
+        (-[WebNetscapePluginDocumentView setDataSource:]):
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]):
+        (-[WebBridge viewForJavaAppletWithFrame:attributes:baseURL:]):
+        * WebView.subproj/WebBaseResourceHandleDelegate.m:
+        (-[WebBaseResourceHandleDelegate notifyDelegatesOfInterruptionByPolicyChange]):
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _continueAfterNavigationPolicy:]):
+        * WebView.subproj/WebMainResourceClient.m:
+        (-[WebMainResourceClient interruptForPolicyChangeAndKeepLoading:]):
+        (-[WebMainResourceClient continueAfterContentPolicy:response:]):
+        * WebView.subproj/WebView.m:
+        (+[WebView initialize]):
+
 2003-02-05  Chris Blumenberg  <cblu@apple.com>
 
         Comment should have been "Made WebPluginError constructors private."
index 617c1cd..60be428 100644 (file)
     
     if (![fileManager _web_createFileAtPath:path contents:nil attributes:fileAttributes]) {
         ERROR("-[NSFileManager _web_createFileAtPath:contents:attributes:] failed.");
-        return [self errorWithCode:WebErrorCannotCreateFile];
+        return [self errorWithCode:WebKitErrorCannotCreateFile];
     }
 
     [[NSWorkspace sharedWorkspace] _web_noteFileChangedAtPath:path];
     } else {
         ERROR("FSPathMakeRef failed.");
         [self cleanUpAfterFailure];
-        return [self errorWithCode:WebErrorCannotCreateFile];
+        return [self errorWithCode:WebKitErrorCannotCreateFile];
     }
 
     return nil;
     if (!didWrite) {
         ERROR("Writing to download file failed.");
         [self cleanUpAfterFailure];
-        return [self errorWithCode:WebErrorCannotWriteToFile];
+        return [self errorWithCode:WebKitErrorCannotWriteToFile];
     }
 
     return nil;
     if (![self decodeData:data dataForkData:&dataForkData resourceForkData:&resourceForkData]) {
         ERROR("Download decoding failed.");
         [self cleanUpAfterFailure];
-        return [self errorWithCode:WebErrorDownloadDecodingFailedMidStream];
+        return [self errorWithCode:WebKitErrorDownloadDecodingFailedMidStream];
     }
 
     WebError *error = [self writeDataForkData:dataForkData resourceForkData:resourceForkData];
     if (![self finishDecoding]) {
         ERROR("Download decoding failed.");
         [self cleanUpAfterFailure];
-        return [self errorWithCode:WebErrorDownloadDecodingFailedToComplete];
+        return [self errorWithCode:WebKitErrorDownloadDecodingFailedToComplete];
     }
 
     [self closeFile];
index 617c1cd..60be428 100644 (file)
     
     if (![fileManager _web_createFileAtPath:path contents:nil attributes:fileAttributes]) {
         ERROR("-[NSFileManager _web_createFileAtPath:contents:attributes:] failed.");
-        return [self errorWithCode:WebErrorCannotCreateFile];
+        return [self errorWithCode:WebKitErrorCannotCreateFile];
     }
 
     [[NSWorkspace sharedWorkspace] _web_noteFileChangedAtPath:path];
     } else {
         ERROR("FSPathMakeRef failed.");
         [self cleanUpAfterFailure];
-        return [self errorWithCode:WebErrorCannotCreateFile];
+        return [self errorWithCode:WebKitErrorCannotCreateFile];
     }
 
     return nil;
     if (!didWrite) {
         ERROR("Writing to download file failed.");
         [self cleanUpAfterFailure];
-        return [self errorWithCode:WebErrorCannotWriteToFile];
+        return [self errorWithCode:WebKitErrorCannotWriteToFile];
     }
 
     return nil;
     if (![self decodeData:data dataForkData:&dataForkData resourceForkData:&resourceForkData]) {
         ERROR("Download decoding failed.");
         [self cleanUpAfterFailure];
-        return [self errorWithCode:WebErrorDownloadDecodingFailedMidStream];
+        return [self errorWithCode:WebKitErrorDownloadDecodingFailedMidStream];
     }
 
     WebError *error = [self writeDataForkData:dataForkData resourceForkData:resourceForkData];
     if (![self finishDecoding]) {
         ERROR("Download decoding failed.");
         [self cleanUpAfterFailure];
-        return [self errorWithCode:WebErrorDownloadDecodingFailedToComplete];
+        return [self errorWithCode:WebKitErrorDownloadDecodingFailedToComplete];
     }
 
     [self closeFile];
index 0528cb6..8f8c522 100644 (file)
@@ -12,36 +12,36 @@ extern NSString *WebErrorDomainWebKit;
 
 /*!
     @enum
-    @constant WebErrorCannotCreateFile
-    @constant WebErrorCannotOpenFile
-    @constant WebErrorCannotWriteToFile
-    @constant WebErrorCannotRemoveFile
-    @constant WebErrorCannotFindApplicationForFile
-    @constant WebErrorFinderCannotOpenDirectory
-    @constant WebErrorCannotShowDirectory
-    @constant WebErrorCannotShowMIMEType
-    @constant WebErrorCannotShowURL
-    @constant WebErrorCannotNotFindApplicationForURL
-    @constant WebErrorLocationChangeInterruptedByPolicyChange
-    @constant WebErrorDownloadDecodingFailedMidStream
-    @constant WebErrorDownloadDecodingFailedToComplete
+    @constant WebKitErrorCannotCreateFile
+    @constant WebKitErrorCannotOpenFile
+    @constant WebKitErrorCannotWriteToFile
+    @constant WebKitErrorCannotRemoveFile
+    @constant WebKitErrorCannotFindApplicationForFile
+    @constant WebKitErrorFinderCannotOpenDirectory
+    @constant WebKitErrorCannotShowDirectory
+    @constant WebKitErrorCannotShowMIMEType
+    @constant WebKitErrorCannotShowURL
+    @constant WebKitErrorCannotNotFindApplicationForURL
+    @constant WebKitErrorLocationChangeInterruptedByPolicyChange
+    @constant WebKitErrorDownloadDecodingFailedMidStream
+    @constant WebKitErrorDownloadDecodingFailedToComplete
 */
 enum {
-    WebErrorCannotCreateFile,
-    WebErrorCannotOpenFile,
-    WebErrorCannotWriteToFile,
-    WebErrorCannotRemoveFile,
-    WebErrorCannotFindApplicationForFile,
-    WebErrorFinderCannotOpenDirectory,
-    WebErrorCannotShowDirectory,
-    WebErrorCannotShowMIMEType,
-    WebErrorCannotShowURL,
-    WebErrorCannotNotFindApplicationForURL,
-    WebErrorLocationChangeInterruptedByPolicyChange,
-    WebErrorResourceLoadInterruptedByPolicyChange,
-    WebErrorCannotFindPlugin,
-    WebErrorCannotLoadPlugin,
-    WebErrorJavaUnavailable,
-    WebErrorDownloadDecodingFailedMidStream,
-    WebErrorDownloadDecodingFailedToComplete,
+    WebKitErrorCannotCreateFile,
+    WebKitErrorCannotOpenFile,
+    WebKitErrorCannotWriteToFile,
+    WebKitErrorCannotRemoveFile,
+    WebKitErrorCannotFindApplicationForFile,
+    WebKitErrorFinderCannotOpenDirectory,
+    WebKitErrorCannotShowDirectory,
+    WebKitErrorCannotShowMIMEType,
+    WebKitErrorCannotShowURL,
+    WebKitErrorCannotNotFindApplicationForURL,
+    WebKitErrorLocationChangeInterruptedByPolicyChange,
+    WebKitErrorResourceLoadInterruptedByPolicyChange,
+    WebKitErrorCannotFindPlugin,
+    WebKitErrorCannotLoadPlugin,
+    WebKitErrorJavaUnavailable,
+    WebKitErrorDownloadDecodingFailedMidStream,
+    WebKitErrorDownloadDecodingFailedToComplete,
 };
index a8bc7e7..c16a5ba 100644 (file)
@@ -72,8 +72,8 @@
     if (![thePlugin load]){
         // FIXME: It would be nice to stop the load here.
         
-        WebPluginError *error = [WebPluginError pluginErrorWithCode:WebErrorCannotLoadPlugin
-                                                         contentURL:[[theDataSource URL] absoluteString]
+        WebPluginError *error = [WebPluginError pluginErrorWithCode:WebKitErrorCannotLoadPlugin
+                                                         contentURL:[theDataSource URL]
                                                       pluginPageURL:nil
                                                          pluginName:[thePlugin name]
                                                            MIMEType:MIME];
index 56c8d5a..5cf2fcd 100644 (file)
                         format:@"Plugin package class not recognized"];
         }
     }else{
-        errorCode = WebErrorCannotFindPlugin;
+        errorCode = WebKitErrorCannotFindPlugin;
     }
 
     if(!errorCode && !view){
-        errorCode = WebErrorCannotLoadPlugin;
+        errorCode = WebKitErrorCannotLoadPlugin;
     }
 
     if(errorCode){
     }
 
     if(!view){
-        WebPluginError *error = [WebPluginError pluginErrorWithCode:WebErrorJavaUnavailable
+        WebPluginError *error = [WebPluginError pluginErrorWithCode:WebKitErrorJavaUnavailable
                                                          contentURL:nil
                                                       pluginPageURL:nil
                                                          pluginName:[pluginPackage name]
index 763f7f1..48e8f36 100644 (file)
 
 - (void)notifyDelegatesOfInterruptionByPolicyChange
 {
-    WebError *error = [WebError errorWithCode:WebErrorResourceLoadInterruptedByPolicyChange
+    WebError *error = [WebError errorWithCode:WebKitErrorResourceLoadInterruptedByPolicyChange
                                      inDomain:WebErrorDomainWebKit
                                    failingURL:nil];
     
index cc96f87..97d71f8 100644 (file)
@@ -1313,11 +1313,11 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
     case WebPolicyOpenURL:
         if ([[request URL] isFileURL]) {
             if (![[NSWorkspace sharedWorkspace] openFile:[[request URL] path]]) {
-                [self _handleUnimplementablePolicy:policy errorCode:WebErrorCannotFindApplicationForFile forURL:[request URL]];
+                [self _handleUnimplementablePolicy:policy errorCode:WebKitErrorCannotFindApplicationForFile forURL:[request URL]];
             }
         } else {
             if (![[NSWorkspace sharedWorkspace] openURL:[request URL]]) {
-                [self _handleUnimplementablePolicy:policy errorCode:WebErrorCannotNotFindApplicationForURL forURL:[request URL]];
+                [self _handleUnimplementablePolicy:policy errorCode:WebKitErrorCannotNotFindApplicationForURL forURL:[request URL]];
             }
         }
         break;
@@ -1335,12 +1335,12 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
             [NSException raise:NSInvalidArgumentException
                         format:@"clickPolicyForElement:button:modifierFlags: returned an invalid WebClickPolicy"];
         } else if (![[NSWorkspace sharedWorkspace] selectFile:[[request URL] path] inFileViewerRootedAtPath:@""]) {
-            [self _handleUnimplementablePolicy:policy errorCode:WebErrorFinderCannotOpenDirectory forURL:[request URL]];
+            [self _handleUnimplementablePolicy:policy errorCode:WebKitErrorFinderCannotOpenDirectory forURL:[request URL]];
         }
         break;
     case WebPolicyUse:
         if (![WebResourceHandle canInitWithRequest:request]) {
-            [self _handleUnimplementablePolicy:policy errorCode:WebErrorCannotShowURL forURL:[request URL]];
+            [self _handleUnimplementablePolicy:policy errorCode:WebKitErrorCannotShowURL forURL:[request URL]];
         } else {
             shouldContinue = YES;
         }
index ea866f1..8e025e1 100644 (file)
@@ -58,21 +58,21 @@ NSString *WebErrorDomainWebKit = @"WebErrorDomainWebKit";
 + (void)initialize
 {
     NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
-    WebErrorDescriptionCannotCreateFile,               [NSNumber numberWithInt: WebErrorCannotCreateFile],
-    WebErrorDescriptionCannotOpenFile,                         [NSNumber numberWithInt: WebErrorCannotOpenFile],
-    WebErrorDescriptionCannotWriteToFile,              [NSNumber numberWithInt: WebErrorCannotWriteToFile],
-    WebErrorDescriptionCannotRemoveFile,               [NSNumber numberWithInt: WebErrorCannotRemoveFile],
-    WebErrorDescriptionCannotFindApplicationForFile,   [NSNumber numberWithInt: WebErrorCannotFindApplicationForFile],
-    WebErrorDescriptionFinderCannotOpenDirectory,      [NSNumber numberWithInt: WebErrorFinderCannotOpenDirectory],
-    WebErrorDescriptionCannotShowDirectory,            [NSNumber numberWithInt: WebErrorCannotShowDirectory],
-    WebErrorDescriptionCannotShowMIMEType,             [NSNumber numberWithInt: WebErrorCannotShowMIMEType],
-    WebErrorDescriptionCannotShowURL,                  [NSNumber numberWithInt: WebErrorCannotShowURL],
-    WebErrorDescriptionCannotFindApplicationForURL,    [NSNumber numberWithInt: WebErrorCannotNotFindApplicationForURL],
-    WebErrorDescriptionWebErrorCannotFindPlugin,       [NSNumber numberWithInt: WebErrorCannotFindPlugin],
-    WebErrorDescriptionWebErrorCannotLoadPlugin,       [NSNumber numberWithInt: WebErrorCannotLoadPlugin],
-    WebErrorDescriptionWebErrorJavaUnavailable,                [NSNumber numberWithInt: WebErrorJavaUnavailable],
-    WebErrorDescriptionDownloadDecodingFailedToComplete,[NSNumber numberWithInt: WebErrorDownloadDecodingFailedToComplete],
-    WebErrorDescriptionDownloadDecodingFailedMidStream, [NSNumber numberWithInt: WebErrorDownloadDecodingFailedMidStream],
+    WebErrorDescriptionCannotCreateFile,               [NSNumber numberWithInt: WebKitErrorCannotCreateFile],
+    WebErrorDescriptionCannotOpenFile,                         [NSNumber numberWithInt: WebKitErrorCannotOpenFile],
+    WebErrorDescriptionCannotWriteToFile,              [NSNumber numberWithInt: WebKitErrorCannotWriteToFile],
+    WebErrorDescriptionCannotRemoveFile,               [NSNumber numberWithInt: WebKitErrorCannotRemoveFile],
+    WebErrorDescriptionCannotFindApplicationForFile,   [NSNumber numberWithInt: WebKitErrorCannotFindApplicationForFile],
+    WebErrorDescriptionFinderCannotOpenDirectory,      [NSNumber numberWithInt: WebKitErrorFinderCannotOpenDirectory],
+    WebErrorDescriptionCannotShowDirectory,            [NSNumber numberWithInt: WebKitErrorCannotShowDirectory],
+    WebErrorDescriptionCannotShowMIMEType,             [NSNumber numberWithInt: WebKitErrorCannotShowMIMEType],
+    WebErrorDescriptionCannotShowURL,                  [NSNumber numberWithInt: WebKitErrorCannotShowURL],
+    WebErrorDescriptionCannotFindApplicationForURL,    [NSNumber numberWithInt: WebKitErrorCannotNotFindApplicationForURL],
+    WebErrorDescriptionWebErrorCannotFindPlugin,       [NSNumber numberWithInt: WebKitErrorCannotFindPlugin],
+    WebErrorDescriptionWebErrorCannotLoadPlugin,       [NSNumber numberWithInt: WebKitErrorCannotLoadPlugin],
+    WebErrorDescriptionWebErrorJavaUnavailable,                [NSNumber numberWithInt: WebKitErrorJavaUnavailable],
+    WebErrorDescriptionDownloadDecodingFailedToComplete,[NSNumber numberWithInt: WebKitErrorDownloadDecodingFailedToComplete],
+    WebErrorDescriptionDownloadDecodingFailedMidStream, [NSNumber numberWithInt: WebKitErrorDownloadDecodingFailedMidStream],
     nil];
 
     [WebError addErrorsWithCodesAndDescriptions:dict inDomain:WebErrorDomainWebKit];
index 763f7f1..48e8f36 100644 (file)
 
 - (void)notifyDelegatesOfInterruptionByPolicyChange
 {
-    WebError *error = [WebError errorWithCode:WebErrorResourceLoadInterruptedByPolicyChange
+    WebError *error = [WebError errorWithCode:WebKitErrorResourceLoadInterruptedByPolicyChange
                                      inDomain:WebErrorDomainWebKit
                                    failingURL:nil];
     
index 5d74845..0c33164 100644 (file)
 - (void)interruptForPolicyChangeAndKeepLoading:(BOOL)keepLoading
 {
     // Terminate the locationChangeDelegate correctly.
-    WebError *interruptError = [WebError errorWithCode:WebErrorLocationChangeInterruptedByPolicyChange inDomain:WebErrorDomainWebKit failingURL:nil];
+    WebError *interruptError = [WebError errorWithCode:WebKitErrorLocationChangeInterruptedByPolicyChange inDomain:WebErrorDomainWebKit failingURL:nil];
 
     // Must call receivedError before _clearProvisionalDataSource because
     // if we remove the data source from the frame, we can't get back to the frame any more.
     switch (contentPolicy) {
     case WebPolicyShow:
        if (![WebController canShowMIMEType:[r contentType]]) {
-           [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebErrorCannotShowMIMEType forURL:[req URL]];
+           [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebKitErrorCannotShowMIMEType forURL:[req URL]];
            [self stopLoadingForPolicyChange];
            return;
        }
     case WebPolicyOpenURL:
        if ([[req URL] isFileURL]) {
            if(![[NSWorkspace sharedWorkspace] openFile:[[req URL] path]]){
-               [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebErrorCannotFindApplicationForFile forURL:[req URL]];
+               [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebKitErrorCannotFindApplicationForFile forURL:[req URL]];
            }
        } else {
            if(![[NSWorkspace sharedWorkspace] openURL:[req URL]]){
-               [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebErrorCannotNotFindApplicationForURL forURL:[req URL]];
+               [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebKitErrorCannotNotFindApplicationForURL forURL:[req URL]];
            }
        }
 
        if (![[req URL] isFileURL]) {
            ERROR("contentPolicyForMIMEType:andRequest:inFrame: returned an invalid content policy.");
        } else if (![[NSWorkspace sharedWorkspace] selectFile:[[req URL] path] inFileViewerRootedAtPath:@""]) {
-           [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebErrorFinderCannotOpenDirectory forURL:[req URL]];
+           [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebKitErrorFinderCannotOpenDirectory forURL:[req URL]];
        }
 
        [self stopLoadingForPolicyChange];
index 5d74845..0c33164 100644 (file)
 - (void)interruptForPolicyChangeAndKeepLoading:(BOOL)keepLoading
 {
     // Terminate the locationChangeDelegate correctly.
-    WebError *interruptError = [WebError errorWithCode:WebErrorLocationChangeInterruptedByPolicyChange inDomain:WebErrorDomainWebKit failingURL:nil];
+    WebError *interruptError = [WebError errorWithCode:WebKitErrorLocationChangeInterruptedByPolicyChange inDomain:WebErrorDomainWebKit failingURL:nil];
 
     // Must call receivedError before _clearProvisionalDataSource because
     // if we remove the data source from the frame, we can't get back to the frame any more.
     switch (contentPolicy) {
     case WebPolicyShow:
        if (![WebController canShowMIMEType:[r contentType]]) {
-           [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebErrorCannotShowMIMEType forURL:[req URL]];
+           [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebKitErrorCannotShowMIMEType forURL:[req URL]];
            [self stopLoadingForPolicyChange];
            return;
        }
     case WebPolicyOpenURL:
        if ([[req URL] isFileURL]) {
            if(![[NSWorkspace sharedWorkspace] openFile:[[req URL] path]]){
-               [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebErrorCannotFindApplicationForFile forURL:[req URL]];
+               [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebKitErrorCannotFindApplicationForFile forURL:[req URL]];
            }
        } else {
            if(![[NSWorkspace sharedWorkspace] openURL:[req URL]]){
-               [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebErrorCannotNotFindApplicationForURL forURL:[req URL]];
+               [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebKitErrorCannotNotFindApplicationForURL forURL:[req URL]];
            }
        }
 
        if (![[req URL] isFileURL]) {
            ERROR("contentPolicyForMIMEType:andRequest:inFrame: returned an invalid content policy.");
        } else if (![[NSWorkspace sharedWorkspace] selectFile:[[req URL] path] inFileViewerRootedAtPath:@""]) {
-           [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebErrorFinderCannotOpenDirectory forURL:[req URL]];
+           [[dataSource webFrame] _handleUnimplementablePolicy:contentPolicy errorCode:WebKitErrorFinderCannotOpenDirectory forURL:[req URL]];
        }
 
        [self stopLoadingForPolicyChange];