Commit 3125c2a4 authored by ap@webkit.org's avatar ap@webkit.org

2009-02-06 Xan Lopez <xan@gnome.org>

        Reviewed by Alexey Proskuryakov.

        https://bugs.webkit.org/show_bug.cgi?id=23761

        Use two-arg KURL ctor.

        We are using the one-arg ctor currently, but:

        - It assumes the strings are already encoded, which is not
        necesarily the case for us.

        - The single-argument KURL ctors expect their input to already be
        the output of a previous KURL::parse call, so for the general
        case (ie, random user input) we need to use the two-arg ctor
        anyway.

        * webkit/webkitwebframe.cpp:
        * webkit/webkitwebview.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d7cbb5ce
2009-02-06 Xan Lopez <xan@gnome.org>
Reviewed by Alexey Proskuryakov.
https://bugs.webkit.org/show_bug.cgi?id=23761
Use two-arg KURL ctor.
We are using the one-arg ctor currently, but:
- It assumes the strings are already encoded, which is not
necesarily the case for us.
- The single-argument KURL ctors expect their input to already be
the output of a previous KURL::parse call, so for the general
case (ie, random user input) we need to use the two-arg ctor
anyway.
* webkit/webkitwebframe.cpp:
* webkit/webkitwebview.cpp:
2009-02-05 Aaron Boodman <aa@chromium.org>
Reviewed by Dave Hyatt.
......
......@@ -394,7 +394,7 @@ void webkit_web_frame_load_request(WebKitWebFrame* frame, WebKitNetworkRequest*
// TODO: Use the ResourceRequest carried by WebKitNetworkRequest when it is implemented.
String string = String::fromUTF8(webkit_network_request_get_uri(request));
coreFrame->loader()->load(ResourceRequest(KURL(string)), false);
coreFrame->loader()->load(ResourceRequest(KURL(KURL(), string)), false);
}
/**
......
......@@ -1658,7 +1658,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
settings->setJavaScriptEnabled(enableScripts);
settings->setPluginsEnabled(enablePlugins);
settings->setTextAreasAreResizable(resizableTextAreas);
settings->setUserStyleSheetLocation(KURL(userStylesheetUri));
settings->setUserStyleSheetLocation(KURL(KURL(), userStylesheetUri));
settings->setDeveloperExtrasEnabled(enableDeveloperExtras);
g_free(defaultEncoding);
......@@ -1725,7 +1725,7 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
else if (name == g_intern_string("resizable-text-areas"))
settings->setTextAreasAreResizable(g_value_get_boolean(&value));
else if (name == g_intern_string("user-stylesheet-uri"))
settings->setUserStyleSheetLocation(KURL(g_value_get_string(&value)));
settings->setUserStyleSheetLocation(KURL(KURL(), g_value_get_string(&value)));
else if (name == g_intern_string("enable-developer-extras"))
settings->setDeveloperExtrasEnabled(g_value_get_boolean(&value));
else if (!g_object_class_find_property(G_OBJECT_GET_CLASS(webSettings), name))
......@@ -2054,7 +2054,7 @@ void webkit_web_view_open(WebKitWebView* webView, const gchar* uri)
g_return_if_fail(uri);
Frame* frame = core(webView)->mainFrame();
frame->loader()->load(ResourceRequest(KURL(String::fromUTF8(uri))), false);
frame->loader()->load(ResourceRequest(KURL(KURL(), String::fromUTF8(uri))), false);
}
void webkit_web_view_reload(WebKitWebView* webView)
......@@ -2086,9 +2086,9 @@ void webkit_web_view_load_string(WebKitWebView* webView, const gchar* content, c
Frame* frame = core(webView)->mainFrame();
KURL url(baseUri ? String::fromUTF8(baseUri) : "");
KURL url(KURL(), baseUri ? String::fromUTF8(baseUri) : "");
RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(content, strlen(content));
SubstituteData substituteData(sharedBuffer.release(), contentMimeType ? String(contentMimeType) : "text/html", contentEncoding ? String(contentEncoding) : "UTF-8", KURL("about:blank"), url);
SubstituteData substituteData(sharedBuffer.release(), contentMimeType ? String(contentMimeType) : "text/html", contentEncoding ? String(contentEncoding) : "UTF-8", blankURL(), url);
frame->loader()->load(ResourceRequest(url), substituteData, false);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment