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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 | 1157 |
1158 String Document::defaultCharset() const | 1158 String Document::defaultCharset() const |
1159 { | 1159 { |
1160 if (Settings* settings = this->settings()) | 1160 if (Settings* settings = this->settings()) |
1161 return settings->defaultTextEncodingName(); | 1161 return settings->defaultTextEncodingName(); |
1162 return String(); | 1162 return String(); |
1163 } | 1163 } |
1164 | 1164 |
1165 void Document::setCharset(const String& charset) | 1165 void Document::setCharset(const String& charset) |
1166 { | 1166 { |
| 1167 UseCounter::count(*this, UseCounter::DocumentSetCharset); |
1167 if (DocumentLoader* documentLoader = loader()) | 1168 if (DocumentLoader* documentLoader = loader()) |
1168 documentLoader->setUserChosenEncoding(charset); | 1169 documentLoader->setUserChosenEncoding(charset); |
1169 WTF::TextEncoding encoding(charset); | 1170 WTF::TextEncoding encoding(charset); |
1170 // In case the encoding didn't exist, we keep the old one (helps some sites
specifying invalid encodings). | 1171 // In case the encoding didn't exist, we keep the old one (helps some sites
specifying invalid encodings). |
1171 if (!encoding.isValid()) | 1172 if (!encoding.isValid()) |
1172 return; | 1173 return; |
1173 DocumentEncodingData newEncodingData = m_encodingData; | 1174 DocumentEncodingData newEncodingData = m_encodingData; |
1174 newEncodingData.setEncoding(encoding); | 1175 newEncodingData.setEncoding(encoding); |
1175 setEncodingData(newEncodingData); | 1176 setEncodingData(newEncodingData); |
1176 } | 1177 } |
(...skipping 4582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5759 visitor->trace(m_timeline); | 5760 visitor->trace(m_timeline); |
5760 visitor->trace(m_compositorPendingAnimations); | 5761 visitor->trace(m_compositorPendingAnimations); |
5761 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5762 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
5762 DocumentSupplementable::trace(visitor); | 5763 DocumentSupplementable::trace(visitor); |
5763 TreeScope::trace(visitor); | 5764 TreeScope::trace(visitor); |
5764 ContainerNode::trace(visitor); | 5765 ContainerNode::trace(visitor); |
5765 ExecutionContext::trace(visitor); | 5766 ExecutionContext::trace(visitor); |
5766 } | 5767 } |
5767 | 5768 |
5768 } // namespace WebCore | 5769 } // namespace WebCore |
OLD | NEW |