| 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 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 return DocumentFragment::create(document()); | 799 return DocumentFragment::create(document()); |
| 800 } | 800 } |
| 801 | 801 |
| 802 PassRefPtr<Text> Document::createTextNode(const String& data) | 802 PassRefPtr<Text> Document::createTextNode(const String& data) |
| 803 { | 803 { |
| 804 return Text::create(*this, data); | 804 return Text::create(*this, data); |
| 805 } | 805 } |
| 806 | 806 |
| 807 PassRefPtr<Comment> Document::createComment(const String& data) | 807 PassRefPtr<Comment> Document::createComment(const String& data) |
| 808 { | 808 { |
| 809 return Comment::create(this, data); | 809 return Comment::create(*this, data); |
| 810 } | 810 } |
| 811 | 811 |
| 812 PassRefPtr<CDATASection> Document::createCDATASection(const String& data, Except
ionState& es) | 812 PassRefPtr<CDATASection> Document::createCDATASection(const String& data, Except
ionState& es) |
| 813 { | 813 { |
| 814 if (isHTMLDocument()) { | 814 if (isHTMLDocument()) { |
| 815 es.throwDOMException(NotSupportedError); | 815 es.throwDOMException(NotSupportedError); |
| 816 return 0; | 816 return 0; |
| 817 } | 817 } |
| 818 if (data.find("]]>") != WTF::notFound) { | 818 if (data.find("]]>") != WTF::notFound) { |
| 819 es.throwDOMException(InvalidCharacterError, "String cannot contain ']]>'
since that is the end delimiter of a CData section."); | 819 es.throwDOMException(InvalidCharacterError, "String cannot contain ']]>'
since that is the end delimiter of a CData section."); |
| 820 return 0; | 820 return 0; |
| 821 } | 821 } |
| 822 return CDATASection::create(*this, data); | 822 return CDATASection::create(*this, data); |
| 823 } | 823 } |
| 824 | 824 |
| 825 PassRefPtr<ProcessingInstruction> Document::createProcessingInstruction(const St
ring& target, const String& data, ExceptionState& es) | 825 PassRefPtr<ProcessingInstruction> Document::createProcessingInstruction(const St
ring& target, const String& data, ExceptionState& es) |
| 826 { | 826 { |
| 827 if (!isValidName(target)) { | 827 if (!isValidName(target)) { |
| 828 es.throwDOMException(InvalidCharacterError); | 828 es.throwDOMException(InvalidCharacterError); |
| 829 return 0; | 829 return 0; |
| 830 } | 830 } |
| 831 if (isHTMLDocument()) { | 831 if (isHTMLDocument()) { |
| 832 es.throwDOMException(NotSupportedError); | 832 es.throwDOMException(NotSupportedError); |
| 833 return 0; | 833 return 0; |
| 834 } | 834 } |
| 835 return ProcessingInstruction::create(this, target, data); | 835 return ProcessingInstruction::create(*this, target, data); |
| 836 } | 836 } |
| 837 | 837 |
| 838 PassRefPtr<Text> Document::createEditingTextNode(const String& text) | 838 PassRefPtr<Text> Document::createEditingTextNode(const String& text) |
| 839 { | 839 { |
| 840 return Text::createEditingText(*this, text); | 840 return Text::createEditingText(*this, text); |
| 841 } | 841 } |
| 842 | 842 |
| 843 PassRefPtr<CSSStyleDeclaration> Document::createCSSStyleDeclaration() | 843 PassRefPtr<CSSStyleDeclaration> Document::createCSSStyleDeclaration() |
| 844 { | 844 { |
| 845 return MutableStylePropertySet::create()->ensureCSSStyleDeclaration(); | 845 return MutableStylePropertySet::create()->ensureCSSStyleDeclaration(); |
| (...skipping 4593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5439 { | 5439 { |
| 5440 return DocumentLifecycleNotifier::create(this); | 5440 return DocumentLifecycleNotifier::create(this); |
| 5441 } | 5441 } |
| 5442 | 5442 |
| 5443 DocumentLifecycleNotifier* Document::lifecycleNotifier() | 5443 DocumentLifecycleNotifier* Document::lifecycleNotifier() |
| 5444 { | 5444 { |
| 5445 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); | 5445 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); |
| 5446 } | 5446 } |
| 5447 | 5447 |
| 5448 } // namespace WebCore | 5448 } // namespace WebCore |
| OLD | NEW |