Changeset 70795 in webkit
- Timestamp:
- Oct 28, 2010 12:09:43 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r70790 r70795 1 2010-10-28 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Anders Carlsson. 4 5 WKURLRefs should be allowed to be null 6 <rdar://problem/8575621> 7 https://bugs.webkit.org/show_bug.cgi?id=48535 8 9 * Shared/API/c/WKSharedAPICast.h: 10 (WebKit::toURLRef): 11 (WebKit::toCopiedURLAPI): 12 Turn a null WTF::String into a null WKURLRef. 13 1 14 2010-10-28 Sam Weinig <sam@webkit.org> 2 15 -
trunk/WebKit2/Shared/API/c/WKSharedAPICast.h
r70428 r70795 118 118 } 119 119 120 inline ProxyingRefPtr<WebURL> toURLRef(StringImpl* string)121 {122 StringImpl* impl = string ? string : StringImpl::empty();123 return ProxyingRefPtr<WebURL>(WebURL::create(String(impl)));124 }125 126 120 inline WKStringRef toCopiedAPI(const String& string) 127 121 { … … 131 125 } 132 126 127 inline ProxyingRefPtr<WebURL> toURLRef(StringImpl* string) 128 { 129 if (!string) 130 ProxyingRefPtr<WebURL>(0); 131 return ProxyingRefPtr<WebURL>(WebURL::create(String(string))); 132 } 133 133 134 inline WKURLRef toCopiedURLAPI(const String& string) 134 135 { 135 StringImpl* impl = string.impl() ? string.impl() : StringImpl::empty(); 136 RefPtr<WebURL> webURL = WebURL::create(String(impl)); 136 if (!string) 137 return 0; 138 RefPtr<WebURL> webURL = WebURL::create(string); 137 139 return toAPI(webURL.release().releaseRef()); 138 140 } -
trunk/WebKitTools/ChangeLog
r70792 r70795 1 2010-10-28 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Anders Carlsson. 4 5 WKURLRefs should be allowed to be null 6 <rdar://problem/8575621> 7 https://bugs.webkit.org/show_bug.cgi?id=48535 8 9 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 10 * TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp: 11 (TestWebKitAPI::didStartProvisionalLoadForFrame): 12 (TestWebKitAPI::didCommitLoadForFrame): 13 (TestWebKitAPI::didFinishLoadForFrame): 14 Test that URLs are null pointers when unset. 15 1 16 2010-10-28 Chris Fleizach <cfleizach@apple.com> 2 17 -
trunk/WebKitTools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r70658 r70795 257 257 isa = PBXGroup; 258 258 children = ( 259 1A02C84B125D4A5E00E3F4BD /* find.html */, 259 260 BCBD372E125ABBE600D2C29F /* icon.png */, 260 1A02C84B125D4A5E00E3F4BD /* find.html */,261 261 BC909778125571AB00083756 /* simple.html */, 262 262 C02B7882126615410026BF0F /* spacebar-scrolling.html */, -
trunk/WebKitTools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp
r69317 r70795 53 53 TEST_ASSERT(state->didDecidePolicyForNavigationAction); 54 54 TEST_ASSERT(!state->didCommitLoadForFrame); 55 56 // The commited URL should be null. 57 TEST_ASSERT(!WKFrameCopyURL(frame)); 58 55 59 TEST_ASSERT(!state->didStartProvisionalLoadForFrame); 60 56 61 57 62 state->didStartProvisionalLoadForFrame = true; … … 64 69 TEST_ASSERT(state->didStartProvisionalLoadForFrame); 65 70 71 // The provisional URL should be null. 72 TEST_ASSERT(!WKFrameCopyProvisionalURL(frame)); 73 66 74 state->didCommitLoadForFrame = true; 67 75 } … … 73 81 TEST_ASSERT(state->didStartProvisionalLoadForFrame); 74 82 TEST_ASSERT(state->didCommitLoadForFrame); 83 84 // The provisional URL should be null. 85 TEST_ASSERT(!WKFrameCopyProvisionalURL(frame)); 75 86 76 87 test1Done = true;
Note: See TracChangeset
for help on using the changeset viewer.