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

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

Issue 22909053: Store the Document's encoding on the Document (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Set document encoding in DecodedDataDocumentParser instead of DocumentWriter Created 7 years, 4 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/dom/Document.cpp ('k') | Source/core/html/parser/XSSAuditor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLBaseElement.cpp
diff --git a/Source/core/html/HTMLBaseElement.cpp b/Source/core/html/HTMLBaseElement.cpp
index 1d6f2373f96b0d16ef44f5168e19001d93fb5ed9..6b3bf7c9bd275cf0b549c64ee5631f22e4f84ccd 100644
--- a/Source/core/html/HTMLBaseElement.cpp
+++ b/Source/core/html/HTMLBaseElement.cpp
@@ -88,9 +88,9 @@ KURL HTMLBaseElement::href() const
if (attributeValue.isNull())
return document()->url();
- KURL url = !document()->decoder() ?
+ KURL url = document()->encoding().isValid() ?
KURL(document()->url(), stripLeadingAndTrailingHTMLSpaces(attributeValue)) :
- KURL(document()->url(), stripLeadingAndTrailingHTMLSpaces(attributeValue), document()->decoder()->encoding());
+ KURL(document()->url(), stripLeadingAndTrailingHTMLSpaces(attributeValue), document()->encoding());
if (!url.isValid())
return KURL();
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/parser/XSSAuditor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698