[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:08:24 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit c2cb88bc52018fded7d460893676b93deed96dff
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Apr 20 14:52:34 2002 +0000

    	Problems loading iframes seemed to be due to NSURL objects that
    	were not normalized, so I made the NSURL creation all be done
    	by KURL, which fixed the problem.
    
    	* kwq/KWQKHTMLPart.mm: (KHTMLPart::requestFrame), (KHTMLPart::submitForm),
    	(KHTMLPart::khtmlMouseReleaseEvent):
    	* kwq/KWQKjobclasses.mm:
    	Call getNSURL instead of creating NSURLs by converting to strings.
    
    	* kwq/kdecore/kurl.h:
    	* kwq/KWQKURL.mm: (KURL::getNSURL): New.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1054 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 65c62dd..0606f1d 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,17 @@
+2002-04-20  Darin Adler  <darin at apple.com>
+
+	Problems loading iframes seemed to be due to NSURL objects that
+	were not normalized, so I made the NSURL creation all be done
+	by KURL, which fixed the problem.
+
+	* kwq/KWQKHTMLPart.mm: (KHTMLPart::requestFrame), (KHTMLPart::submitForm),
+	(KHTMLPart::khtmlMouseReleaseEvent):
+	* kwq/KWQKjobclasses.mm:
+	Call getNSURL instead of creating NSURLs by converting to strings.
+
+	* kwq/kdecore/kurl.h:
+	* kwq/KWQKURL.mm: (KURL::getNSURL): New.
+
 2002-04-19  Kenneth Kocienda  <kocienda at apple.com>
 
         Changes to support submission of forms using HTTP POST.
@@ -207,8 +221,8 @@
 
 	* .cvsignore: Ignore new generated files at this level.
 
-	* include/*: Removed. We don't need this hack any more.
-	* src/*: Removed. Sources are now in their new locations.
+	* include/ *: Removed. We don't need this hack any more.
+	* src/ *: Removed. Sources are now in their new locations.
 	* src/libwebcore.exp: Removed. This is now in its new location.
 	* src/libwebcoretests.exp: Removed. This is now in its new location.
 
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 65c62dd..0606f1d 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,17 @@
+2002-04-20  Darin Adler  <darin at apple.com>
+
+	Problems loading iframes seemed to be due to NSURL objects that
+	were not normalized, so I made the NSURL creation all be done
+	by KURL, which fixed the problem.
+
+	* kwq/KWQKHTMLPart.mm: (KHTMLPart::requestFrame), (KHTMLPart::submitForm),
+	(KHTMLPart::khtmlMouseReleaseEvent):
+	* kwq/KWQKjobclasses.mm:
+	Call getNSURL instead of creating NSURLs by converting to strings.
+
+	* kwq/kdecore/kurl.h:
+	* kwq/KWQKURL.mm: (KURL::getNSURL): New.
+
 2002-04-19  Kenneth Kocienda  <kocienda at apple.com>
 
         Changes to support submission of forms using HTTP POST.
@@ -207,8 +221,8 @@
 
 	* .cvsignore: Ignore new generated files at this level.
 
-	* include/*: Removed. We don't need this hack any more.
-	* src/*: Removed. Sources are now in their new locations.
+	* include/ *: Removed. We don't need this hack any more.
+	* src/ *: Removed. Sources are now in their new locations.
 	* src/libwebcore.exp: Removed. This is now in its new location.
 	* src/libwebcoretests.exp: Removed. This is now in its new location.
 
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 65c62dd..0606f1d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,17 @@
+2002-04-20  Darin Adler  <darin at apple.com>
+
+	Problems loading iframes seemed to be due to NSURL objects that
+	were not normalized, so I made the NSURL creation all be done
+	by KURL, which fixed the problem.
+
+	* kwq/KWQKHTMLPart.mm: (KHTMLPart::requestFrame), (KHTMLPart::submitForm),
+	(KHTMLPart::khtmlMouseReleaseEvent):
+	* kwq/KWQKjobclasses.mm:
+	Call getNSURL instead of creating NSURLs by converting to strings.
+
+	* kwq/kdecore/kurl.h:
+	* kwq/KWQKURL.mm: (KURL::getNSURL): New.
+
 2002-04-19  Kenneth Kocienda  <kocienda at apple.com>
 
         Changes to support submission of forms using HTTP POST.
@@ -207,8 +221,8 @@
 
 	* .cvsignore: Ignore new generated files at this level.
 
-	* include/*: Removed. We don't need this hack any more.
-	* src/*: Removed. Sources are now in their new locations.
+	* include/ *: Removed. We don't need this hack any more.
+	* src/ *: Removed. Sources are now in their new locations.
 	* src/libwebcore.exp: Removed. This is now in its new location.
 	* src/libwebcoretests.exp: Removed. This is now in its new location.
 
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 8381bb7..76f9579 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -850,14 +850,11 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, cons
         NSURL *childURL;
         IFWebFrame *newFrame;
         id <IFWebController> controller;
-        NSString *urlString;
         HTMLIFrameElementImpl *o = static_cast<HTMLIFrameElementImpl *>(frame->element());
                 
-        urlString = QSTRING_TO_NSSTRING (completeURL( url ).url() );
-        childURL = [NSURL URLWithString: QSTRING_TO_NSSTRING (completeURL( url ).url() )];
-        
-        if (childURL == nil){
-            NSLog (@"ERROR (probably need to fix CFURL):  unable to create URL for %@\n", urlString);
+        childURL = completeURL(url).getNSURL();
+        if (childURL == nil || [childURL path] == nil) {
+            NSLog (@"ERROR (probably need to fix CFURL): unable to create URL with path");
             return false;
         }
         
@@ -1025,14 +1022,12 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
     emit d->m_extension->openURLRequest( u, args );
 #endif
     IFWebDataSource *oldDataSource, *newDataSource;
-    NSString *urlString = [NSString stringWithCString:u.url().latin1()];
-    NSURL *qurl = [NSURL URLWithString: urlString];
     IFWebFrame *frame;
     
     oldDataSource = getDataSource();
     frame = [oldDataSource frame];
     
-    newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: qurl attributes: attributes flags: 0] autorelease]);
+    newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: u.getNSURL() attributes: attributes flags: 0] autorelease]);
     [newDataSource _setParent: [oldDataSource parent]];
     
     [frame setProvisionalDataSource: newDataSource];
@@ -1385,8 +1380,6 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
         IFWebDataSource *oldDataSource, *newDataSource;
         QString target;
         KURL clickedURL(completeURL( splitUrlTarget(d->m_strSelectedURL, &target)));
-        NSString *urlString = [NSString stringWithCString:clickedURL.url().latin1()];
-        NSURL *url = [NSURL URLWithString: urlString];
         IFWebFrame *frame;
         KURL refLess(clickedURL);
         
@@ -1407,7 +1400,7 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
             oldDataSource = [frame dataSource];
         }
         
-        newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: url attributes: nil flags: 0] autorelease]);
+        newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: clickedURL.getNSURL() attributes: nil flags: 0] autorelease]);
         [newDataSource _setParent: [oldDataSource parent]];
         
         [frame setProvisionalDataSource: newDataSource];
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 8381bb7..76f9579 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -850,14 +850,11 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, cons
         NSURL *childURL;
         IFWebFrame *newFrame;
         id <IFWebController> controller;
-        NSString *urlString;
         HTMLIFrameElementImpl *o = static_cast<HTMLIFrameElementImpl *>(frame->element());
                 
-        urlString = QSTRING_TO_NSSTRING (completeURL( url ).url() );
-        childURL = [NSURL URLWithString: QSTRING_TO_NSSTRING (completeURL( url ).url() )];
-        
-        if (childURL == nil){
-            NSLog (@"ERROR (probably need to fix CFURL):  unable to create URL for %@\n", urlString);
+        childURL = completeURL(url).getNSURL();
+        if (childURL == nil || [childURL path] == nil) {
+            NSLog (@"ERROR (probably need to fix CFURL): unable to create URL with path");
             return false;
         }
         
@@ -1025,14 +1022,12 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
     emit d->m_extension->openURLRequest( u, args );
 #endif
     IFWebDataSource *oldDataSource, *newDataSource;
-    NSString *urlString = [NSString stringWithCString:u.url().latin1()];
-    NSURL *qurl = [NSURL URLWithString: urlString];
     IFWebFrame *frame;
     
     oldDataSource = getDataSource();
     frame = [oldDataSource frame];
     
-    newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: qurl attributes: attributes flags: 0] autorelease]);
+    newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: u.getNSURL() attributes: attributes flags: 0] autorelease]);
     [newDataSource _setParent: [oldDataSource parent]];
     
     [frame setProvisionalDataSource: newDataSource];
@@ -1385,8 +1380,6 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
         IFWebDataSource *oldDataSource, *newDataSource;
         QString target;
         KURL clickedURL(completeURL( splitUrlTarget(d->m_strSelectedURL, &target)));
-        NSString *urlString = [NSString stringWithCString:clickedURL.url().latin1()];
-        NSURL *url = [NSURL URLWithString: urlString];
         IFWebFrame *frame;
         KURL refLess(clickedURL);
         
@@ -1407,7 +1400,7 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
             oldDataSource = [frame dataSource];
         }
         
-        newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: url attributes: nil flags: 0] autorelease]);
+        newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: clickedURL.getNSURL() attributes: nil flags: 0] autorelease]);
         [newDataSource _setParent: [oldDataSource parent]];
         
         [frame setProvisionalDataSource: newDataSource];
diff --git a/WebCore/kwq/KWQKJobClasses.mm b/WebCore/kwq/KWQKJobClasses.mm
index 4499279..4b45d42 100644
--- a/WebCore/kwq/KWQKJobClasses.mm
+++ b/WebCore/kwq/KWQKJobClasses.mm
@@ -89,29 +89,15 @@ class TransferJobPrivate
 friend class TransferJob;
 public:
 
-    TransferJobPrivate(TransferJob *parent, KURL &kurl) {
+    TransferJobPrivate(TransferJob *parent, KURL &kurl)
+    {
         metaData = [[NSMutableDictionary alloc] initWithCapacity:17];
-
-        // FIXME: create NSURL for now, later KURL and NSURL should play better together
-        NSString *string = [NSString stringWithCString:kurl.url().latin1()];
-	// FIXME: temporary hack to make file: URLs work right
-	if ([string hasPrefix:@"file:/"] && [string characterAtIndex:6] != '/') {
-	    string = [@"file:///" stringByAppendingString:[string substringFromIndex:6]];
-	}
-	if ([string hasSuffix:@"/"]) {
-	    string = [string substringToIndex:([string length] - 1)];
-	}
-
-        url = [[NSURL URLWithString:string] retain];
-        if (url == 0){
-            NSLog (@"Unable to create NSURL (probably a bug in NS/CFURL) for %@\n", string);
-            // Now what?
-        }
-
+        url = [kurl.getNSURL() retain];
         handle = nil;
     }
 
-    ~TransferJobPrivate() {
+    ~TransferJobPrivate()
+    {
         [metaData autorelease];
         [url autorelease];
         [handle autorelease];
diff --git a/WebCore/kwq/KWQKURL.h b/WebCore/kwq/KWQKURL.h
index ba74ee6..a6921b9 100644
--- a/WebCore/kwq/KWQKURL.h
+++ b/WebCore/kwq/KWQKURL.h
@@ -26,29 +26,14 @@
 #ifndef KURL_H_
 #define KURL_H_
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_KURL =========================================================
-
-#ifdef USING_BORROWED_KURL
-
-#include <_kurl.h>
-
-#else
-
 #include <qstring.h>
 #include <KWQRefPtr.h>
 
-// FIXME: this clever hack may need to be moved into KWQDef.h or elsewhere
-#define Fixed MacFixed
-#define Rect MacRect
-#define Boolean MacBoolean
-#include <CoreFoundation/CoreFoundation.h>
-#undef Fixed
-#undef Rect
-#undef Boolean
+#ifdef __OBJC__
+ at class NSURL;
+#else
+typedef void NSURL;
+#endif
 
 // class KURL ==================================================================
 
@@ -98,6 +83,8 @@ public:
     void setPath(const QString &);
 
     QString prettyURL(int trailing=0) const;
+    
+    NSURL *getNSURL() const;
 
     // operators ---------------------------------------------------------------
 
@@ -121,5 +108,3 @@ private:
 }; // class KURL ===============================================================
 
 #endif
-
-#endif // USING_BORROWED_KURL
diff --git a/WebCore/kwq/KWQKURL.mm b/WebCore/kwq/KWQKURL.mm
index a23a996..75df6b2 100644
--- a/WebCore/kwq/KWQKURL.mm
+++ b/WebCore/kwq/KWQKURL.mm
@@ -26,10 +26,7 @@
 #include <kurl.h>
 #include <kwqdebug.h>
 
-#ifndef USING_BORROWED_KURL
-
 #import <Foundation/NSURLPathUtilities.h>
-#include <CoreFoundation/CoreFoundation.h>
 
 class KURL::KWQKURLPrivate
 {
@@ -115,7 +112,7 @@ void KURL::KWQKURLPrivate::makeRef()
         sURL = (QString("file://")) + sURL;
     } else if (sURL.startsWith("file:/") && !sURL.startsWith("file://")) {
         sURL = (QString("file:///") + sURL.mid(6));
-    } 
+    }
 
     QString sURLMaybeAddSlash;
     int colonPos = sURL.find(':');
@@ -741,4 +738,8 @@ void KURL::assemble()
     }
 }
 
-#endif
+NSURL *KURL::getNSURL() const
+{
+    parse();
+    return [[(NSURL *)d->urlRef retain] autorelease];
+}
diff --git a/WebCore/kwq/kdecore/kurl.h b/WebCore/kwq/kdecore/kurl.h
index ba74ee6..a6921b9 100644
--- a/WebCore/kwq/kdecore/kurl.h
+++ b/WebCore/kwq/kdecore/kurl.h
@@ -26,29 +26,14 @@
 #ifndef KURL_H_
 #define KURL_H_
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_KURL =========================================================
-
-#ifdef USING_BORROWED_KURL
-
-#include <_kurl.h>
-
-#else
-
 #include <qstring.h>
 #include <KWQRefPtr.h>
 
-// FIXME: this clever hack may need to be moved into KWQDef.h or elsewhere
-#define Fixed MacFixed
-#define Rect MacRect
-#define Boolean MacBoolean
-#include <CoreFoundation/CoreFoundation.h>
-#undef Fixed
-#undef Rect
-#undef Boolean
+#ifdef __OBJC__
+ at class NSURL;
+#else
+typedef void NSURL;
+#endif
 
 // class KURL ==================================================================
 
@@ -98,6 +83,8 @@ public:
     void setPath(const QString &);
 
     QString prettyURL(int trailing=0) const;
+    
+    NSURL *getNSURL() const;
 
     // operators ---------------------------------------------------------------
 
@@ -121,5 +108,3 @@ private:
 }; // class KURL ===============================================================
 
 #endif
-
-#endif // USING_BORROWED_KURL

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list