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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 #include "core/editing/FrameSelection.h" | 77 #include "core/editing/FrameSelection.h" |
78 #include "core/editing/htmlediting.h" | 78 #include "core/editing/htmlediting.h" |
79 #include "core/editing/iterators/TextIterator.h" | 79 #include "core/editing/iterators/TextIterator.h" |
80 #include "core/editing/markup.h" | 80 #include "core/editing/markup.h" |
81 #include "core/events/EventDispatcher.h" | 81 #include "core/events/EventDispatcher.h" |
82 #include "core/events/FocusEvent.h" | 82 #include "core/events/FocusEvent.h" |
83 #include "core/frame/FrameHost.h" | 83 #include "core/frame/FrameHost.h" |
84 #include "core/frame/FrameView.h" | 84 #include "core/frame/FrameView.h" |
85 #include "core/frame/LocalDOMWindow.h" | 85 #include "core/frame/LocalDOMWindow.h" |
86 #include "core/frame/LocalFrame.h" | 86 #include "core/frame/LocalFrame.h" |
| 87 #include "core/frame/OriginsUsingFeatures.h" |
87 #include "core/frame/PinchViewport.h" | 88 #include "core/frame/PinchViewport.h" |
88 #include "core/frame/ScrollToOptions.h" | 89 #include "core/frame/ScrollToOptions.h" |
89 #include "core/frame/Settings.h" | 90 #include "core/frame/Settings.h" |
90 #include "core/frame/UseCounter.h" | 91 #include "core/frame/UseCounter.h" |
91 #include "core/frame/csp/ContentSecurityPolicy.h" | 92 #include "core/frame/csp/ContentSecurityPolicy.h" |
92 #include "core/html/ClassList.h" | 93 #include "core/html/ClassList.h" |
93 #include "core/html/HTMLCanvasElement.h" | 94 #include "core/html/HTMLCanvasElement.h" |
94 #include "core/html/HTMLCollection.h" | 95 #include "core/html/HTMLCollection.h" |
95 #include "core/html/HTMLDocument.h" | 96 #include "core/html/HTMLDocument.h" |
96 #include "core/html/HTMLElement.h" | 97 #include "core/html/HTMLElement.h" |
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1764 ensureElementRareData().setCustomElementDefinition(definition); | 1765 ensureElementRareData().setCustomElementDefinition(definition); |
1765 } | 1766 } |
1766 | 1767 |
1767 CustomElementDefinition* Element::customElementDefinition() const | 1768 CustomElementDefinition* Element::customElementDefinition() const |
1768 { | 1769 { |
1769 if (hasRareData()) | 1770 if (hasRareData()) |
1770 return elementRareData()->customElementDefinition(); | 1771 return elementRareData()->customElementDefinition(); |
1771 return nullptr; | 1772 return nullptr; |
1772 } | 1773 } |
1773 | 1774 |
| 1775 PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ScriptState* script
State, ExceptionState& exceptionState) |
| 1776 { |
| 1777 OriginsUsingFeatures::count(scriptState, document(), OriginsUsingFeatures::F
eature::ElementCreateShadowRoot); |
| 1778 return createShadowRoot(exceptionState); |
| 1779 } |
| 1780 |
1774 PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& exc
eptionState) | 1781 PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& exc
eptionState) |
1775 { | 1782 { |
1776 if (alwaysCreateClosedShadowRoot()) | 1783 if (alwaysCreateClosedShadowRoot()) |
1777 ensureClosedShadowRoot(); | 1784 ensureClosedShadowRoot(); |
1778 | 1785 |
1779 // Some elements make assumptions about what kind of renderers they allow | 1786 // Some elements make assumptions about what kind of renderers they allow |
1780 // as children so we can't allow author shadows on them for now. An override | 1787 // as children so we can't allow author shadows on them for now. An override |
1781 // flag is provided for testing how author shadows interact on these element
s. | 1788 // flag is provided for testing how author shadows interact on these element
s. |
1782 if (!areAuthorShadowsAllowed() && !RuntimeEnabledFeatures::authorShadowDOMFo
rAnyElementEnabled()) { | 1789 if (!areAuthorShadowsAllowed() && !RuntimeEnabledFeatures::authorShadowDOMFo
rAnyElementEnabled()) { |
1783 exceptionState.throwDOMException(HierarchyRequestError, "Author-created
shadow roots are disabled for this element."); | 1790 exceptionState.throwDOMException(HierarchyRequestError, "Author-created
shadow roots are disabled for this element."); |
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3374 { | 3381 { |
3375 #if ENABLE(OILPAN) | 3382 #if ENABLE(OILPAN) |
3376 if (hasRareData()) | 3383 if (hasRareData()) |
3377 visitor->trace(elementRareData()); | 3384 visitor->trace(elementRareData()); |
3378 visitor->trace(m_elementData); | 3385 visitor->trace(m_elementData); |
3379 #endif | 3386 #endif |
3380 ContainerNode::trace(visitor); | 3387 ContainerNode::trace(visitor); |
3381 } | 3388 } |
3382 | 3389 |
3383 } // namespace blink | 3390 } // namespace blink |
OLD | NEW |