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

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

Issue 26506003: Setting host without port should keep old port (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: git rebase Created 7 years, 2 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 | « LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt ('k') | no next file » | 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 e0034d05ae423aeb9a67a8c9705ffb2dd95f2abc..e10898a4831280c94700e98a62ee3d363e934d4d 100644
--- a/Source/core/html/HTMLAnchorElement.cpp
+++ b/Source/core/html/HTMLAnchorElement.cpp
@@ -413,9 +413,9 @@ void HTMLAnchorElement::setHost(const String& value)
if (!separator)
return;
- if (separator == kNotFound)
- url.setHostAndPort(value);
- else {
+ if (separator == kNotFound) {
+ url.setHost(value);
+ } else {
unsigned portEnd;
unsigned port = parsePortFromStringPosition(value, separator + 1, portEnd);
if (!port) {
« no previous file with comments | « LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698