Reviewed by Geoff.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Dec 2006 03:14:13 +0000 (03:14 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Dec 2006 03:14:13 +0000 (03:14 +0000)
        - fix failing drag & drop layout tests

        * platform/mac/KURLMac.mm:
        (WebCore::KURL::getNSURL): Turn empty KURL into empty NSURL, but null KURL into
        nil.

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

WebCore/ChangeLog
WebCore/platform/mac/KURLMac.mm

index 58d7932d67951c042f5a8f7248c1c43ee698f44c..2925ee9c543974e2c3b7afbb64ab66433aea28a2 100644 (file)
@@ -1,3 +1,13 @@
+2006-12-14  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Geoff.
+
+        - fix failing drag & drop layout tests
+
+        * platform/mac/KURLMac.mm:
+        (WebCore::KURL::getNSURL): Turn empty KURL into empty NSURL, but null KURL into
+        nil.
+
 2006-12-14  Steve Falkenburg  <sfalken@apple.com>
 
         Build fix.
index 13ab95905bf5abcef4b45cbc61d82c65ab760cbe..87393c200caf716ce5316238572aafe135557863 100644 (file)
@@ -55,7 +55,10 @@ KURL::KURL(NSURL *url)
 
 NSURL *KURL::getNSURL() const
 {
-    // FIXME: CFURL can't hold an empty URL, unlike NSURL
+    if (urlString.isNull())
+        return nil;
+
+    // CFURL can't hold an empty URL, unlike NSURL
     if (isEmpty())
         return [NSURL URLWithString:@""];