| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 #include "core/css/MediaQueryMatcher.h" | 59 #include "core/css/MediaQueryMatcher.h" |
| 60 #include "core/css/StylePropertySet.h" | 60 #include "core/css/StylePropertySet.h" |
| 61 #include "core/css/StyleSheetContents.h" | 61 #include "core/css/StyleSheetContents.h" |
| 62 #include "core/css/StyleSheetList.h" | 62 #include "core/css/StyleSheetList.h" |
| 63 #include "core/css/resolver/StyleResolver.h" | 63 #include "core/css/resolver/StyleResolver.h" |
| 64 #include "core/dom/Attr.h" | 64 #include "core/dom/Attr.h" |
| 65 #include "core/dom/Attribute.h" | 65 #include "core/dom/Attribute.h" |
| 66 #include "core/dom/CDATASection.h" | 66 #include "core/dom/CDATASection.h" |
| 67 #include "core/dom/Comment.h" | 67 #include "core/dom/Comment.h" |
| 68 #include "core/dom/ContextFeatures.h" | 68 #include "core/dom/ContextFeatures.h" |
| 69 #include "core/dom/CustomElementConstructor.h" | |
| 70 #include "core/dom/CustomElementRegistry.h" | 69 #include "core/dom/CustomElementRegistry.h" |
| 71 #include "core/dom/DOMImplementation.h" | 70 #include "core/dom/DOMImplementation.h" |
| 72 #include "core/dom/DOMNamedFlowCollection.h" | 71 #include "core/dom/DOMNamedFlowCollection.h" |
| 73 #include "core/dom/DocumentEventQueue.h" | 72 #include "core/dom/DocumentEventQueue.h" |
| 74 #include "core/dom/DocumentFragment.h" | 73 #include "core/dom/DocumentFragment.h" |
| 75 #include "core/dom/DocumentMarkerController.h" | 74 #include "core/dom/DocumentMarkerController.h" |
| 76 #include "core/dom/DocumentSharedObjectPool.h" | 75 #include "core/dom/DocumentSharedObjectPool.h" |
| 77 #include "core/dom/DocumentStyleSheetCollection.h" | 76 #include "core/dom/DocumentStyleSheetCollection.h" |
| 78 #include "core/dom/DocumentType.h" | 77 #include "core/dom/DocumentType.h" |
| 79 #include "core/dom/Element.h" | 78 #include "core/dom/Element.h" |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 element = createElementNS(namespaceURI, qualifiedName, ec); | 820 element = createElementNS(namespaceURI, qualifiedName, ec); |
| 822 | 821 |
| 823 if (!typeExtension.isNull()) { | 822 if (!typeExtension.isNull()) { |
| 824 setTypeExtension(element.get(), typeExtension); | 823 setTypeExtension(element.get(), typeExtension); |
| 825 ensureCustomElementRegistry()->didGiveTypeExtension(element.get(), typeE
xtension); | 824 ensureCustomElementRegistry()->didGiveTypeExtension(element.get(), typeE
xtension); |
| 826 } | 825 } |
| 827 | 826 |
| 828 return element; | 827 return element; |
| 829 } | 828 } |
| 830 | 829 |
| 831 PassRefPtr<CustomElementConstructor> Document::registerElement(WebCore::ScriptSt
ate* state, const AtomicString& name, ExceptionCode& ec) | 830 ScriptValue Document::registerElement(WebCore::ScriptState* state, const AtomicS
tring& name, ExceptionCode& ec) |
| 832 { | 831 { |
| 833 return registerElement(state, name, Dictionary(), ec); | 832 return registerElement(state, name, Dictionary(), ec); |
| 834 } | 833 } |
| 835 | 834 |
| 836 PassRefPtr<CustomElementConstructor> Document::registerElement(WebCore::ScriptSt
ate* state, const AtomicString& name, const Dictionary& options, ExceptionCode&
ec) | 835 ScriptValue Document::registerElement(WebCore::ScriptState* state, const AtomicS
tring& name, const Dictionary& options, ExceptionCode& ec) |
| 837 { | 836 { |
| 838 if (!isHTMLDocument() && !isXHTMLDocument()) { | 837 if (!isHTMLDocument() && !isXHTMLDocument()) { |
| 839 ec = NOT_SUPPORTED_ERR; | 838 ec = NOT_SUPPORTED_ERR; |
| 840 return 0; | 839 return ScriptValue(); |
| 841 } | 840 } |
| 842 | 841 |
| 843 return ensureCustomElementRegistry()->registerElement(state, name, options,
ec); | 842 return ensureCustomElementRegistry()->registerElement(state, name, options,
ec); |
| 844 } | 843 } |
| 845 | 844 |
| 846 CustomElementRegistry* Document::ensureCustomElementRegistry() | 845 CustomElementRegistry* Document::ensureCustomElementRegistry() |
| 847 { | 846 { |
| 848 if (!m_registry) { | 847 if (!m_registry) { |
| 849 ASSERT(isHTMLDocument() || isXHTMLDocument()); | 848 ASSERT(isHTMLDocument() || isXHTMLDocument()); |
| 850 m_registry = adoptRef(new CustomElementRegistry(this)); | 849 m_registry = adoptRef(new CustomElementRegistry(this)); |
| (...skipping 4742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5593 return; | 5592 return; |
| 5594 | 5593 |
| 5595 Vector<RefPtr<Element> > associatedFormControls; | 5594 Vector<RefPtr<Element> > associatedFormControls; |
| 5596 copyToVector(m_associatedFormControls, associatedFormControls); | 5595 copyToVector(m_associatedFormControls, associatedFormControls); |
| 5597 | 5596 |
| 5598 frame()->page()->chrome().client()->didAssociateFormControls(associatedFormC
ontrols); | 5597 frame()->page()->chrome().client()->didAssociateFormControls(associatedFormC
ontrols); |
| 5599 m_associatedFormControls.clear(); | 5598 m_associatedFormControls.clear(); |
| 5600 } | 5599 } |
| 5601 | 5600 |
| 5602 } // namespace WebCore | 5601 } // namespace WebCore |
| OLD | NEW |