| 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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 newStyle->inheritFrom(style()); | 309 newStyle->inheritFrom(style()); |
| 310 newStyle->setDisplay(TABLE); | 310 newStyle->setDisplay(TABLE); |
| 311 table->setStyle(newStyle.release()); | 311 table->setStyle(newStyle.release()); |
| 312 addChild(table, beforeChild); | 312 addChild(table, beforeChild); |
| 313 } | 313 } |
| 314 table->addChild(newChild); | 314 table->addChild(newChild); |
| 315 } else { | 315 } else { |
| 316 // Just add it... | 316 // Just add it... |
| 317 children->insertChildNode(this, newChild, beforeChild); | 317 children->insertChildNode(this, newChild, beforeChild); |
| 318 } | 318 } |
| 319 RenderCounter::rendererSubtreeAttached(newChild); | |
| 320 if (newChild->isText() && newChild->style()->textTransform() == CAPITALIZE)
{ | 319 if (newChild->isText() && newChild->style()->textTransform() == CAPITALIZE)
{ |
| 321 RefPtr<StringImpl> textToTransform = toRenderText(newChild)->originalTex
t(); | 320 RefPtr<StringImpl> textToTransform = toRenderText(newChild)->originalTex
t(); |
| 322 if (textToTransform) | 321 if (textToTransform) |
| 323 toRenderText(newChild)->setText(textToTransform.release(), true); | 322 toRenderText(newChild)->setText(textToTransform.release(), true); |
| 324 } | 323 } |
| 325 } | 324 } |
| 326 | 325 |
| 327 void RenderObject::removeChild(RenderObject* oldChild) | 326 void RenderObject::removeChild(RenderObject* oldChild) |
| 328 { | 327 { |
| 329 RenderObjectChildList* children = virtualChildren(); | 328 RenderObjectChildList* children = virtualChildren(); |
| (...skipping 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2147 | 2146 |
| 2148 // If this renderer is being autoscrolled, stop the autoscroll timer | 2147 // If this renderer is being autoscrolled, stop the autoscroll timer |
| 2149 | 2148 |
| 2150 // FIXME: RenderObject::destroy should not get called with a renderer whose
document | 2149 // FIXME: RenderObject::destroy should not get called with a renderer whose
document |
| 2151 // has a null frame, so we assert this. However, we don't want release build
s to crash which is why we | 2150 // has a null frame, so we assert this. However, we don't want release build
s to crash which is why we |
| 2152 // check that the frame is not null. | 2151 // check that the frame is not null. |
| 2153 ASSERT(frame()); | 2152 ASSERT(frame()); |
| 2154 if (frame() && frame()->eventHandler()->autoscrollRenderer() == this) | 2153 if (frame() && frame()->eventHandler()->autoscrollRenderer() == this) |
| 2155 frame()->eventHandler()->stopAutoscrollTimer(true); | 2154 frame()->eventHandler()->stopAutoscrollTimer(true); |
| 2156 | 2155 |
| 2157 if (m_hasCounterNodeMap) | |
| 2158 RenderCounter::destroyCounterNodes(this); | |
| 2159 | |
| 2160 if (AXObjectCache::accessibilityEnabled()) { | 2156 if (AXObjectCache::accessibilityEnabled()) { |
| 2161 document()->axObjectCache()->childrenChanged(this->parent()); | 2157 document()->axObjectCache()->childrenChanged(this->parent()); |
| 2162 document()->axObjectCache()->remove(this); | 2158 document()->axObjectCache()->remove(this); |
| 2163 } | 2159 } |
| 2164 animation()->cancelAnimations(this); | 2160 animation()->cancelAnimations(this); |
| 2165 | 2161 |
| 2166 // By default no ref-counting. RenderWidget::destroy() doesn't call | 2162 // By default no ref-counting. RenderWidget::destroy() doesn't call |
| 2167 // this function because it needs to do ref-counting. If anything | 2163 // this function because it needs to do ref-counting. If anything |
| 2168 // in this function changes, be sure to fix RenderWidget::destroy() as well. | 2164 // in this function changes, be sure to fix RenderWidget::destroy() as well. |
| 2169 | 2165 |
| 2170 remove(); | 2166 remove(); |
| 2171 | 2167 |
| 2168 // If this renderer had a parent, remove should have destroyed any counters |
| 2169 // attached to this renderer and marked the affected other counters for |
| 2170 // reevaluation. This apparently redundant check is here for the case when |
| 2171 // this renderer had no parent at the time remove() was called. |
| 2172 |
| 2173 if (m_hasCounterNodeMap) |
| 2174 RenderCounter::destroyCounterNodes(this); |
| 2175 |
| 2172 // FIXME: Would like to do this in RenderBoxModelObject, but the timing is s
o complicated that this can't easily | 2176 // FIXME: Would like to do this in RenderBoxModelObject, but the timing is s
o complicated that this can't easily |
| 2173 // be moved into RenderBoxModelObject::destroy. | 2177 // be moved into RenderBoxModelObject::destroy. |
| 2174 if (hasLayer()) { | 2178 if (hasLayer()) { |
| 2175 setHasLayer(false); | 2179 setHasLayer(false); |
| 2176 toRenderBoxModelObject(this)->destroyLayer(); | 2180 toRenderBoxModelObject(this)->destroyLayer(); |
| 2177 } | 2181 } |
| 2178 arenaDelete(renderArena(), this); | 2182 arenaDelete(renderArena(), this); |
| 2179 } | 2183 } |
| 2180 | 2184 |
| 2181 void RenderObject::arenaDelete(RenderArena* arena, void* base) | 2185 void RenderObject::arenaDelete(RenderArena* arena, void* base) |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2749 { | 2753 { |
| 2750 if (object1) { | 2754 if (object1) { |
| 2751 const WebCore::RenderObject* root = object1; | 2755 const WebCore::RenderObject* root = object1; |
| 2752 while (root->parent()) | 2756 while (root->parent()) |
| 2753 root = root->parent(); | 2757 root = root->parent(); |
| 2754 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 2758 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 2755 } | 2759 } |
| 2756 } | 2760 } |
| 2757 | 2761 |
| 2758 #endif | 2762 #endif |
| OLD | NEW |