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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 PassRefPtr<Element> Element::create(const QualifiedName& tagName, Document* docu
ment) | 162 PassRefPtr<Element> Element::create(const QualifiedName& tagName, Document* docu
ment) |
163 { | 163 { |
164 return adoptRef(new Element(tagName, document, CreateElement)); | 164 return adoptRef(new Element(tagName, document, CreateElement)); |
165 } | 165 } |
166 | 166 |
167 Element::~Element() | 167 Element::~Element() |
168 { | 168 { |
169 ASSERT(needsAttach()); | 169 ASSERT(needsAttach()); |
170 | 170 |
| 171 #if !ENABLE(OILPAN) |
171 if (hasRareData()) | 172 if (hasRareData()) |
172 elementRareData()->clearShadow(); | 173 elementRareData()->clearShadow(); |
173 | 174 #endif |
174 if (hasActiveAnimations()) | |
175 activeAnimations()->dispose(); | |
176 | 175 |
177 if (isCustomElement()) | 176 if (isCustomElement()) |
178 CustomElement::wasDestroyed(this); | 177 CustomElement::wasDestroyed(this); |
179 | 178 |
180 if (hasSyntheticAttrChildNodes()) | 179 if (hasSyntheticAttrChildNodes()) |
181 detachAllAttrNodesFromElement(); | 180 detachAllAttrNodesFromElement(); |
182 | 181 |
183 #if !ENABLE(OILPAN) | 182 #if !ENABLE(OILPAN) |
184 // With Oilpan, either the Element has been removed from the Document | 183 // With Oilpan, either the Element has been removed from the Document |
185 // or the Document is dead as well. If the Element has been removed from | 184 // or the Document is dead as well. If the Element has been removed from |
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 | 1423 |
1425 // attach() will perform the below steps for us when inside recalcStyle. | 1424 // attach() will perform the below steps for us when inside recalcStyle. |
1426 if (!document().inStyleRecalc()) { | 1425 if (!document().inStyleRecalc()) { |
1427 data->resetStyleState(); | 1426 data->resetStyleState(); |
1428 data->clearComputedStyle(); | 1427 data->clearComputedStyle(); |
1429 data->clearRestyleFlags(); | 1428 data->clearRestyleFlags(); |
1430 } | 1429 } |
1431 | 1430 |
1432 if (ActiveAnimations* activeAnimations = data->activeAnimations()) { | 1431 if (ActiveAnimations* activeAnimations = data->activeAnimations()) { |
1433 if (context.performingReattach) { | 1432 if (context.performingReattach) { |
1434 // FIXME: We call detach from withing style recalc, so compositi
ngState is not up to date. | 1433 // FIXME: We call detach from within style recalc, so compositin
gState is not up to date. |
1435 // https://code.google.com/p/chromium/issues/detail?id=339847 | 1434 // https://code.google.com/p/chromium/issues/detail?id=339847 |
1436 DisableCompositingQueryAsserts disabler; | 1435 DisableCompositingQueryAsserts disabler; |
1437 | 1436 |
1438 // FIXME: restart compositor animations rather than pull back to
the main thread | 1437 // FIXME: restart compositor animations rather than pull back to
the main thread |
1439 activeAnimations->cancelAnimationOnCompositor(); | 1438 activeAnimations->cancelAnimationOnCompositor(); |
1440 } else { | 1439 } else { |
1441 activeAnimations->cssAnimations().cancel(); | 1440 activeAnimations->cssAnimations().cancel(); |
1442 activeAnimations->setAnimationStyleChange(false); | 1441 activeAnimations->setAnimationStyleChange(false); |
1443 } | 1442 } |
1444 } | 1443 } |
(...skipping 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3298 void Element::trace(Visitor* visitor) | 3297 void Element::trace(Visitor* visitor) |
3299 { | 3298 { |
3300 // FIXME: Oilpan: Perform this tracing directly on the element | 3299 // FIXME: Oilpan: Perform this tracing directly on the element |
3301 // rare data once that is in the heap. | 3300 // rare data once that is in the heap. |
3302 if (hasRareData()) | 3301 if (hasRareData()) |
3303 elementRareData()->trace(visitor); | 3302 elementRareData()->trace(visitor); |
3304 ContainerNode::trace(visitor); | 3303 ContainerNode::trace(visitor); |
3305 } | 3304 } |
3306 | 3305 |
3307 } // namespace WebCore | 3306 } // namespace WebCore |
OLD | NEW |