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

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: Rebasing. 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
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 m_activeElement = 0; 618 m_activeElement = 0;
619 m_titleElement = 0; 619 m_titleElement = 0;
620 m_documentElement = 0; 620 m_documentElement = 0;
621 m_contextFeatures = ContextFeatures::defaultSwitch(); 621 m_contextFeatures = ContextFeatures::defaultSwitch();
622 m_userActionElements.documentDidRemoveLastRef(); 622 m_userActionElements.documentDidRemoveLastRef();
623 m_fullScreenElement = 0; 623 m_fullScreenElement = 0;
624 m_fullScreenElementStack.clear(); 624 m_fullScreenElementStack.clear();
625 625
626 detachParser(); 626 detachParser();
627 627
628 #if ENABLE(CUSTOM_ELEMENTS)
629 m_registry.clear(); 628 m_registry.clear();
630 #endif
631 629
632 // removeDetachedChildren() doesn't always unregister IDs, 630 // removeDetachedChildren() doesn't always unregister IDs,
633 // so tear down scope information upfront to avoid having stale references i n the map. 631 // so tear down scope information upfront to avoid having stale references i n the map.
634 destroyTreeScopeData(); 632 destroyTreeScopeData();
635 removeDetachedChildren(); 633 removeDetachedChildren();
636 634
637 m_markers->detach(); 635 m_markers->detach();
638 636
639 m_cssCanvasElements.clear(); 637 m_cssCanvasElements.clear();
640 638
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 ec = INVALID_CHARACTER_ERR; 770 ec = INVALID_CHARACTER_ERR;
773 return 0; 771 return 0;
774 } 772 }
775 773
776 if (m_isXHTML) 774 if (m_isXHTML)
777 return HTMLElementFactory::createHTMLElement(QualifiedName(nullAtom, nam e, xhtmlNamespaceURI), this, 0, false); 775 return HTMLElementFactory::createHTMLElement(QualifiedName(nullAtom, nam e, xhtmlNamespaceURI), this, 0, false);
778 776
779 return createElement(QualifiedName(nullAtom, name, nullAtom), false); 777 return createElement(QualifiedName(nullAtom, name, nullAtom), false);
780 } 778 }
781 779
782 #if ENABLE(CUSTOM_ELEMENTS)
783 PassRefPtr<Element> Document::createElement(const AtomicString& localName, const AtomicString& typeExtension, ExceptionCode& ec) 780 PassRefPtr<Element> Document::createElement(const AtomicString& localName, const AtomicString& typeExtension, ExceptionCode& ec)
784 { 781 {
785 if (!isValidName(localName)) { 782 if (!isValidName(localName)) {
786 ec = INVALID_CHARACTER_ERR; 783 ec = INVALID_CHARACTER_ERR;
787 return 0; 784 return 0;
788 } 785 }
789 786
790 if (m_registry) { 787 if (m_registry) {
791 if (PassRefPtr<Element> created = m_registry->createElement(QualifiedNam e(nullAtom, localName, xhtmlNamespaceURI), typeExtension)) 788 if (PassRefPtr<Element> created = m_registry->createElement(QualifiedNam e(nullAtom, localName, xhtmlNamespaceURI), typeExtension))
792 return created; 789 return created;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 m_registry = adoptRef(new CustomElementRegistry(this)); 828 m_registry = adoptRef(new CustomElementRegistry(this));
832 return m_registry->registerElement(state, name, options, ec); 829 return m_registry->registerElement(state, name, options, ec);
833 } 830 }
834 831
835 void Document::didCreateCustomElement(Element* element, CustomElementConstructor * constructor) 832 void Document::didCreateCustomElement(Element* element, CustomElementConstructor * constructor)
836 { 833 {
837 // m_registry is cleared Document::dispose() and can be null here. 834 // m_registry is cleared Document::dispose() and can be null here.
838 if (m_registry) 835 if (m_registry)
839 m_registry->didCreateElement(element); 836 m_registry->didCreateElement(element);
840 } 837 }
841 #endif // ENABLE(CUSTOM_ELEMENTS)
842 838
843 PassRefPtr<DocumentFragment> Document::createDocumentFragment() 839 PassRefPtr<DocumentFragment> Document::createDocumentFragment()
844 { 840 {
845 return DocumentFragment::create(document()); 841 return DocumentFragment::create(document());
846 } 842 }
847 843
848 PassRefPtr<Text> Document::createTextNode(const String& data) 844 PassRefPtr<Text> Document::createTextNode(const String& data)
849 { 845 {
850 return Text::create(this, data); 846 return Text::create(this, data);
851 } 847 }
(...skipping 4940 matching lines...) Expand 10 before | Expand all | Expand 10 after
5792 return; 5788 return;
5793 5789
5794 Vector<RefPtr<Element> > associatedFormControls; 5790 Vector<RefPtr<Element> > associatedFormControls;
5795 copyToVector(m_associatedFormControls, associatedFormControls); 5791 copyToVector(m_associatedFormControls, associatedFormControls);
5796 5792
5797 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm Controls); 5793 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm Controls);
5798 m_associatedFormControls.clear(); 5794 m_associatedFormControls.clear();
5799 } 5795 }
5800 5796
5801 } // namespace WebCore 5797 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698