Commit a154c9df authored by cjerdonek@webkit.org's avatar cjerdonek@webkit.org
Browse files

2010-05-20 Chris Jerdonek <cjerdonek@webkit.org>

        Reviewed by Eric Seidel.

        Modified FrameLoader::urlSelected() to accept a KURL instead of a
        ResourceRequest.

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

        Since ResourceRequest has non-explicit single-parameter constructors for
        String and KURL, urlSelected() previously accepted any of String, KURL,
        and ResourceRequest.  This revision changes urlSelected() to accept only
        a KURL to make the API tighter and easier to refactor.

        No new functionality, so no new tests.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::urlSelected):
          - Changed the public overload to accept a KURL instead of a ResourceRequest.
        * loader/FrameLoader.h:
          - Changed the public overload to accept a KURL instead of a ResourceRequest.
        * wml/WMLAElement.cpp:
        (WebCore::WMLAElement::defaultEventHandler):
          - Updated the call to urlSelected().
2010-05-20  Chris Jerdonek  <cjerdonek@webkit.org>

        Reviewed by Eric Seidel.

        Modified FrameLoader::urlSelected() to accept a KURL instead of a
        ResourceRequest.

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

        Since ResourceRequest has non-explicit single-parameter constructors for
        String and KURL, urlSelected() previously accepted any of String, KURL,
        and ResourceRequest.  This revision changes urlSelected() to accept only
        a KURL to make the API tighter and easier to refactor.

        * WebCoreSupport/WebContextMenuClient.cpp:
        (WebContextMenuClient::searchWithGoogle):
          - Updated the call to urlSelected().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 034e133e
2010-05-20 Chris Jerdonek <cjerdonek@webkit.org>
Reviewed by Eric Seidel.
Modified FrameLoader::urlSelected() to accept a KURL instead of a
ResourceRequest.
https://bugs.webkit.org/show_bug.cgi?id=39320
Since ResourceRequest has non-explicit single-parameter constructors for
String and KURL, urlSelected() previously accepted any of String, KURL,
and ResourceRequest. This revision changes urlSelected() to accept only
a KURL to make the API tighter and easier to refactor.
No new functionality, so no new tests.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::urlSelected):
- Changed the public overload to accept a KURL instead of a ResourceRequest.
* loader/FrameLoader.h:
- Changed the public overload to accept a KURL instead of a ResourceRequest.
* wml/WMLAElement.cpp:
(WebCore::WMLAElement::defaultEventHandler):
- Updated the call to urlSelected().
2010-05-20 MORITA Hajime <morrita@google.com>
 
Reviewed by Kent Tamura.
......@@ -349,13 +349,13 @@ void FrameLoader::changeLocation(const KURL& url, const String& referrer, bool l
urlSelected(request, "_self", 0, lockHistory, lockBackForwardList, userGesture, SendReferrer, ReplaceDocumentIfJavaScriptURL);
}
void FrameLoader::urlSelected(const ResourceRequest& request, const String& passedTarget, PassRefPtr<Event> triggeringEvent, bool lockHistory, bool lockBackForwardList, bool userGesture, ReferrerPolicy referrerPolicy)
void FrameLoader::urlSelected(const KURL& url, const String& passedTarget, PassRefPtr<Event> triggeringEvent, bool lockHistory, bool lockBackForwardList, bool userGesture, ReferrerPolicy referrerPolicy)
{
urlSelected(request, passedTarget, triggeringEvent, lockHistory, lockBackForwardList, userGesture, referrerPolicy, DoNotReplaceDocumentIfJavaScriptURL);
urlSelected(ResourceRequest(url), passedTarget, triggeringEvent, lockHistory, lockBackForwardList, userGesture, referrerPolicy, DoNotReplaceDocumentIfJavaScriptURL);
}
// This overload will go away when the FIXME to eliminate the shouldReplaceDocumentIfJavaScriptURL
// parameter from ScriptController::executeIfJavaScriptURL() is addressed.
// The shouldReplaceDocumentIfJavaScriptURL parameter will go away when the FIXME to eliminate the
// corresponding parameter from ScriptController::executeIfJavaScriptURL() is addressed.
void FrameLoader::urlSelected(const ResourceRequest& request, const String& passedTarget, PassRefPtr<Event> triggeringEvent, bool lockHistory, bool lockBackForwardList, bool userGesture, ReferrerPolicy referrerPolicy, ShouldReplaceDocumentIfJavaScriptURL shouldReplaceDocumentIfJavaScriptURL)
{
ASSERT(!m_suppressOpenerInNewFrame);
......
......@@ -221,7 +221,7 @@ public:
void setDefersLoading(bool);
void changeLocation(const KURL&, const String& referrer, bool lockHistory = true, bool lockBackForwardList = true, bool userGesture = false, bool refresh = false);
void urlSelected(const ResourceRequest&, const String& target, PassRefPtr<Event>, bool lockHistory, bool lockBackForwardList, bool userGesture, ReferrerPolicy);
void urlSelected(const KURL&, const String& target, PassRefPtr<Event>, bool lockHistory, bool lockBackForwardList, bool userGesture, ReferrerPolicy);
bool requestFrame(HTMLFrameOwnerElement*, const String& url, const AtomicString& frameName, bool lockHistory = true, bool lockBackForwardList = true);
void submitForm(const char* action, const String& url,
......
......@@ -140,7 +140,7 @@ void WMLAElement::defaultEventHandler(Event* event)
}
if (!event->defaultPrevented() && document()->frame()) {
String url = document()->completeURL(deprecatedParseURL(getAttribute(HTMLNames::hrefAttr)));
KURL url = document()->completeURL(deprecatedParseURL(getAttribute(HTMLNames::hrefAttr)));
document()->frame()->loader()->urlSelected(url, target(), event, false, false, true, SendReferrer);
}
......
2010-05-20 Chris Jerdonek <cjerdonek@webkit.org>
Reviewed by Eric Seidel.
Modified FrameLoader::urlSelected() to accept a KURL instead of a
ResourceRequest.
https://bugs.webkit.org/show_bug.cgi?id=39320
Since ResourceRequest has non-explicit single-parameter constructors for
String and KURL, urlSelected() previously accepted any of String, KURL,
and ResourceRequest. This revision changes urlSelected() to accept only
a KURL to make the API tighter and easier to refactor.
* WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::searchWithGoogle):
- Updated the call to urlSelected().
2010-05-13 Brian Weinstein <bweinstein@apple.com>
Reviewed by Tim Hatcher.
......
......@@ -140,9 +140,8 @@ void WebContextMenuClient::searchWithGoogle(const Frame* frame)
url.append(encoded);
url.append("&ie=UTF-8&oe=UTF-8");
ResourceRequest request = ResourceRequest(url);
if (Page* page = frame->page())
page->mainFrame()->loader()->urlSelected(request, String(), 0, false, false, true, SendReferrer);
page->mainFrame()->loader()->urlSelected(KURL(ParsedURLString, url), String(), 0, false, false, true, SendReferrer);
}
void WebContextMenuClient::lookUpInDictionary(Frame*)
......
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