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 13 matching lines...) Expand all Loading... |
24 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 24 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
25 * Boston, MA 02110-1301, USA. | 25 * Boston, MA 02110-1301, USA. |
26 */ | 26 */ |
27 | 27 |
28 #include "config.h" | 28 #include "config.h" |
29 #include "core/dom/Document.h" | 29 #include "core/dom/Document.h" |
30 | 30 |
31 #include "CSSValueKeywords.h" | 31 #include "CSSValueKeywords.h" |
32 #include "HTMLElementFactory.h" | 32 #include "HTMLElementFactory.h" |
33 #include "HTMLNames.h" | 33 #include "HTMLNames.h" |
| 34 #include "RuntimeEnabledFeatures.h" |
34 #include "XMLNSNames.h" | 35 #include "XMLNSNames.h" |
35 #include "XMLNames.h" | 36 #include "XMLNames.h" |
36 #include "bindings/v8/Dictionary.h" | 37 #include "bindings/v8/Dictionary.h" |
37 #include "bindings/v8/ScriptController.h" | 38 #include "bindings/v8/ScriptController.h" |
38 #include "bindings/v8/ScriptEventListener.h" | 39 #include "bindings/v8/ScriptEventListener.h" |
39 #include "core/accessibility/AXObjectCache.h" | 40 #include "core/accessibility/AXObjectCache.h" |
40 #include "core/css/CSSParser.h" | 41 #include "core/css/CSSParser.h" |
41 #include "core/css/CSSStyleDeclaration.h" | 42 #include "core/css/CSSStyleDeclaration.h" |
42 #include "core/css/CSSStyleSheet.h" | 43 #include "core/css/CSSStyleSheet.h" |
43 #include "core/css/FontLoader.h" | 44 #include "core/css/FontLoader.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 #include "core/page/FocusController.h" | 142 #include "core/page/FocusController.h" |
142 #include "core/page/Frame.h" | 143 #include "core/page/Frame.h" |
143 #include "core/page/FrameTree.h" | 144 #include "core/page/FrameTree.h" |
144 #include "core/page/FrameView.h" | 145 #include "core/page/FrameView.h" |
145 #include "core/page/History.h" | 146 #include "core/page/History.h" |
146 #include "core/page/MouseEventWithHitTestResults.h" | 147 #include "core/page/MouseEventWithHitTestResults.h" |
147 #include "core/page/Page.h" | 148 #include "core/page/Page.h" |
148 #include "core/page/PageConsole.h" | 149 #include "core/page/PageConsole.h" |
149 #include "core/page/PageGroup.h" | 150 #include "core/page/PageGroup.h" |
150 #include "core/page/PointerLockController.h" | 151 #include "core/page/PointerLockController.h" |
151 #include "RuntimeEnabledFeatures.h" | |
152 #include "core/page/SecurityOrigin.h" | 152 #include "core/page/SecurityOrigin.h" |
153 #include "core/page/SecurityPolicy.h" | 153 #include "core/page/SecurityPolicy.h" |
154 #include "core/page/Settings.h" | 154 #include "core/page/Settings.h" |
155 #include "core/page/UserContentURLPattern.h" | 155 #include "core/page/UserContentURLPattern.h" |
156 #include "core/page/animation/AnimationController.h" | 156 #include "core/page/animation/AnimationController.h" |
157 #include "core/page/scrolling/ScrollingCoordinator.h" | 157 #include "core/page/scrolling/ScrollingCoordinator.h" |
158 #include "core/platform/DateComponents.h" | 158 #include "core/platform/DateComponents.h" |
159 #include "core/platform/HistogramSupport.h" | 159 #include "core/platform/HistogramSupport.h" |
160 #include "core/platform/Language.h" | 160 #include "core/platform/Language.h" |
161 #include "core/platform/Logging.h" | 161 #include "core/platform/Logging.h" |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 | 775 |
776 RefPtr<Element> element; | 776 RefPtr<Element> element; |
777 | 777 |
778 if (CustomElementRegistry::isCustomTagName(localName)) | 778 if (CustomElementRegistry::isCustomTagName(localName)) |
779 element = ensureCustomElementRegistry()->createCustomTagElement(Qualifie
dName(nullAtom, localName, xhtmlNamespaceURI)); | 779 element = ensureCustomElementRegistry()->createCustomTagElement(Qualifie
dName(nullAtom, localName, xhtmlNamespaceURI)); |
780 else | 780 else |
781 element = createElement(localName, ec); | 781 element = createElement(localName, ec); |
782 | 782 |
783 if (!typeExtension.isNull()) { | 783 if (!typeExtension.isNull()) { |
784 setTypeExtension(element.get(), typeExtension); | 784 setTypeExtension(element.get(), typeExtension); |
785 ensureCustomElementRegistry()->didGiveTypeExtension(element.get()); | 785 ensureCustomElementRegistry()->didGiveTypeExtension(element.get(), typeE
xtension); |
786 } | 786 } |
787 | 787 |
788 return element; | 788 return element; |
789 } | 789 } |
790 | 790 |
791 PassRefPtr<Element> Document::createElementNS(const AtomicString& namespaceURI,
const String& qualifiedName, const AtomicString& typeExtension, ExceptionCode& e
c) | 791 PassRefPtr<Element> Document::createElementNS(const AtomicString& namespaceURI,
const String& qualifiedName, const AtomicString& typeExtension, ExceptionCode& e
c) |
792 { | 792 { |
793 String prefix, localName; | 793 String prefix, localName; |
794 if (!parseQualifiedName(qualifiedName, prefix, localName, ec)) | 794 if (!parseQualifiedName(qualifiedName, prefix, localName, ec)) |
795 return 0; | 795 return 0; |
796 | 796 |
797 QualifiedName qName(prefix, localName, namespaceURI); | 797 QualifiedName qName(prefix, localName, namespaceURI); |
798 if (!hasValidNamespaceForElements(qName)) { | 798 if (!hasValidNamespaceForElements(qName)) { |
799 ec = NAMESPACE_ERR; | 799 ec = NAMESPACE_ERR; |
800 return 0; | 800 return 0; |
801 } | 801 } |
802 | 802 |
803 RefPtr<Element> element; | 803 RefPtr<Element> element; |
804 if (CustomElementRegistry::isCustomTagName(qName.localName())) | 804 if (CustomElementRegistry::isCustomTagName(qName.localName())) |
805 element = ensureCustomElementRegistry()->createCustomTagElement(qName); | 805 element = ensureCustomElementRegistry()->createCustomTagElement(qName); |
806 else | 806 else |
807 element = createElementNS(namespaceURI, qualifiedName, ec); | 807 element = createElementNS(namespaceURI, qualifiedName, ec); |
808 | 808 |
809 if (!typeExtension.isNull()) { | 809 if (!typeExtension.isNull()) { |
810 setTypeExtension(element.get(), typeExtension); | 810 setTypeExtension(element.get(), typeExtension); |
811 ensureCustomElementRegistry()->didGiveTypeExtension(element.get()); | 811 ensureCustomElementRegistry()->didGiveTypeExtension(element.get(), typeE
xtension); |
812 } | 812 } |
813 | 813 |
814 return element; | 814 return element; |
815 } | 815 } |
816 | 816 |
817 PassRefPtr<CustomElementConstructor> Document::registerElement(WebCore::ScriptSt
ate* state, const AtomicString& name, ExceptionCode& ec) | 817 PassRefPtr<CustomElementConstructor> Document::registerElement(WebCore::ScriptSt
ate* state, const AtomicString& name, ExceptionCode& ec) |
818 { | 818 { |
819 return registerElement(state, name, Dictionary(), ec); | 819 return registerElement(state, name, Dictionary(), ec); |
820 } | 820 } |
821 | 821 |
(...skipping 4832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5654 return; | 5654 return; |
5655 | 5655 |
5656 Vector<RefPtr<Element> > associatedFormControls; | 5656 Vector<RefPtr<Element> > associatedFormControls; |
5657 copyToVector(m_associatedFormControls, associatedFormControls); | 5657 copyToVector(m_associatedFormControls, associatedFormControls); |
5658 | 5658 |
5659 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm
Controls); | 5659 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm
Controls); |
5660 m_associatedFormControls.clear(); | 5660 m_associatedFormControls.clear(); |
5661 } | 5661 } |
5662 | 5662 |
5663 } // namespace WebCore | 5663 } // namespace WebCore |
OLD | NEW |