Title: [119757] trunk/Source/WebKit/qt
- Revision
- 119757
- Author
- [email protected]
- Date
- 2012-06-07 15:01:37 -0700 (Thu, 07 Jun 2012)
Log Message
[Qt] Qt DRT should load external resources - cleanup
https://bugs.webkit.org/show_bug.cgi?id=88568
Make things more straighforward to load external URLs in DRT.
Reviewed by Ryosuke Niwa.
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::dispatchWillSendRequest):
Modified Paths
Diff
Modified: trunk/Source/WebKit/qt/ChangeLog (119756 => 119757)
--- trunk/Source/WebKit/qt/ChangeLog 2012-06-07 21:55:42 UTC (rev 119756)
+++ trunk/Source/WebKit/qt/ChangeLog 2012-06-07 22:01:37 UTC (rev 119757)
@@ -1,3 +1,15 @@
+2012-06-07 Zoltan Horvath <[email protected]>
+
+ [Qt] Qt DRT should load external resources - cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=88568
+
+ Make things more straighforward to load external URLs in DRT.
+
+ Reviewed by Ryosuke Niwa.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchWillSendRequest):
+
2012-06-06 Zoltan Horvath <[email protected]>
[Qt] Qt DRT / WTR should be able to load external resources
Modified: trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp (119756 => 119757)
--- trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp 2012-06-07 21:55:42 UTC (rev 119756)
+++ trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp 2012-06-07 22:01:37 UTC (rev 119757)
@@ -1040,8 +1040,6 @@
void FrameLoaderClientQt::dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest& newRequest, const WebCore::ResourceResponse& redirectResponse)
{
- QUrl url = ""
-
if (dumpResourceLoadCallbacks)
printf("%s - willSendRequest %s redirectResponse %s\n",
qPrintable(dumpAssignedUrls[identifier]),
@@ -1059,19 +1057,21 @@
return;
}
+ QUrl url = ""
QString host = url.host();
- QString urlLowerScheme = url.scheme().toLower();
+ QString urlScheme = url.scheme().toLower();
if (QWebPagePrivate::drtRun
&& !host.isEmpty()
- && (urlLowerScheme == QLatin1String("http") || urlLowerScheme == QLatin1String("https"))) {
+ && (urlScheme == QLatin1String("http") || urlScheme == QLatin1String("https"))) {
- QUrl testURL = m_frame->page()->mainFrame()->document()->url();
+ QUrl testURL = m_webFrame->page()->mainFrame()->requestedUrl();
QString testHost = testURL.host();
+ QString testURLScheme = testURL.scheme().toLower();
if (!isLocalhost(host)
&& !hostIsUsedBySomeTestsToGenerateError(host)
- && ((urlLowerScheme != QLatin1String("http") && urlLowerScheme != QLatin1String("https")) || testHost.isEmpty() || isLocalhost(testHost))) {
+ && ((testURLScheme != QLatin1String("http") && testURLScheme != QLatin1String("https")) || isLocalhost(testHost))) {
printf("Blocked access to external URL %s\n", qPrintable(drtDescriptionSuitableForTestResult(newRequest.url())));
blockRequest(newRequest);
return;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes