| 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 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #include "core/dom/Fullscreen.h" | 60 #include "core/dom/Fullscreen.h" |
| 61 #include "core/dom/LayoutTreeBuilder.h" | 61 #include "core/dom/LayoutTreeBuilder.h" |
| 62 #include "core/dom/MutationObserverInterestGroup.h" | 62 #include "core/dom/MutationObserverInterestGroup.h" |
| 63 #include "core/dom/MutationRecord.h" | 63 #include "core/dom/MutationRecord.h" |
| 64 #include "core/dom/NamedNodeMap.h" | 64 #include "core/dom/NamedNodeMap.h" |
| 65 #include "core/dom/NodeComputedStyle.h" | 65 #include "core/dom/NodeComputedStyle.h" |
| 66 #include "core/dom/PresentationAttributeStyle.h" | 66 #include "core/dom/PresentationAttributeStyle.h" |
| 67 #include "core/dom/PseudoElement.h" | 67 #include "core/dom/PseudoElement.h" |
| 68 #include "core/dom/ScriptableDocumentParser.h" | 68 #include "core/dom/ScriptableDocumentParser.h" |
| 69 #include "core/dom/SelectorQuery.h" | 69 #include "core/dom/SelectorQuery.h" |
| 70 #include "core/dom/ShadowRootInit.h" |
| 70 #include "core/dom/StyleChangeReason.h" | 71 #include "core/dom/StyleChangeReason.h" |
| 71 #include "core/dom/StyleEngine.h" | 72 #include "core/dom/StyleEngine.h" |
| 72 #include "core/dom/Text.h" | 73 #include "core/dom/Text.h" |
| 73 #include "core/dom/custom/CustomElement.h" | 74 #include "core/dom/custom/CustomElement.h" |
| 74 #include "core/dom/custom/CustomElementRegistrationContext.h" | 75 #include "core/dom/custom/CustomElementRegistrationContext.h" |
| 75 #include "core/dom/shadow/InsertionPoint.h" | 76 #include "core/dom/shadow/InsertionPoint.h" |
| 76 #include "core/dom/shadow/ShadowRoot.h" | 77 #include "core/dom/shadow/ShadowRoot.h" |
| 77 #include "core/editing/FrameSelection.h" | 78 #include "core/editing/FrameSelection.h" |
| 78 #include "core/editing/htmlediting.h" | 79 #include "core/editing/htmlediting.h" |
| 79 #include "core/editing/iterators/TextIterator.h" | 80 #include "core/editing/iterators/TextIterator.h" |
| (...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1796 ensureElementRareData().setCustomElementDefinition(definition); | 1797 ensureElementRareData().setCustomElementDefinition(definition); |
| 1797 } | 1798 } |
| 1798 | 1799 |
| 1799 CustomElementDefinition* Element::customElementDefinition() const | 1800 CustomElementDefinition* Element::customElementDefinition() const |
| 1800 { | 1801 { |
| 1801 if (hasRareData()) | 1802 if (hasRareData()) |
| 1802 return elementRareData()->customElementDefinition(); | 1803 return elementRareData()->customElementDefinition(); |
| 1803 return nullptr; | 1804 return nullptr; |
| 1804 } | 1805 } |
| 1805 | 1806 |
| 1806 PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ScriptState* script
State, ExceptionState& exceptionState) | 1807 PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ScriptState* script
State, ShadowRootInit& shadowRootInitDict, ExceptionState& exceptionState) |
| 1807 { | 1808 { |
| 1808 OriginsUsingFeatures::count(scriptState, document(), OriginsUsingFeatures::F
eature::ElementCreateShadowRoot); | 1809 OriginsUsingFeatures::count(scriptState, document(), OriginsUsingFeatures::F
eature::ElementCreateShadowRoot); |
| 1810 // TODO(kochi): Add support for closed shadow root. crbug.com/459136 |
| 1811 if (shadowRootInitDict.hasMode() && shadowRootInitDict.mode() == "closed") { |
| 1812 exceptionState.throwDOMException(NotSupportedError, "Closed shadow root
is not implemented yet."); |
| 1813 return nullptr; |
| 1814 } |
| 1815 |
| 1809 return createShadowRoot(exceptionState); | 1816 return createShadowRoot(exceptionState); |
| 1810 } | 1817 } |
| 1811 | 1818 |
| 1812 PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& exc
eptionState) | 1819 PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& exc
eptionState) |
| 1813 { | 1820 { |
| 1814 if (alwaysCreateUserAgentShadowRoot()) | 1821 if (alwaysCreateUserAgentShadowRoot()) |
| 1815 ensureUserAgentShadowRoot(); | 1822 ensureUserAgentShadowRoot(); |
| 1816 | 1823 |
| 1817 // Some elements make assumptions about what kind of layoutObjects they allo
w | 1824 // Some elements make assumptions about what kind of layoutObjects they allo
w |
| 1818 // as children so we can't allow author shadows on them for now. An override | 1825 // as children so we can't allow author shadows on them for now. An override |
| (...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3435 { | 3442 { |
| 3436 #if ENABLE(OILPAN) | 3443 #if ENABLE(OILPAN) |
| 3437 if (hasRareData()) | 3444 if (hasRareData()) |
| 3438 visitor->trace(elementRareData()); | 3445 visitor->trace(elementRareData()); |
| 3439 visitor->trace(m_elementData); | 3446 visitor->trace(m_elementData); |
| 3440 #endif | 3447 #endif |
| 3441 ContainerNode::trace(visitor); | 3448 ContainerNode::trace(visitor); |
| 3442 } | 3449 } |
| 3443 | 3450 |
| 3444 } // namespace blink | 3451 } // namespace blink |
| OLD | NEW |