| Index: third_party/WebKit/Source/wtf/text/TextCodecReplacement.cpp
|
| diff --git a/third_party/WebKit/Source/wtf/text/TextCodecReplacement.cpp b/third_party/WebKit/Source/wtf/text/TextCodecReplacement.cpp
|
| index 540e45597af7a7051856da90d635bdc73e58b881..c980bdcd51f3b3af9080c100016c8bae375125f9 100644
|
| --- a/third_party/WebKit/Source/wtf/text/TextCodecReplacement.cpp
|
| +++ b/third_party/WebKit/Source/wtf/text/TextCodecReplacement.cpp
|
| @@ -12,43 +12,38 @@
|
| namespace WTF {
|
|
|
| TextCodecReplacement::TextCodecReplacement()
|
| - : m_sentEOF(false)
|
| -{
|
| + : m_sentEOF(false) {
|
| }
|
|
|
| -void TextCodecReplacement::registerEncodingNames(EncodingNameRegistrar registrar)
|
| -{
|
| - // The 'replacement' label itself should not be referenceable by
|
| - // resources or script - it's a specification convenience - but much of
|
| - // the wtf/text API asserts that an encoding name is a label for itself.
|
| - // This is handled in TextEncoding by marking it as not valid.
|
| - registrar("replacement", "replacement");
|
| -
|
| - registrar("csiso2022kr", "replacement");
|
| - registrar("hz-gb-2312", "replacement");
|
| - registrar("iso-2022-cn", "replacement");
|
| - registrar("iso-2022-cn-ext", "replacement");
|
| - registrar("iso-2022-kr", "replacement");
|
| +void TextCodecReplacement::registerEncodingNames(EncodingNameRegistrar registrar) {
|
| + // The 'replacement' label itself should not be referenceable by
|
| + // resources or script - it's a specification convenience - but much of
|
| + // the wtf/text API asserts that an encoding name is a label for itself.
|
| + // This is handled in TextEncoding by marking it as not valid.
|
| + registrar("replacement", "replacement");
|
| +
|
| + registrar("csiso2022kr", "replacement");
|
| + registrar("hz-gb-2312", "replacement");
|
| + registrar("iso-2022-cn", "replacement");
|
| + registrar("iso-2022-cn-ext", "replacement");
|
| + registrar("iso-2022-kr", "replacement");
|
| }
|
|
|
| -static PassOwnPtr<TextCodec> newStreamingTextDecoderReplacement(const TextEncoding&, const void*)
|
| -{
|
| - return adoptPtr(new TextCodecReplacement);
|
| +static PassOwnPtr<TextCodec> newStreamingTextDecoderReplacement(const TextEncoding&, const void*) {
|
| + return adoptPtr(new TextCodecReplacement);
|
| }
|
|
|
| -void TextCodecReplacement::registerCodecs(TextCodecRegistrar registrar)
|
| -{
|
| - registrar("replacement", newStreamingTextDecoderReplacement, 0);
|
| +void TextCodecReplacement::registerCodecs(TextCodecRegistrar registrar) {
|
| + registrar("replacement", newStreamingTextDecoderReplacement, 0);
|
| }
|
|
|
| -String TextCodecReplacement::decode(const char*, size_t, FlushBehavior, bool, bool& sawError)
|
| -{
|
| - sawError = true;
|
| - if (m_sentEOF)
|
| - return String();
|
| +String TextCodecReplacement::decode(const char*, size_t, FlushBehavior, bool, bool& sawError) {
|
| + sawError = true;
|
| + if (m_sentEOF)
|
| + return String();
|
|
|
| - m_sentEOF = true;
|
| - return String(&replacementCharacter, 1);
|
| + m_sentEOF = true;
|
| + return String(&replacementCharacter, 1);
|
| }
|
|
|
| -} // namespace WTF
|
| +} // namespace WTF
|
|
|