[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:55:09 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 1678050ae31a19fe69fc90d0862826718d6a09a7
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 5 16:32:00 2002 +0000

    2002-02-05  Kenneth Kocienda  <kocienda at apple.com>
    
            I know WebViewTest is dead, but this was breaking the build...
    
            * Tests/khtmlview/_KWQOwner.h:
            * Tests/khtmlview/_KWQOwner.m: (-[_KWQOwner applicationDidFinishLaunching:]),
            (-[_KWQOwner _setURL:]), (-[_KWQOwner changeURL:]), (-[_KWQOwner back:]),
            (-[_KWQOwner forward:]), (-[_KWQOwner newUriDone:]):
    
            Changes to move these last bits of code to the new cache API.
    
            * src/kwq/KWQKjobclasses.mm:
            * src/kwq/WKPluginView.h:
            * src/kwq/WKPluginView.mm: (-[WKPluginView drawRect:]), (-[WKPluginView
            WCURLHandleResourceDidBeginLoading:userData:]), (-[WKPluginView
            WCURLHandleResourceDidCancelLoading:userData:]), (-[WKPluginView
            WCURLHandleResourceDidFinishLoading:userData:]), (-[WKPluginView
            WCURLHandle:resourceDataDidBecomeAvailable:userData:]), (-[WKPluginView
            WCURLHandle:resourceDidFailLoadingWithResult:userData:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@590 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index a874869..69bd2c7 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,16 @@
+2002-02-05  Kenneth Kocienda  <kocienda at apple.com>
+
+	Changes to move these last bits of code to the new cache API.
+
+	* src/kwq/KWQKjobclasses.mm:
+	* src/kwq/WKPluginView.h:
+	* src/kwq/WKPluginView.mm: (-[WKPluginView drawRect:]), (-[WKPluginView
+	WCURLHandleResourceDidBeginLoading:userData:]), (-[WKPluginView
+	WCURLHandleResourceDidCancelLoading:userData:]), (-[WKPluginView
+	WCURLHandleResourceDidFinishLoading:userData:]), (-[WKPluginView
+	WCURLHandle:resourceDataDidBecomeAvailable:userData:]), (-[WKPluginView
+	WCURLHandle:resourceDidFailLoadingWithResult:userData:]):
+
 2002-02-04  Maciej Stachowiak  <mjs at apple.com>
 
 	Fix everything for WK --> IF rename.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index a874869..69bd2c7 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2002-02-05  Kenneth Kocienda  <kocienda at apple.com>
+
+	Changes to move these last bits of code to the new cache API.
+
+	* src/kwq/KWQKjobclasses.mm:
+	* src/kwq/WKPluginView.h:
+	* src/kwq/WKPluginView.mm: (-[WKPluginView drawRect:]), (-[WKPluginView
+	WCURLHandleResourceDidBeginLoading:userData:]), (-[WKPluginView
+	WCURLHandleResourceDidCancelLoading:userData:]), (-[WKPluginView
+	WCURLHandleResourceDidFinishLoading:userData:]), (-[WKPluginView
+	WCURLHandle:resourceDataDidBecomeAvailable:userData:]), (-[WKPluginView
+	WCURLHandle:resourceDidFailLoadingWithResult:userData:]):
+
 2002-02-04  Maciej Stachowiak  <mjs at apple.com>
 
 	Fix everything for WK --> IF rename.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a874869..69bd2c7 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2002-02-05  Kenneth Kocienda  <kocienda at apple.com>
+
+	Changes to move these last bits of code to the new cache API.
+
+	* src/kwq/KWQKjobclasses.mm:
+	* src/kwq/WKPluginView.h:
+	* src/kwq/WKPluginView.mm: (-[WKPluginView drawRect:]), (-[WKPluginView
+	WCURLHandleResourceDidBeginLoading:userData:]), (-[WKPluginView
+	WCURLHandleResourceDidCancelLoading:userData:]), (-[WKPluginView
+	WCURLHandleResourceDidFinishLoading:userData:]), (-[WKPluginView
+	WCURLHandle:resourceDataDidBecomeAvailable:userData:]), (-[WKPluginView
+	WCURLHandle:resourceDidFailLoadingWithResult:userData:]):
+
 2002-02-04  Maciej Stachowiak  <mjs at apple.com>
 
 	Fix everything for WK --> IF rename.
diff --git a/WebCore/kwq/KWQKJobClasses.mm b/WebCore/kwq/KWQKJobClasses.mm
index 1be01ee..b1dba47 100644
--- a/WebCore/kwq/KWQKJobClasses.mm
+++ b/WebCore/kwq/KWQKJobClasses.mm
@@ -163,9 +163,7 @@ void TransferJob::addMetaData(const QString &key, const QString &value)
 
 void TransferJob::kill(bool quietly=TRUE)
 {
-#if 0
-    [WCGetDefaultURICache() cancelRequestWithURL:d->url requestor:d->requestor];
-#endif
+    [d->handle cancelLoadInBackground];
 }
 
 void TransferJob::begin(id <WCURLHandleClient> client, void *userData)
diff --git a/WebCore/kwq/WKPluginView.h b/WebCore/kwq/WKPluginView.h
index c2e589d..cc97a98 100644
--- a/WebCore/kwq/WKPluginView.h
+++ b/WebCore/kwq/WKPluginView.h
@@ -10,6 +10,7 @@
 #include <qwidget.h>
 #import <WKPlugin.h>
 #include "npapi.h"
+#include <WCURLHandle.h>
 
 
 typedef NPStream* NPS;
@@ -24,7 +25,7 @@ typedef NPStream* NPS;
 -(void)stop;
 @end
 
- at interface WKPluginView : NSQuickDrawView {
+ at interface WKPluginView : NSQuickDrawView <WCURLHandleClient> {
     QWidget *widget;
     WKPlugin *plugin;
     WKPluginViewNullEventSender *eventSender;
diff --git a/WebCore/kwq/WKPluginView.mm b/WebCore/kwq/WKPluginView.mm
index a0fccc3..a13fded 100644
--- a/WebCore/kwq/WKPluginView.mm
+++ b/WebCore/kwq/WKPluginView.mm
@@ -7,8 +7,6 @@
 //
 
 #import "WKPluginView.h"
-#include <WCURICacheData.h>
-#include <WCURICache.h>
 #include <Carbon/Carbon.h> 
 #include "kwqdebug.h"
 
@@ -113,7 +111,6 @@
 {
     NPError npErr;
     char cMime[200], cURL[800];
-    id <WCURICache> cache;
     //WindowRef windowRef;
     
     //windowRef = [[self window] _windowRef]; // give the window a WindowRef
@@ -135,15 +132,15 @@
         npErr = NPP_NewStream(instance, cMime, stream, FALSE, &transferMode);
         KWQDebug("NPP_NewStream: %d\n", npErr);
         
-        cache = WCGetDefaultURICache();
         if(transferMode == NP_NORMAL){
             KWQDebug("Stream type: NP_NORMAL\n");
-            [cache requestWithString:url requestor:self userData:nil];
+            //[cache requestWithString:url requestor:self userData:nil];
+            [WCURLHandleCreate([NSURL URLWithString:url], self, nil) loadInBackground];
         }else if(transferMode == NP_ASFILEONLY){
             KWQDebug("Stream type: NP_ASFILEONLY not yet supported\n");
         }else if(transferMode == NP_ASFILE){
             KWQDebug("Stream type: NP_ASFILE not fully supported\n");
-            [cache requestWithString:url requestor:self userData:nil];
+            [WCURLHandleCreate([NSURL URLWithString:url], self, nil) loadInBackground];
         }else if(transferMode == NP_SEEK){
             KWQDebug("Stream type: NP_SEEK not yet supported\n");
         }
@@ -187,6 +184,44 @@
 
 // cache methods
 
+- (void)WCURLHandleResourceDidBeginLoading:(id)sender userData:(void *)userData
+{
+}
+
+- (void)WCURLHandleResourceDidCancelLoading:(id)sender userData:(void *)userData
+{
+}
+
+- (void)WCURLHandleResourceDidFinishLoading:(id)sender userData:(void *)userData
+{
+    NPError npErr;
+    
+    streamOffset = 0;
+    if(transferMode == NP_ASFILE || transferMode == NP_ASFILEONLY){
+        NPP_StreamAsFile(instance, stream, NULL);
+    }
+    npErr = NPP_DestroyStream(instance, stream, NPRES_DONE);
+    KWQDebug("NPP_DestroyStream: %d\n", npErr);
+}
+
+- (void)WCURLHandle:(id)sender resourceDataDidBecomeAvailable:(NSData *)data userData:(void *)userData
+{
+    int32 bytes;
+    
+    bytes = NPP_WriteReady(instance, stream);
+    KWQDebug("NPP_WriteReady bytes=%d\n", (int)bytes);
+    
+    bytes = NPP_Write(instance, stream, streamOffset, [data length], (void *)[data bytes]);
+    KWQDebug("NPP_Write bytes=%d\n", (int)bytes);
+    streamOffset += [data length];
+}
+
+- (void)WCURLHandle:(id)sender resourceDidFailLoadingWithResult:(int)result userData:(void *)userData
+{
+}
+
+// FIXME: Remove old cache code
+#if 0
 -(void)cacheDataAvailable:(NSNotification *)notification
 {
     id <WCURICacheData> data;
@@ -212,6 +247,7 @@
     npErr = NPP_DestroyStream(instance, stream, NPRES_DONE);
     KWQDebug("NPP_DestroyStream: %d\n", npErr);
 }
+#endif
 
 // event methods
 
diff --git a/WebCore/src/kwq/KWQKjobclasses.mm b/WebCore/src/kwq/KWQKjobclasses.mm
index 1be01ee..b1dba47 100644
--- a/WebCore/src/kwq/KWQKjobclasses.mm
+++ b/WebCore/src/kwq/KWQKjobclasses.mm
@@ -163,9 +163,7 @@ void TransferJob::addMetaData(const QString &key, const QString &value)
 
 void TransferJob::kill(bool quietly=TRUE)
 {
-#if 0
-    [WCGetDefaultURICache() cancelRequestWithURL:d->url requestor:d->requestor];
-#endif
+    [d->handle cancelLoadInBackground];
 }
 
 void TransferJob::begin(id <WCURLHandleClient> client, void *userData)
diff --git a/WebCore/src/kwq/WKPluginView.h b/WebCore/src/kwq/WKPluginView.h
index c2e589d..cc97a98 100644
--- a/WebCore/src/kwq/WKPluginView.h
+++ b/WebCore/src/kwq/WKPluginView.h
@@ -10,6 +10,7 @@
 #include <qwidget.h>
 #import <WKPlugin.h>
 #include "npapi.h"
+#include <WCURLHandle.h>
 
 
 typedef NPStream* NPS;
@@ -24,7 +25,7 @@ typedef NPStream* NPS;
 -(void)stop;
 @end
 
- at interface WKPluginView : NSQuickDrawView {
+ at interface WKPluginView : NSQuickDrawView <WCURLHandleClient> {
     QWidget *widget;
     WKPlugin *plugin;
     WKPluginViewNullEventSender *eventSender;
diff --git a/WebCore/src/kwq/WKPluginView.mm b/WebCore/src/kwq/WKPluginView.mm
index a0fccc3..a13fded 100644
--- a/WebCore/src/kwq/WKPluginView.mm
+++ b/WebCore/src/kwq/WKPluginView.mm
@@ -7,8 +7,6 @@
 //
 
 #import "WKPluginView.h"
-#include <WCURICacheData.h>
-#include <WCURICache.h>
 #include <Carbon/Carbon.h> 
 #include "kwqdebug.h"
 
@@ -113,7 +111,6 @@
 {
     NPError npErr;
     char cMime[200], cURL[800];
-    id <WCURICache> cache;
     //WindowRef windowRef;
     
     //windowRef = [[self window] _windowRef]; // give the window a WindowRef
@@ -135,15 +132,15 @@
         npErr = NPP_NewStream(instance, cMime, stream, FALSE, &transferMode);
         KWQDebug("NPP_NewStream: %d\n", npErr);
         
-        cache = WCGetDefaultURICache();
         if(transferMode == NP_NORMAL){
             KWQDebug("Stream type: NP_NORMAL\n");
-            [cache requestWithString:url requestor:self userData:nil];
+            //[cache requestWithString:url requestor:self userData:nil];
+            [WCURLHandleCreate([NSURL URLWithString:url], self, nil) loadInBackground];
         }else if(transferMode == NP_ASFILEONLY){
             KWQDebug("Stream type: NP_ASFILEONLY not yet supported\n");
         }else if(transferMode == NP_ASFILE){
             KWQDebug("Stream type: NP_ASFILE not fully supported\n");
-            [cache requestWithString:url requestor:self userData:nil];
+            [WCURLHandleCreate([NSURL URLWithString:url], self, nil) loadInBackground];
         }else if(transferMode == NP_SEEK){
             KWQDebug("Stream type: NP_SEEK not yet supported\n");
         }
@@ -187,6 +184,44 @@
 
 // cache methods
 
+- (void)WCURLHandleResourceDidBeginLoading:(id)sender userData:(void *)userData
+{
+}
+
+- (void)WCURLHandleResourceDidCancelLoading:(id)sender userData:(void *)userData
+{
+}
+
+- (void)WCURLHandleResourceDidFinishLoading:(id)sender userData:(void *)userData
+{
+    NPError npErr;
+    
+    streamOffset = 0;
+    if(transferMode == NP_ASFILE || transferMode == NP_ASFILEONLY){
+        NPP_StreamAsFile(instance, stream, NULL);
+    }
+    npErr = NPP_DestroyStream(instance, stream, NPRES_DONE);
+    KWQDebug("NPP_DestroyStream: %d\n", npErr);
+}
+
+- (void)WCURLHandle:(id)sender resourceDataDidBecomeAvailable:(NSData *)data userData:(void *)userData
+{
+    int32 bytes;
+    
+    bytes = NPP_WriteReady(instance, stream);
+    KWQDebug("NPP_WriteReady bytes=%d\n", (int)bytes);
+    
+    bytes = NPP_Write(instance, stream, streamOffset, [data length], (void *)[data bytes]);
+    KWQDebug("NPP_Write bytes=%d\n", (int)bytes);
+    streamOffset += [data length];
+}
+
+- (void)WCURLHandle:(id)sender resourceDidFailLoadingWithResult:(int)result userData:(void *)userData
+{
+}
+
+// FIXME: Remove old cache code
+#if 0
 -(void)cacheDataAvailable:(NSNotification *)notification
 {
     id <WCURICacheData> data;
@@ -212,6 +247,7 @@
     npErr = NPP_DestroyStream(instance, stream, NPRES_DONE);
     KWQDebug("NPP_DestroyStream: %d\n", npErr);
 }
+#endif
 
 // event methods
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list