[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

weinig at apple.com weinig at apple.com
Wed Dec 22 15:09:52 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1679be822e7bbc6daf38efab2afeb527f7caf727
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 28 19:09:43 2010 +0000

    WKURLRefs should be allowed to be null
    <rdar://problem/8575621>
    https://bugs.webkit.org/show_bug.cgi?id=48535
    
    Reviewed by Anders Carlsson.
    
    WebKit2:
    
    * Shared/API/c/WKSharedAPICast.h:
    (WebKit::toURLRef):
    (WebKit::toCopiedURLAPI):
    Turn a null WTF::String into a null WKURLRef.
    
    WebKitTools:
    
    * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
    * TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
    (TestWebKitAPI::didStartProvisionalLoadForFrame):
    (TestWebKitAPI::didCommitLoadForFrame):
    (TestWebKitAPI::didFinishLoadForFrame):
    Test that URLs are null pointers when unset.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70795 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 7a6f420..0c395e4 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,19 @@
 
         Reviewed by Anders Carlsson.
 
+        WKURLRefs should be allowed to be null
+        <rdar://problem/8575621>
+        https://bugs.webkit.org/show_bug.cgi?id=48535
+
+        * Shared/API/c/WKSharedAPICast.h:
+        (WebKit::toURLRef):
+        (WebKit::toCopiedURLAPI):
+        Turn a null WTF::String into a null WKURLRef.
+
+2010-10-28  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Anders Carlsson.
+
         Add WebKit2 API for window feature getter/setters
         <rdar://problem/8590373>
         https://bugs.webkit.org/show_bug.cgi?id=48496
diff --git a/WebKit2/Shared/API/c/WKSharedAPICast.h b/WebKit2/Shared/API/c/WKSharedAPICast.h
index fbae30b..1e5d6de 100644
--- a/WebKit2/Shared/API/c/WKSharedAPICast.h
+++ b/WebKit2/Shared/API/c/WKSharedAPICast.h
@@ -117,12 +117,6 @@ inline ProxyingRefPtr<WebString> toAPI(StringImpl* string)
     return ProxyingRefPtr<WebString>(WebString::create(String(impl)));
 }
 
-inline ProxyingRefPtr<WebURL> toURLRef(StringImpl* string)
-{
-    StringImpl* impl = string ? string : StringImpl::empty();
-    return ProxyingRefPtr<WebURL>(WebURL::create(String(impl)));
-}
-
 inline WKStringRef toCopiedAPI(const String& string)
 {
     StringImpl* impl = string.impl() ? string.impl() : StringImpl::empty();
@@ -130,10 +124,18 @@ inline WKStringRef toCopiedAPI(const String& string)
     return toAPI(webString.release().releaseRef());
 }
 
+inline ProxyingRefPtr<WebURL> toURLRef(StringImpl* string)
+{
+    if (!string)
+        ProxyingRefPtr<WebURL>(0);
+    return ProxyingRefPtr<WebURL>(WebURL::create(String(string)));
+}
+
 inline WKURLRef toCopiedURLAPI(const String& string)
 {
-    StringImpl* impl = string.impl() ? string.impl() : StringImpl::empty();
-    RefPtr<WebURL> webURL = WebURL::create(String(impl));
+    if (!string)
+        return 0;
+    RefPtr<WebURL> webURL = WebURL::create(string);
     return toAPI(webURL.release().releaseRef());
 }
 
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index c54326f..6805f5d 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-28  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        WKURLRefs should be allowed to be null
+        <rdar://problem/8575621>
+        https://bugs.webkit.org/show_bug.cgi?id=48535
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
+        (TestWebKitAPI::didStartProvisionalLoadForFrame):
+        (TestWebKitAPI::didCommitLoadForFrame):
+        (TestWebKitAPI::didFinishLoadForFrame):
+        Test that URLs are null pointers when unset.
+
 2010-10-28  Chris Fleizach  <cfleizach at apple.com>
 
         Reviewed by Adele Peterson.
diff --git a/WebKitTools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj b/WebKitTools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
index dd216a5..ef55b28 100644
--- a/WebKitTools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
+++ b/WebKitTools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
@@ -256,8 +256,8 @@
 		BC90977B125571AE00083756 /* Resources */ = {
 			isa = PBXGroup;
 			children = (
-				BCBD372E125ABBE600D2C29F /* icon.png */,
 				1A02C84B125D4A5E00E3F4BD /* find.html */,
+				BCBD372E125ABBE600D2C29F /* icon.png */,
 				BC909778125571AB00083756 /* simple.html */,
 				C02B7882126615410026BF0F /* spacebar-scrolling.html */,
 			);
diff --git a/WebKitTools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp b/WebKitTools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp
index a0b4058..c3af543 100644
--- a/WebKitTools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp
+++ b/WebKitTools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp
@@ -52,8 +52,13 @@ static void didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WK
     State* state = reinterpret_cast<State*>(const_cast<void*>(clientInfo));
     TEST_ASSERT(state->didDecidePolicyForNavigationAction);
     TEST_ASSERT(!state->didCommitLoadForFrame);
+
+    // The commited URL should be null.
+    TEST_ASSERT(!WKFrameCopyURL(frame));
+
     TEST_ASSERT(!state->didStartProvisionalLoadForFrame);
 
+
     state->didStartProvisionalLoadForFrame = true;
 }
 
@@ -63,6 +68,9 @@ static void didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef us
     TEST_ASSERT(state->didDecidePolicyForNavigationAction);
     TEST_ASSERT(state->didStartProvisionalLoadForFrame);
 
+    // The provisional URL should be null.
+    TEST_ASSERT(!WKFrameCopyProvisionalURL(frame));
+
     state->didCommitLoadForFrame = true;
 }
 
@@ -73,6 +81,9 @@ static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef us
     TEST_ASSERT(state->didStartProvisionalLoadForFrame);
     TEST_ASSERT(state->didCommitLoadForFrame);
 
+    // The provisional URL should be null.
+    TEST_ASSERT(!WKFrameCopyProvisionalURL(frame));
+
     test1Done = true;
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list