ShouldLoadResourceForFrame should use strings, not URLs.
authorbweinstein@apple.com <bweinstein@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Jan 2011 22:57:10 +0000 (22:57 +0000)
committerbweinstein@apple.com <bweinstein@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Jan 2011 22:57:10 +0000 (22:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=52476

Reviewed by Geoff Garen.

Tools:

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::shouldLoadResourceForFrame): Update to use a WKStringRef.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:

WebKit2:

* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::shouldLoadResourceForFrame): Pass resourceURL as a string instead of
    a URL, and rename from subresourceURL to resourceURL.

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

Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
WebKit2/ChangeLog
WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp

index 73c007d..0ee5208 100644 (file)
@@ -1,3 +1,14 @@
+2011-01-14  Brian Weinstein  <bweinstein@apple.com>
+
+        Reviewed by Geoff Garen.
+
+        ShouldLoadResourceForFrame should use strings, not URLs.
+        https://bugs.webkit.org/show_bug.cgi?id=52476
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::InjectedBundlePage::shouldLoadResourceForFrame): Update to use a WKStringRef.
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
+
 2011-01-14  Tony Gentilcore  <tonyg@chromium.org>
 
         Reviewed by David Levin.
index 765ff37..4bcb3c8 100644 (file)
@@ -323,7 +323,7 @@ void InjectedBundlePage::didRunInsecureContentForFrame(WKBundlePageRef page, WKB
     static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didRunInsecureContentForFrame(frame);
 }
 
-bool InjectedBundlePage::shouldLoadResourceForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef, const void* clientInfo)
+bool InjectedBundlePage::shouldLoadResourceForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKStringRef, const void* clientInfo)
 {
     return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldLoadResourceForFrame(frame);
 }
index ac9fbc3..e9462df 100644 (file)
@@ -64,7 +64,7 @@ private:
     static void didHandleOnloadEventsForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     static void didDisplayInsecureContentForFrame(WKBundlePageRef, WKBundleFrameRef, WKTypeRef*, const void*);
     static void didRunInsecureContentForFrame(WKBundlePageRef, WKBundleFrameRef, WKTypeRef*, const void*);
-    static bool shouldLoadResourceForFrame(WKBundlePageRef, WKBundleFrameRef, WKURLRef, const void*);
+    static bool shouldLoadResourceForFrame(WKBundlePageRef, WKBundleFrameRef, WKStringRef, const void*);
     void didStartProvisionalLoadForFrame(WKBundleFrameRef);
     void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef);
     void didFailProvisionalLoadWithErrorForFrame(WKBundleFrameRef, WKErrorRef);
index 285b8de..8c26b4a 100644 (file)
@@ -1,3 +1,15 @@
+2011-01-14  Brian Weinstein  <bweinstein@apple.com>
+
+        Reviewed by Geoff Garen.
+
+        ShouldLoadResourceForFrame should use strings, not URLs.
+        https://bugs.webkit.org/show_bug.cgi?id=52476
+
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
+        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
+        (WebKit::InjectedBundlePageLoaderClient::shouldLoadResourceForFrame): Pass resourceURL as a string instead of
+            a URL, and rename from subresourceURL to resourceURL.
+
 2011-01-14  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Sam Weinig.
index 6c6ed3a..00db56f 100644 (file)
@@ -87,7 +87,7 @@ typedef void (*WKBundlePageDidClearWindowObjectForFrameCallback)(WKBundlePageRef
 typedef void (*WKBundlePageDidCancelClientRedirectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
 typedef void (*WKBundlePageWillPerformClientRedirectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, double delay, double date, const void *clientInfo);
 typedef void (*WKBundlePageDidHandleOnloadEventsForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
-typedef bool (*WKBundlePageShouldLoadResourceForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, const void *clientInfo);
+typedef bool (*WKBundlePageShouldLoadResourceForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKStringRef url, const void *clientInfo);
 
 
 struct WKBundlePageLoaderClient {
index 2df2ffd..23341c5 100644 (file)
@@ -175,12 +175,12 @@ void InjectedBundlePageLoaderClient::didRunInsecureContentForFrame(WebPage* page
     userData = adoptRef(toImpl(userDataToPass));
 }
 
-bool InjectedBundlePageLoaderClient::shouldLoadResourceForFrame(WebPage* page, WebFrame* frame, const String& subResourceURL)
+bool InjectedBundlePageLoaderClient::shouldLoadResourceForFrame(WebPage* page, WebFrame* frame, const String& resourceURL)
 {
     if (!m_client.shouldLoadResourceForFrame)
         return true;
 
-    return m_client.shouldLoadResourceForFrame(toAPI(page), toAPI(frame), toURLRef(subResourceURL.impl()), m_client.clientInfo);
+    return m_client.shouldLoadResourceForFrame(toAPI(page), toAPI(frame), toAPI(resourceURL.impl()), m_client.clientInfo);
 }
 
 void InjectedBundlePageLoaderClient::didClearWindowObjectForFrame(WebPage* page, WebFrame* frame, DOMWrapperWorld* world)