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

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

Issue 1220703002: const'ify parameters for Element.createShadowRoot (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Element.h ('k') | no next file » | 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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 ensureElementRareData().setCustomElementDefinition(definition); 1812 ensureElementRareData().setCustomElementDefinition(definition);
1813 } 1813 }
1814 1814
1815 CustomElementDefinition* Element::customElementDefinition() const 1815 CustomElementDefinition* Element::customElementDefinition() const
1816 { 1816 {
1817 if (hasRareData()) 1817 if (hasRareData())
1818 return elementRareData()->customElementDefinition(); 1818 return elementRareData()->customElementDefinition();
1819 return nullptr; 1819 return nullptr;
1820 } 1820 }
1821 1821
1822 PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ScriptState* script State, ExceptionState& exceptionState) 1822 PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(const ScriptState* scriptState, ExceptionState& exceptionState)
1823 { 1823 {
1824 OriginsUsingFeatures::count(scriptState, document(), OriginsUsingFeatures::F eature::ElementCreateShadowRoot); 1824 OriginsUsingFeatures::count(scriptState, document(), OriginsUsingFeatures::F eature::ElementCreateShadowRoot);
1825 return createShadowRoot(exceptionState); 1825 return createShadowRoot(exceptionState);
1826 } 1826 }
1827 1827
1828 PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ScriptState* script State, ShadowRootInit& shadowRootInitDict, ExceptionState& exceptionState) 1828 PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(const ScriptState* scriptState, const ShadowRootInit& shadowRootInitDict, ExceptionState& exception State)
1829 { 1829 {
1830 ASSERT(RuntimeEnabledFeatures::createShadowRootWithParameterEnabled()); 1830 ASSERT(RuntimeEnabledFeatures::createShadowRootWithParameterEnabled());
1831 UseCounter::count(document(), UseCounter::ElementCreateShadowRootWithParamet er); 1831 UseCounter::count(document(), UseCounter::ElementCreateShadowRootWithParamet er);
1832 1832
1833 OriginsUsingFeatures::count(scriptState, document(), OriginsUsingFeatures::F eature::ElementCreateShadowRoot); 1833 OriginsUsingFeatures::count(scriptState, document(), OriginsUsingFeatures::F eature::ElementCreateShadowRoot);
1834 // TODO(kochi): Add support for closed shadow root. crbug.com/459136 1834 // TODO(kochi): Add support for closed shadow root. crbug.com/459136
1835 if (shadowRootInitDict.hasMode() && shadowRootInitDict.mode() == "closed") { 1835 if (shadowRootInitDict.hasMode() && shadowRootInitDict.mode() == "closed") {
1836 exceptionState.throwDOMException(NotSupportedError, "Closed shadow root is not implemented yet."); 1836 exceptionState.throwDOMException(NotSupportedError, "Closed shadow root is not implemented yet.");
1837 return nullptr; 1837 return nullptr;
1838 } 1838 }
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
3432 { 3432 {
3433 #if ENABLE(OILPAN) 3433 #if ENABLE(OILPAN)
3434 if (hasRareData()) 3434 if (hasRareData())
3435 visitor->trace(elementRareData()); 3435 visitor->trace(elementRareData());
3436 visitor->trace(m_elementData); 3436 visitor->trace(m_elementData);
3437 #endif 3437 #endif
3438 ContainerNode::trace(visitor); 3438 ContainerNode::trace(visitor);
3439 } 3439 }
3440 3440
3441 } // namespace blink 3441 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/Element.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698