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

Side by Side Diff: Source/core/dom/DocumentEncodingData.cpp

Issue 1180793002: Document attribute charset and its aliases to return UTF-8 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated expectation file with UTF-8 Created 5 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 unified diff | Download patch
« Source/core/dom/Document.cpp ('K') | « Source/core/dom/Document.idl ('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) 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
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
OLDNEW
« Source/core/dom/Document.cpp ('K') | « Source/core/dom/Document.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698