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 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 // as children so we can't allow author shadows on them for now. An override | 1664 // as children so we can't allow author shadows on them for now. An override |
1665 // flag is provided for testing how author shadows interact on these element
s. | 1665 // flag is provided for testing how author shadows interact on these element
s. |
1666 if (!areAuthorShadowsAllowed() && !RuntimeEnabledFeatures::authorShadowDOMFo
rAnyElementEnabled()) { | 1666 if (!areAuthorShadowsAllowed() && !RuntimeEnabledFeatures::authorShadowDOMFo
rAnyElementEnabled()) { |
1667 exceptionState.throwDOMException(HierarchyRequestError, "Author-created
shadow roots are disabled for this element."); | 1667 exceptionState.throwDOMException(HierarchyRequestError, "Author-created
shadow roots are disabled for this element."); |
1668 return nullptr; | 1668 return nullptr; |
1669 } | 1669 } |
1670 | 1670 |
1671 return PassRefPtrWillBeRawPtr<ShadowRoot>(ensureShadow().addShadowRoot(*this
, ShadowRoot::AuthorShadowRoot)); | 1671 return PassRefPtrWillBeRawPtr<ShadowRoot>(ensureShadow().addShadowRoot(*this
, ShadowRoot::AuthorShadowRoot)); |
1672 } | 1672 } |
1673 | 1673 |
| 1674 PassRefPtrWillBeRawPtr<ShadowRoot> Element::createUserAgentShadowRoot(ExceptionS
tate& exceptionState) |
| 1675 { |
| 1676 return PassRefPtrWillBeRawPtr<ShadowRoot>(ensureUserAgentShadowRoot()); |
| 1677 } |
| 1678 |
1674 ShadowRoot* Element::shadowRoot() const | 1679 ShadowRoot* Element::shadowRoot() const |
1675 { | 1680 { |
1676 ElementShadow* elementShadow = shadow(); | 1681 ElementShadow* elementShadow = shadow(); |
1677 if (!elementShadow) | 1682 if (!elementShadow) |
1678 return 0; | 1683 return 0; |
1679 ShadowRoot* shadowRoot = elementShadow->youngestShadowRoot(); | 1684 ShadowRoot* shadowRoot = elementShadow->youngestShadowRoot(); |
1680 if (shadowRoot->type() == ShadowRoot::AuthorShadowRoot) | 1685 if (shadowRoot->type() == ShadowRoot::AuthorShadowRoot) |
1681 return shadowRoot; | 1686 return shadowRoot; |
1682 return 0; | 1687 return 0; |
1683 } | 1688 } |
(...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3264 return wrapper; | 3269 return wrapper; |
3265 | 3270 |
3266 CustomElementBinding* binding = perContextData->customElementBinding(customE
lementDefinition()); | 3271 CustomElementBinding* binding = perContextData->customElementBinding(customE
lementDefinition()); |
3267 | 3272 |
3268 wrapper->SetPrototype(binding->prototype()); | 3273 wrapper->SetPrototype(binding->prototype()); |
3269 | 3274 |
3270 return V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType
, wrapper, isolate); | 3275 return V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType
, wrapper, isolate); |
3271 } | 3276 } |
3272 | 3277 |
3273 } // namespace blink | 3278 } // namespace blink |
OLD | NEW |