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 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 if (m_contentLanguage == language) | 1147 if (m_contentLanguage == language) |
1148 return; | 1148 return; |
1149 m_contentLanguage = language; | 1149 m_contentLanguage = language; |
1150 | 1150 |
1151 // Document's style depends on the content language. | 1151 // Document's style depends on the content language. |
1152 setNeedsStyleRecalc(SubtreeStyleChange); | 1152 setNeedsStyleRecalc(SubtreeStyleChange); |
1153 } | 1153 } |
1154 | 1154 |
1155 void Document::setXMLVersion(const String& version, ExceptionState& exceptionSta
te) | 1155 void Document::setXMLVersion(const String& version, ExceptionState& exceptionSta
te) |
1156 { | 1156 { |
1157 if (!implementation().hasFeature("XML", String())) { | |
1158 exceptionState.throwDOMException(NotSupportedError, "This document does
not support XML."); | |
1159 return; | |
1160 } | |
1161 | |
1162 if (!XMLDocumentParser::supportsXMLVersion(version)) { | 1157 if (!XMLDocumentParser::supportsXMLVersion(version)) { |
1163 exceptionState.throwDOMException(NotSupportedError, "This document does
not support the XML version '" + version + "'."); | 1158 exceptionState.throwDOMException(NotSupportedError, "This document does
not support the XML version '" + version + "'."); |
1164 return; | 1159 return; |
1165 } | 1160 } |
1166 | 1161 |
1167 m_xmlVersion = version; | 1162 m_xmlVersion = version; |
1168 } | 1163 } |
1169 | 1164 |
1170 void Document::setXMLStandalone(bool standalone, ExceptionState& exceptionState) | 1165 void Document::setXMLStandalone(bool standalone, ExceptionState& exceptionState) |
1171 { | 1166 { |
1172 if (!implementation().hasFeature("XML", String())) { | |
1173 exceptionState.throwDOMException(NotSupportedError, "This document does
not support XML."); | |
1174 return; | |
1175 } | |
1176 | |
1177 m_xmlStandalone = standalone ? Standalone : NotStandalone; | 1167 m_xmlStandalone = standalone ? Standalone : NotStandalone; |
1178 } | 1168 } |
1179 | 1169 |
1180 KURL Document::baseURI() const | 1170 KURL Document::baseURI() const |
1181 { | 1171 { |
1182 return m_baseURL; | 1172 return m_baseURL; |
1183 } | 1173 } |
1184 | 1174 |
1185 void Document::setContent(const String& content) | 1175 void Document::setContent(const String& content) |
1186 { | 1176 { |
(...skipping 4412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5599 (*it)->invalidateCache(attrName); | 5589 (*it)->invalidateCache(attrName); |
5600 } | 5590 } |
5601 | 5591 |
5602 void Document::trace(Visitor* visitor) | 5592 void Document::trace(Visitor* visitor) |
5603 { | 5593 { |
5604 Supplementable<Document>::trace(visitor); | 5594 Supplementable<Document>::trace(visitor); |
5605 ContainerNode::trace(visitor); | 5595 ContainerNode::trace(visitor); |
5606 } | 5596 } |
5607 | 5597 |
5608 } // namespace WebCore | 5598 } // namespace WebCore |
OLD | NEW |