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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 if (!typeExtension.isEmpty()) | 775 if (!typeExtension.isEmpty()) |
776 CustomElementRegistrationContext::setIsAttributeAndTypeExtension(element
.get(), typeExtension); | 776 CustomElementRegistrationContext::setIsAttributeAndTypeExtension(element
.get(), typeExtension); |
777 | 777 |
778 return element.release(); | 778 return element.release(); |
779 } | 779 } |
780 | 780 |
781 static inline QualifiedName createQualifiedName(const AtomicString& namespaceURI
, const AtomicString& qualifiedName, ExceptionState& exceptionState) | 781 static inline QualifiedName createQualifiedName(const AtomicString& namespaceURI
, const AtomicString& qualifiedName, ExceptionState& exceptionState) |
782 { | 782 { |
783 AtomicString prefix, localName; | 783 AtomicString prefix, localName; |
784 if (!Document::parseQualifiedName(qualifiedName, prefix, localName, exceptio
nState)) | 784 if (!Document::parseQualifiedName(qualifiedName, prefix, localName, exceptio
nState)) |
785 return nullQName(); | 785 return QualifiedName::null(); |
786 | 786 |
787 QualifiedName qName(prefix, localName, namespaceURI); | 787 QualifiedName qName(prefix, localName, namespaceURI); |
788 if (!Document::hasValidNamespaceForElements(qName)) { | 788 if (!Document::hasValidNamespaceForElements(qName)) { |
789 exceptionState.throwDOMException(NamespaceError, "The namespace URI prov
ided ('" + namespaceURI + "') is not valid for the qualified name provided ('" +
qualifiedName + "')."); | 789 exceptionState.throwDOMException(NamespaceError, "The namespace URI prov
ided ('" + namespaceURI + "') is not valid for the qualified name provided ('" +
qualifiedName + "')."); |
790 return nullQName(); | 790 return QualifiedName::null(); |
791 } | 791 } |
792 | 792 |
793 return qName; | 793 return qName; |
794 } | 794 } |
795 | 795 |
796 PassRefPtrWillBeRawPtr<Element> Document::createElementNS(const AtomicString& na
mespaceURI, const AtomicString& qualifiedName, ExceptionState& exceptionState) | 796 PassRefPtrWillBeRawPtr<Element> Document::createElementNS(const AtomicString& na
mespaceURI, const AtomicString& qualifiedName, ExceptionState& exceptionState) |
797 { | 797 { |
798 QualifiedName qName(createQualifiedName(namespaceURI, qualifiedName, excepti
onState)); | 798 QualifiedName qName(createQualifiedName(namespaceURI, qualifiedName, excepti
onState)); |
799 if (qName == nullQName()) | 799 if (qName == QualifiedName::null()) |
800 return nullptr; | 800 return nullptr; |
801 | 801 |
802 return createElement(qName, false); | 802 return createElement(qName, false); |
803 } | 803 } |
804 | 804 |
805 PassRefPtrWillBeRawPtr<Element> Document::createElementNS(const AtomicString& na
mespaceURI, const AtomicString& qualifiedName, const AtomicString& typeExtension
, ExceptionState& exceptionState) | 805 PassRefPtrWillBeRawPtr<Element> Document::createElementNS(const AtomicString& na
mespaceURI, const AtomicString& qualifiedName, const AtomicString& typeExtension
, ExceptionState& exceptionState) |
806 { | 806 { |
807 QualifiedName qName(createQualifiedName(namespaceURI, qualifiedName, excepti
onState)); | 807 QualifiedName qName(createQualifiedName(namespaceURI, qualifiedName, excepti
onState)); |
808 if (qName == nullQName()) | 808 if (qName == QualifiedName::null()) |
809 return nullptr; | 809 return nullptr; |
810 | 810 |
811 RefPtrWillBeRawPtr<Element> element; | 811 RefPtrWillBeRawPtr<Element> element; |
812 if (CustomElement::isValidName(qName.localName()) && registrationContext()) | 812 if (CustomElement::isValidName(qName.localName()) && registrationContext()) |
813 element = registrationContext()->createCustomTagElement(*this, qName); | 813 element = registrationContext()->createCustomTagElement(*this, qName); |
814 else | 814 else |
815 element = createElement(qName, false); | 815 element = createElement(qName, false); |
816 | 816 |
817 if (!typeExtension.isEmpty()) | 817 if (!typeExtension.isEmpty()) |
818 CustomElementRegistrationContext::setIsAttributeAndTypeExtension(element
.get(), typeExtension); | 818 CustomElementRegistrationContext::setIsAttributeAndTypeExtension(element
.get(), typeExtension); |
(...skipping 5036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5855 visitor->trace(m_compositorPendingAnimations); | 5855 visitor->trace(m_compositorPendingAnimations); |
5856 visitor->trace(m_contextDocument); | 5856 visitor->trace(m_contextDocument); |
5857 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5857 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
5858 DocumentSupplementable::trace(visitor); | 5858 DocumentSupplementable::trace(visitor); |
5859 TreeScope::trace(visitor); | 5859 TreeScope::trace(visitor); |
5860 ContainerNode::trace(visitor); | 5860 ContainerNode::trace(visitor); |
5861 ExecutionContext::trace(visitor); | 5861 ExecutionContext::trace(visitor); |
5862 } | 5862 } |
5863 | 5863 |
5864 } // namespace WebCore | 5864 } // namespace WebCore |
OLD | NEW |