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

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

Issue 1952893003: Implement custom element construction and some 'define' checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase; remove default parameters. Created 4 years, 7 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 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 ScriptValue Document::registerElement(ScriptState* scriptState, const AtomicStri ng& name, const ElementRegistrationOptions& options, ExceptionState& exceptionSt ate, V0CustomElement::NameSet validNames) 736 ScriptValue Document::registerElement(ScriptState* scriptState, const AtomicStri ng& name, const ElementRegistrationOptions& options, ExceptionState& exceptionSt ate, V0CustomElement::NameSet validNames)
737 { 737 {
738 OriginsUsingFeatures::countMainWorldOnly(scriptState, *this, OriginsUsingFea tures::Feature::DocumentRegisterElement); 738 OriginsUsingFeatures::countMainWorldOnly(scriptState, *this, OriginsUsingFea tures::Feature::DocumentRegisterElement);
739 739
740 if (!registrationContext()) { 740 if (!registrationContext()) {
741 exceptionState.throwDOMException(NotSupportedError, "No element registra tion context is available."); 741 exceptionState.throwDOMException(NotSupportedError, "No element registra tion context is available.");
742 return ScriptValue(); 742 return ScriptValue();
743 } 743 }
744 744
745 V0CustomElementConstructorBuilder constructorBuilder(scriptState, options); 745 V0CustomElementConstructorBuilder constructorBuilder(scriptState, options);
746 registrationContext()->registerElement(this, &constructorBuilder, name, vali dNames, exceptionState); 746 registrationContext()->registerElement(scriptState, this, &constructorBuilde r, name, validNames, exceptionState);
747 return constructorBuilder.bindingsReturnValue(); 747 return constructorBuilder.bindingsReturnValue();
748 } 748 }
749 749
750 V0CustomElementMicrotaskRunQueue* Document::customElementMicrotaskRunQueue() 750 V0CustomElementMicrotaskRunQueue* Document::customElementMicrotaskRunQueue()
751 { 751 {
752 if (!m_customElementMicrotaskRunQueue) 752 if (!m_customElementMicrotaskRunQueue)
753 m_customElementMicrotaskRunQueue = V0CustomElementMicrotaskRunQueue::cre ate(); 753 m_customElementMicrotaskRunQueue = V0CustomElementMicrotaskRunQueue::cre ate();
754 return m_customElementMicrotaskRunQueue.get(); 754 return m_customElementMicrotaskRunQueue.get();
755 } 755 }
756 756
(...skipping 5240 matching lines...) Expand 10 before | Expand all | Expand 10 after
5997 #ifndef NDEBUG 5997 #ifndef NDEBUG
5998 using namespace blink; 5998 using namespace blink;
5999 void showLiveDocumentInstances() 5999 void showLiveDocumentInstances()
6000 { 6000 {
6001 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 6001 Document::WeakDocumentSet& set = Document::liveDocumentSet();
6002 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6002 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6003 for (Document* document : set) 6003 for (Document* document : set)
6004 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6004 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6005 } 6005 }
6006 #endif 6006 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698