| 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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 | 805 |
| 806 // We've already been through detach when doing an attach, but we might | 806 // We've already been through detach when doing an attach, but we might |
| 807 // need to clear any state that's been added since then. | 807 // need to clear any state that's been added since then. |
| 808 if (hasRareData() && styleChangeType() == NeedsReattachStyleChange) { | 808 if (hasRareData() && styleChangeType() == NeedsReattachStyleChange) { |
| 809 ElementRareData* data = elementRareData(); | 809 ElementRareData* data = elementRareData(); |
| 810 data->clearComputedStyle(); | 810 data->clearComputedStyle(); |
| 811 } | 811 } |
| 812 | 812 |
| 813 RenderTreeBuilder(this, context.resolvedStyle).createRendererForElementIfNee
ded(); | 813 RenderTreeBuilder(this, context.resolvedStyle).createRendererForElementIfNee
ded(); |
| 814 | 814 |
| 815 // When a shadow root exists, it does the work of attaching the children. | |
| 816 if (ElementShadow* shadow = this->shadow()) | |
| 817 shadow->attach(context); | |
| 818 | |
| 819 ContainerNode::attach(context); | |
| 820 | |
| 821 if (hasRareData() && !renderer()) { | 815 if (hasRareData() && !renderer()) { |
| 822 if (ActiveAnimations* activeAnimations = elementRareData()->activeAnimat
ions()) { | 816 if (ActiveAnimations* activeAnimations = elementRareData()->activeAnimat
ions()) { |
| 823 activeAnimations->cssAnimations().cancel(); | 817 activeAnimations->cssAnimations().cancel(); |
| 824 activeAnimations->setAnimationStyleChange(false); | 818 activeAnimations->setAnimationStyleChange(false); |
| 825 } | 819 } |
| 826 } | 820 } |
| 821 |
| 822 // When a shadow root exists, it does the work of attaching the children. |
| 823 if (ElementShadow* shadow = this->shadow()) |
| 824 shadow->attach(context); |
| 825 |
| 826 ContainerNode::attach(context); |
| 827 } | 827 } |
| 828 | 828 |
| 829 void Element::detach(const AttachContext& context) | 829 void Element::detach(const AttachContext& context) |
| 830 { | 830 { |
| 831 if (hasRareData()) { | 831 if (hasRareData()) { |
| 832 ElementRareData* data = elementRareData(); | 832 ElementRareData* data = elementRareData(); |
| 833 | 833 |
| 834 // attach() will perform the below steps for us when inside recalcStyle. | 834 // attach() will perform the below steps for us when inside recalcStyle. |
| 835 if (!document().inStyleRecalc()) { | 835 if (!document().inStyleRecalc()) { |
| 836 data->clearComputedStyle(); | 836 data->clearComputedStyle(); |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1802 return false; | 1802 return false; |
| 1803 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. | 1803 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. |
| 1804 // See comments in RenderObject::setStyle(). | 1804 // See comments in RenderObject::setStyle(). |
| 1805 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? | 1805 // FIXME: Why does gaining a layer from outside the style system require dis
abling sharing? |
| 1806 if (isHTMLCanvasElement(*this)) | 1806 if (isHTMLCanvasElement(*this)) |
| 1807 return false; | 1807 return false; |
| 1808 return true; | 1808 return true; |
| 1809 } | 1809 } |
| 1810 | 1810 |
| 1811 } // namespace blink | 1811 } // namespace blink |
| OLD | NEW |