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

Side by Side Diff: Source/core/loader/DocumentWriter.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/DocumentWriter.h ('k') | no next file » | 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) 2010. Adam Barth. All rights reserved. 2 * Copyright (C) 2010. Adam Barth. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 m_parser->setDecoder(decoder.release()); 112 m_parser->setDecoder(decoder.release());
113 } 113 }
114 114
115 // finish() can result replacing DocumentLoader::m_writer. 115 // finish() can result replacing DocumentLoader::m_writer.
116 RefPtrWillBeRawPtr<DocumentWriter> protectingThis(this); 116 RefPtrWillBeRawPtr<DocumentWriter> protectingThis(this);
117 m_parser->finish(); 117 m_parser->finish();
118 m_parser = nullptr; 118 m_parser = nullptr;
119 m_document = nullptr; 119 m_document = nullptr;
120 } 120 }
121 121
122 void DocumentWriter::setUserChosenEncoding(const String& charset)
123 {
124 TextResourceDecoder* decoder = m_parser->decoder();
125 if (decoder)
126 decoder->setEncoding(charset, TextResourceDecoder::UserChosenEncoding);
127 }
128
129 void DocumentWriter::setDocumentWasLoadedAsPartOfNavigation() 122 void DocumentWriter::setDocumentWasLoadedAsPartOfNavigation()
130 { 123 {
131 ASSERT(m_parser && !m_parser->isStopped()); 124 ASSERT(m_parser && !m_parser->isStopped());
132 m_parser->setDocumentWasLoadedAsPartOfNavigation(); 125 m_parser->setDocumentWasLoadedAsPartOfNavigation();
133 } 126 }
134 127
135 } // namespace blink 128 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentWriter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698