OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 18 matching lines...) Expand all Loading... | |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/dom/DocumentEncodingData.h" | 32 #include "core/dom/DocumentEncodingData.h" |
33 | 33 |
34 #include "core/html/parser/TextResourceDecoder.h" | 34 #include "core/html/parser/TextResourceDecoder.h" |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 DocumentEncodingData::DocumentEncodingData() | 38 DocumentEncodingData::DocumentEncodingData() |
39 : m_wasDetectedHeuristically(false) | 39 : m_encoding("UTF-8") |
philipj_slow
2015/06/16 22:05:57
Could this use UTF8Encoding() instead of "UTF-8"?
| |
40 , m_wasDetectedHeuristically(false) | |
40 , m_sawDecodingError(false) | 41 , m_sawDecodingError(false) |
41 { | 42 { |
42 } | 43 } |
43 | 44 |
44 DocumentEncodingData::DocumentEncodingData(const TextResourceDecoder& decoder) | 45 DocumentEncodingData::DocumentEncodingData(const TextResourceDecoder& decoder) |
45 { | 46 { |
46 m_encoding = decoder.encoding(); | 47 m_encoding = decoder.encoding(); |
47 m_wasDetectedHeuristically = decoder.encodingWasDetectedHeuristically(); | 48 m_wasDetectedHeuristically = decoder.encodingWasDetectedHeuristically(); |
48 m_sawDecodingError = decoder.sawError(); | 49 m_sawDecodingError = decoder.sawError(); |
49 } | 50 } |
50 | 51 |
51 void DocumentEncodingData::setEncoding(const WTF::TextEncoding& encoding) | 52 void DocumentEncodingData::setEncoding(const WTF::TextEncoding& encoding) |
52 { | 53 { |
53 m_encoding = encoding; | 54 m_encoding = encoding; |
54 } | 55 } |
55 | 56 |
56 } // namespace blink | 57 } // namespace blink |
OLD | NEW |