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