OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 | 1181 |
1182 String Document::defaultCharset() const | 1182 String Document::defaultCharset() const |
1183 { | 1183 { |
1184 if (Settings* settings = this->settings()) | 1184 if (Settings* settings = this->settings()) |
1185 return settings->defaultTextEncodingName(); | 1185 return settings->defaultTextEncodingName(); |
1186 return String(); | 1186 return String(); |
1187 } | 1187 } |
1188 | 1188 |
1189 void Document::setCharset(const String& charset) | 1189 void Document::setCharset(const String& charset) |
1190 { | 1190 { |
1191 UseCounter::count(*this, UseCounter::DocumentSetCharset); | 1191 UseCounter::countDeprecation(*this, UseCounter::DocumentSetCharset); |
1192 if (DocumentLoader* documentLoader = loader()) | 1192 if (DocumentLoader* documentLoader = loader()) |
1193 documentLoader->setUserChosenEncoding(charset); | 1193 documentLoader->setUserChosenEncoding(charset); |
1194 WTF::TextEncoding encoding(charset); | 1194 WTF::TextEncoding encoding(charset); |
1195 // In case the encoding didn't exist, we keep the old one (helps some sites
specifying invalid encodings). | 1195 // In case the encoding didn't exist, we keep the old one (helps some sites
specifying invalid encodings). |
1196 if (!encoding.isValid()) | 1196 if (!encoding.isValid()) |
1197 return; | 1197 return; |
1198 DocumentEncodingData newEncodingData = m_encodingData; | 1198 DocumentEncodingData newEncodingData = m_encodingData; |
1199 newEncodingData.setEncoding(encoding); | 1199 newEncodingData.setEncoding(encoding); |
1200 setEncodingData(newEncodingData); | 1200 setEncodingData(newEncodingData); |
1201 } | 1201 } |
(...skipping 4645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5847 #ifndef NDEBUG | 5847 #ifndef NDEBUG |
5848 using namespace blink; | 5848 using namespace blink; |
5849 void showLiveDocumentInstances() | 5849 void showLiveDocumentInstances() |
5850 { | 5850 { |
5851 WeakDocumentSet& set = liveDocumentSet(); | 5851 WeakDocumentSet& set = liveDocumentSet(); |
5852 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5852 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5853 for (Document* document : set) | 5853 for (Document* document : set) |
5854 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5854 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5855 } | 5855 } |
5856 #endif | 5856 #endif |
OLD | NEW |