Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: Source/core/dom/Document.cpp

Issue 14083009: Remove ENABLE_CUSTOM_ELEMENTS compile time flag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removing flag from features.gypi Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 m_activeElement = 0; 629 m_activeElement = 0;
630 m_titleElement = 0; 630 m_titleElement = 0;
631 m_documentElement = 0; 631 m_documentElement = 0;
632 m_contextFeatures = ContextFeatures::defaultSwitch(); 632 m_contextFeatures = ContextFeatures::defaultSwitch();
633 m_userActionElements.documentDidRemoveLastRef(); 633 m_userActionElements.documentDidRemoveLastRef();
634 m_fullScreenElement = 0; 634 m_fullScreenElement = 0;
635 m_fullScreenElementStack.clear(); 635 m_fullScreenElementStack.clear();
636 636
637 detachParser(); 637 detachParser();
638 638
639 #if ENABLE(CUSTOM_ELEMENTS)
640 m_registry.clear(); 639 m_registry.clear();
641 #endif
642 640
643 // removeDetachedChildren() doesn't always unregister IDs, 641 // removeDetachedChildren() doesn't always unregister IDs,
644 // so tear down scope information upfront to avoid having stale references i n the map. 642 // so tear down scope information upfront to avoid having stale references i n the map.
645 destroyTreeScopeData(); 643 destroyTreeScopeData();
646 removeDetachedChildren(); 644 removeDetachedChildren();
647 645
648 m_markers->detach(); 646 m_markers->detach();
649 647
650 m_cssCanvasElements.clear(); 648 m_cssCanvasElements.clear();
651 649
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 ec = INVALID_CHARACTER_ERR; 781 ec = INVALID_CHARACTER_ERR;
784 return 0; 782 return 0;
785 } 783 }
786 784
787 if (m_isXHTML) 785 if (m_isXHTML)
788 return HTMLElementFactory::createHTMLElement(QualifiedName(nullAtom, nam e, xhtmlNamespaceURI), this, 0, false); 786 return HTMLElementFactory::createHTMLElement(QualifiedName(nullAtom, nam e, xhtmlNamespaceURI), this, 0, false);
789 787
790 return createElement(QualifiedName(nullAtom, name, nullAtom), false); 788 return createElement(QualifiedName(nullAtom, name, nullAtom), false);
791 } 789 }
792 790
793 #if ENABLE(CUSTOM_ELEMENTS)
794 PassRefPtr<Element> Document::createElement(const AtomicString& localName, const AtomicString& typeExtension, ExceptionCode& ec) 791 PassRefPtr<Element> Document::createElement(const AtomicString& localName, const AtomicString& typeExtension, ExceptionCode& ec)
795 { 792 {
796 if (!isValidName(localName)) { 793 if (!isValidName(localName)) {
797 ec = INVALID_CHARACTER_ERR; 794 ec = INVALID_CHARACTER_ERR;
798 return 0; 795 return 0;
799 } 796 }
800 797
801 if (m_registry) { 798 if (m_registry) {
802 if (PassRefPtr<Element> created = m_registry->createElement(QualifiedNam e(nullAtom, localName, xhtmlNamespaceURI), typeExtension)) 799 if (PassRefPtr<Element> created = m_registry->createElement(QualifiedNam e(nullAtom, localName, xhtmlNamespaceURI), typeExtension))
803 return created; 800 return created;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 m_registry = adoptRef(new CustomElementRegistry(this)); 839 m_registry = adoptRef(new CustomElementRegistry(this));
843 return m_registry->registerElement(state, name, options, ec); 840 return m_registry->registerElement(state, name, options, ec);
844 } 841 }
845 842
846 void Document::didCreateCustomElement(Element* element, CustomElementConstructor * constructor) 843 void Document::didCreateCustomElement(Element* element, CustomElementConstructor * constructor)
847 { 844 {
848 // m_registry is cleared Document::dispose() and can be null here. 845 // m_registry is cleared Document::dispose() and can be null here.
849 if (m_registry) 846 if (m_registry)
850 m_registry->didCreateElement(element); 847 m_registry->didCreateElement(element);
851 } 848 }
852 #endif // ENABLE(CUSTOM_ELEMENTS)
853 849
854 PassRefPtr<DocumentFragment> Document::createDocumentFragment() 850 PassRefPtr<DocumentFragment> Document::createDocumentFragment()
855 { 851 {
856 return DocumentFragment::create(document()); 852 return DocumentFragment::create(document());
857 } 853 }
858 854
859 PassRefPtr<Text> Document::createTextNode(const String& data) 855 PassRefPtr<Text> Document::createTextNode(const String& data)
860 { 856 {
861 return Text::create(this, data); 857 return Text::create(this, data);
862 } 858 }
(...skipping 5058 matching lines...) Expand 10 before | Expand all | Expand 10 after
5921 return; 5917 return;
5922 5918
5923 Vector<RefPtr<Element> > associatedFormControls; 5919 Vector<RefPtr<Element> > associatedFormControls;
5924 copyToVector(m_associatedFormControls, associatedFormControls); 5920 copyToVector(m_associatedFormControls, associatedFormControls);
5925 5921
5926 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm Controls); 5922 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm Controls);
5927 m_associatedFormControls.clear(); 5923 m_associatedFormControls.clear();
5928 } 5924 }
5929 5925
5930 } // namespace WebCore 5926 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698