Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1005)

Unified Diff: Source/core/html/HTMLAnchorElement.cpp

Issue 126443005: Use TreeScope::completeURL and baseURL instead of the Document versions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased again, passes tests Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLAnchorElement.h ('k') | Source/core/html/HTMLAppletElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLAnchorElement.cpp
diff --git a/Source/core/html/HTMLAnchorElement.cpp b/Source/core/html/HTMLAnchorElement.cpp
index daed2076f1bb8050bbf3baf7e62b04a3ad4538b9..d355d86cf6a53e5e84fd263d02b3a342baa49009 100644
--- a/Source/core/html/HTMLAnchorElement.cpp
+++ b/Source/core/html/HTMLAnchorElement.cpp
@@ -275,7 +275,7 @@ void HTMLAnchorElement::parseAttribute(const QualifiedName& name, const AtomicSt
String parsedURL = stripLeadingAndTrailingHTMLSpaces(value);
if (document().isDNSPrefetchEnabled()) {
if (protocolIs(parsedURL, "http") || protocolIs(parsedURL, "https") || parsedURL.startsWith("//"))
- prefetchDNS(document().completeURL(parsedURL).host());
+ prefetchDNS(treeScope().completeURL(parsedURL).host());
}
if (wasLink)
@@ -321,7 +321,7 @@ bool HTMLAnchorElement::draggable() const
KURL HTMLAnchorElement::href() const
{
- return document().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute(hrefAttr)));
+ return treeScope().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute(hrefAttr)));
}
void HTMLAnchorElement::setHref(const AtomicString& value)
@@ -397,7 +397,7 @@ void HTMLAnchorElement::sendPings(const KURL& destinationURL)
SpaceSplitString pingURLs(getAttribute(pingAttr), false);
for (unsigned i = 0; i < pingURLs.size(); i++)
- PingLoader::sendPing(document().frame(), document().completeURL(pingURLs[i]), destinationURL);
+ PingLoader::sendPing(document().frame(), treeScope().completeURL(pingURLs[i]), destinationURL);
}
void HTMLAnchorElement::handleClick(Event* event)
@@ -411,7 +411,7 @@ void HTMLAnchorElement::handleClick(Event* event)
StringBuilder url;
url.append(stripLeadingAndTrailingHTMLSpaces(fastGetAttribute(hrefAttr)));
appendServerMapMousePosition(url, event);
- KURL completedURL = document().completeURL(url.toString());
+ KURL completedURL = treeScope().completeURL(url.toString());
// Schedule the ping before the frame load. Prerender in Chrome may kill the renderer as soon as the navigation is
// sent out.
« no previous file with comments | « Source/core/html/HTMLAnchorElement.h ('k') | Source/core/html/HTMLAppletElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698