Chromium Code Reviews| 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 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1728 | 1728 |
| 1729 void Element::setNeedsAnimationStyleRecalc() | 1729 void Element::setNeedsAnimationStyleRecalc() |
| 1730 { | 1730 { |
| 1731 if (styleChangeType() != NoStyleChange) | 1731 if (styleChangeType() != NoStyleChange) |
| 1732 return; | 1732 return; |
| 1733 | 1733 |
| 1734 setNeedsStyleRecalc(LocalStyleChange); | 1734 setNeedsStyleRecalc(LocalStyleChange); |
| 1735 setAnimationStyleChange(true); | 1735 setAnimationStyleChange(true); |
| 1736 } | 1736 } |
| 1737 | 1737 |
| 1738 void Element::setCustomElementDefinition(PassRefPtr<CustomElementDefinition> def inition) | |
| 1739 { | |
| 1740 if (!hasRareData() && !definition) | |
| 1741 return; | |
| 1742 ensureElementRareData().setCustomElementDefinition(definition); | |
|
dominicc (has gone to gerrit)
2014/03/03 04:32:23
We should assert that there isn't a definition alr
| |
| 1743 } | |
| 1744 | |
| 1745 CustomElementDefinition* Element::customElementDefinition() const | |
| 1746 { | |
| 1747 if (hasRareData()) | |
| 1748 return elementRareData()->customElementDefinition(); | |
| 1749 return 0; | |
| 1750 } | |
| 1751 | |
| 1738 PassRefPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& exceptionState) | 1752 PassRefPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& exceptionState) |
| 1739 { | 1753 { |
| 1740 if (alwaysCreateUserAgentShadowRoot()) | 1754 if (alwaysCreateUserAgentShadowRoot()) |
| 1741 ensureUserAgentShadowRoot(); | 1755 ensureUserAgentShadowRoot(); |
| 1742 | 1756 |
| 1743 // Some elements make assumptions about what kind of renderers they allow | 1757 // Some elements make assumptions about what kind of renderers they allow |
| 1744 // as children so we can't allow author shadows on them for now. An override | 1758 // as children so we can't allow author shadows on them for now. An override |
| 1745 // flag is provided for testing how author shadows interact on these element s. | 1759 // flag is provided for testing how author shadows interact on these element s. |
| 1746 if (!areAuthorShadowsAllowed() && !RuntimeEnabledFeatures::authorShadowDOMFo rAnyElementEnabled()) { | 1760 if (!areAuthorShadowsAllowed() && !RuntimeEnabledFeatures::authorShadowDOMFo rAnyElementEnabled()) { |
| 1747 exceptionState.throwDOMException(HierarchyRequestError, "Author-created shadow roots are disabled for this element."); | 1761 exceptionState.throwDOMException(HierarchyRequestError, "Author-created shadow roots are disabled for this element."); |
| (...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3540 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems | 3554 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems |
| 3541 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405 | 3555 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405 |
| 3542 if (hasTagName(optionTag) || hasTagName(optgroupTag)) | 3556 if (hasTagName(optionTag) || hasTagName(optgroupTag)) |
| 3543 return false; | 3557 return false; |
| 3544 if (FullscreenElementStack::isActiveFullScreenElement(this)) | 3558 if (FullscreenElementStack::isActiveFullScreenElement(this)) |
| 3545 return false; | 3559 return false; |
| 3546 return true; | 3560 return true; |
| 3547 } | 3561 } |
| 3548 | 3562 |
| 3549 } // namespace WebCore | 3563 } // namespace WebCore |
| OLD | NEW |