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

Side by Side Diff: Source/core/loader/DocumentLoader.cpp

Issue 1145773003: Remove the Document.charset setter (making it readonly) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix webexposed tests Created 5 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/DocumentLoader.h ('k') | Source/core/loader/DocumentWriter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 return DocumentWriter::create(document.get(), parsingPolicy, mimeType, encod ing); 759 return DocumentWriter::create(document.get(), parsingPolicy, mimeType, encod ing);
760 } 760 }
761 761
762 const AtomicString& DocumentLoader::mimeType() const 762 const AtomicString& DocumentLoader::mimeType() const
763 { 763 {
764 if (m_writer) 764 if (m_writer)
765 return m_writer->mimeType(); 765 return m_writer->mimeType();
766 return m_response.mimeType(); 766 return m_response.mimeType();
767 } 767 }
768 768
769 void DocumentLoader::setUserChosenEncoding(const String& charset)
770 {
771 if (m_writer)
772 m_writer->setUserChosenEncoding(charset);
773 }
774
775 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR L() 769 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR L()
776 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn it& init, const String& source, Document* ownerDocument) 770 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn it& init, const String& source, Document* ownerDocument)
777 { 771 {
778 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing); 772 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing);
779 if (!source.isNull()) 773 if (!source.isNull())
780 m_writer->appendReplacingData(source); 774 m_writer->appendReplacingData(source);
781 endWriting(m_writer.get()); 775 endWriting(m_writer.get());
782 } 776 }
783 777
784 } // namespace blink 778 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentLoader.h ('k') | Source/core/loader/DocumentWriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698