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

Unified Diff: WebCore/dom/DOMImplementation.cpp

Issue 2845006: Merge 57386 - 2010-04-09 Abhishek Arya <inferno@chromium.org>... (Closed) Base URL: svn://chrome-svn/chrome/branches/WebKit/375/
Patch Set: Created 10 years, 6 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
Index: WebCore/dom/DOMImplementation.cpp
===================================================================
--- WebCore/dom/DOMImplementation.cpp (revision 49838)
+++ WebCore/dom/DOMImplementation.cpp (working copy)
@@ -284,9 +284,10 @@
bool DOMImplementation::isTextMIMEType(const String& mimeType)
{
- if (MIMETypeRegistry::isSupportedJavaScriptMIMEType(mimeType) ||
- (mimeType.startsWith("text/") && mimeType != "text/html" &&
- mimeType != "text/xml" && mimeType != "text/xsl"))
+ if (MIMETypeRegistry::isSupportedJavaScriptMIMEType(mimeType)
+ || mimeType == "application/json" // Render JSON as text/plain.
+ || (mimeType.startsWith("text/") && mimeType != "text/html"
+ && mimeType != "text/xml" && mimeType != "text/xsl"))
return true;
return false;

Powered by Google App Engine
This is Rietveld 408576698