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

Unified Diff: Source/core/dom/Document.cpp

Issue 27030014: Remove Backslash-as-JPY hack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: TextCodec/Encoding added 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 | « Source/core/dom/Document.h ('k') | Source/core/editing/TextIterator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 9e2a20dd7a17e8edc0ca7ee1fa097074215cb6c7..55bd3b6c3af900016056e0393f799c8c182d7d0d 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1276,9 +1276,6 @@ static inline String canonicalizedTitle(Document* document, const String& title)
buffer.shrink(builderIndex + 1);
- // Replace the backslashes with currency symbols if the encoding requires it.
- document->displayBufferModifiedByEncoding(buffer.characters(), buffer.length());
-
return String::adopt(buffer);
}
@@ -2419,7 +2416,7 @@ bool Document::dispatchBeforeUnloadEvent(Chrome& chrome, Document* navigatingDoc
return true;
}
- String text = displayStringModifiedByEncoding(beforeUnloadEvent->returnValue());
+ String text = beforeUnloadEvent->returnValue();
if (chrome.runBeforeUnloadConfirmPanel(text, m_frame)) {
navigatingDocument->m_didAllowNavigationViaBeforeUnloadConfirmationPanel = true;
return true;
@@ -4750,31 +4747,6 @@ void Document::resumeScriptedAnimationControllerCallbacks()
m_scriptedAnimationController->resume();
}
-String Document::displayStringModifiedByEncoding(const String& str) const
-{
- if (m_decoder)
- return m_decoder->encoding().displayString(str.impl());
- return str;
-}
-
-PassRefPtr<StringImpl> Document::displayStringModifiedByEncoding(PassRefPtr<StringImpl> str) const
-{
- if (m_decoder)
- return m_decoder->encoding().displayString(str);
- return str;
-}
-
-template <typename CharacterType>
-void Document::displayBufferModifiedByEncodingInternal(CharacterType* buffer, unsigned len) const
-{
- if (m_decoder)
- m_decoder->encoding().displayBuffer(buffer, len);
-}
-
-// Generate definitions for both character types
-template void Document::displayBufferModifiedByEncodingInternal<LChar>(LChar*, unsigned) const;
-template void Document::displayBufferModifiedByEncodingInternal<UChar>(UChar*, unsigned) const;
-
void Document::enqueuePageshowEvent(PageshowEventPersistence persisted)
{
// FIXME: https://bugs.webkit.org/show_bug.cgi?id=36334 Pageshow event needs to fire asynchronously.
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/editing/TextIterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698