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 { | 799 { |
800 return Comment::create(this, data); | 800 return Comment::create(this, data); |
801 } | 801 } |
802 | 802 |
803 PassRefPtr<CDATASection> Document::createCDATASection(const String& data, Except
ionState& es) | 803 PassRefPtr<CDATASection> Document::createCDATASection(const String& data, Except
ionState& es) |
804 { | 804 { |
805 if (isHTMLDocument()) { | 805 if (isHTMLDocument()) { |
806 es.throwDOMException(NotSupportedError); | 806 es.throwDOMException(NotSupportedError); |
807 return 0; | 807 return 0; |
808 } | 808 } |
| 809 if (data.find("]]>") != WTF::notFound) { |
| 810 es.throwDOMException(InvalidCharacterError, "String cannot contain ']]>'
since that is the end delimiter of a CData section."); |
| 811 return 0; |
| 812 } |
809 return CDATASection::create(this, data); | 813 return CDATASection::create(this, data); |
810 } | 814 } |
811 | 815 |
812 PassRefPtr<ProcessingInstruction> Document::createProcessingInstruction(const St
ring& target, const String& data, ExceptionState& es) | 816 PassRefPtr<ProcessingInstruction> Document::createProcessingInstruction(const St
ring& target, const String& data, ExceptionState& es) |
813 { | 817 { |
814 if (!isValidName(target)) { | 818 if (!isValidName(target)) { |
815 es.throwDOMException(InvalidCharacterError); | 819 es.throwDOMException(InvalidCharacterError); |
816 return 0; | 820 return 0; |
817 } | 821 } |
818 if (isHTMLDocument()) { | 822 if (isHTMLDocument()) { |
(...skipping 4423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5242 { | 5246 { |
5243 return DocumentLifecycleNotifier::create(this); | 5247 return DocumentLifecycleNotifier::create(this); |
5244 } | 5248 } |
5245 | 5249 |
5246 DocumentLifecycleNotifier* Document::lifecycleNotifier() | 5250 DocumentLifecycleNotifier* Document::lifecycleNotifier() |
5247 { | 5251 { |
5248 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); | 5252 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); |
5249 } | 5253 } |
5250 | 5254 |
5251 } // namespace WebCore | 5255 } // namespace WebCore |
OLD | NEW |