Title: [97475] trunk/Tools
Revision
97475
Author
[email protected]
Date
2011-10-14 10:12:45 -0700 (Fri, 14 Oct 2011)

Log Message

[EFL] Correctly get the absolute URL in LayoutTestController::queueLoad()
https://bugs.webkit.org/show_bug.cgi?id=69770

Patch by Raphael Kubo da Costa <[email protected]> on 2011-10-14
Reviewed by Antonio Gomes.

We were just appending the given URL to the absolute URI of the main
frame, which resulted in "file:///foo/bar/baz.htmltheother/url.html"
instead of "file:///foo/bar/theother/url.html".

This should make fast/dom/navigation-type-navigate.html behave
better (it still fails, but later).

* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::queueLoad):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (97474 => 97475)


--- trunk/Tools/ChangeLog	2011-10-14 17:04:23 UTC (rev 97474)
+++ trunk/Tools/ChangeLog	2011-10-14 17:12:45 UTC (rev 97475)
@@ -1,3 +1,20 @@
+2011-10-14  Raphael Kubo da Costa  <[email protected]>
+
+        [EFL] Correctly get the absolute URL in LayoutTestController::queueLoad()
+        https://bugs.webkit.org/show_bug.cgi?id=69770
+
+        Reviewed by Antonio Gomes.
+
+        We were just appending the given URL to the absolute URI of the main
+        frame, which resulted in "file:///foo/bar/baz.htmltheother/url.html"
+        instead of "file:///foo/bar/theother/url.html".
+
+        This should make fast/dom/navigation-type-navigate.html behave
+        better (it still fails, but later).
+
+        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+        (LayoutTestController::queueLoad):
+
 2011-10-13  Arko Saha  <[email protected]>
 
         Microdata: Basic implementation of document.getItems() method.

Modified: trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp (97474 => 97475)


--- trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp	2011-10-14 17:04:23 UTC (rev 97474)
+++ trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp	2011-10-14 17:12:45 UTC (rev 97475)
@@ -50,6 +50,7 @@
 #include <_javascript_Core/JSStringRef.h>
 #include <_javascript_Core/OpaqueJSString.h>
 #include <_javascript_Core/wtf/text/WTFString.h>
+#include <KURL.h>
 #include <editing/FindOptions.h>
 #include <stdio.h>
 
@@ -178,11 +179,11 @@
 
 void LayoutTestController::queueLoad(JSStringRef url, JSStringRef target)
 {
-    String absoluteUrl = String::fromUTF8(ewk_frame_uri_get(browser->mainFrame()));
-    absoluteUrl.append(url->characters(), url->length());
+    WebCore::KURL baseURL(WebCore::KURL(), String::fromUTF8(ewk_frame_uri_get(browser->mainFrame())));
+    WebCore::KURL absoluteURL(baseURL, WTF::String(url->characters(), url->length()));
 
     JSRetainPtr<JSStringRef> jsAbsoluteURL(
-        Adopt, JSStringCreateWithUTF8CString(absoluteUrl.utf8().data()));
+        Adopt, JSStringCreateWithUTF8CString(absoluteURL.string().utf8().data()));
 
     WorkQueue::shared()->queue(new LoadItem(jsAbsoluteURL.get(), target));
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to