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, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
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 2368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2379 if (AXObjectCache::accessibilityEnabled()) | 2379 if (AXObjectCache::accessibilityEnabled()) |
2380 document()->axObjectCache()->childrenChanged(this->parent()); | 2380 document()->axObjectCache()->childrenChanged(this->parent()); |
2381 | 2381 |
2382 remove(); | 2382 remove(); |
2383 | 2383 |
2384 // The remove() call above may invoke axObjectCache()->childrenChanged() on
the parent, which may require the AX render | 2384 // The remove() call above may invoke axObjectCache()->childrenChanged() on
the parent, which may require the AX render |
2385 // object for this renderer. So we remove the AX render object now, after th
e renderer is removed. | 2385 // object for this renderer. So we remove the AX render object now, after th
e renderer is removed. |
2386 if (AXObjectCache::accessibilityEnabled()) | 2386 if (AXObjectCache::accessibilityEnabled()) |
2387 document()->axObjectCache()->remove(this); | 2387 document()->axObjectCache()->remove(this); |
2388 | 2388 |
2389 // Continuation and first-letter can generate several renderers associated w
ith a single node. | |
2390 // We only want to clear the node's renderer if we are the associated render
er. | |
2391 if (node() && node()->renderer() == this) | |
2392 node()->setRenderer(0); | |
2393 | |
2394 #ifndef NDEBUG | 2389 #ifndef NDEBUG |
2395 if (!documentBeingDestroyed() && view() && view()->hasRenderNamedFlowThreads
()) { | 2390 if (!documentBeingDestroyed() && view() && view()->hasRenderNamedFlowThreads
()) { |
2396 // After remove, the object and the associated information should not be
in any flow thread. | 2391 // After remove, the object and the associated information should not be
in any flow thread. |
2397 const RenderNamedFlowThreadList* flowThreadList = view()->flowThreadCont
roller()->renderNamedFlowThreadList(); | 2392 const RenderNamedFlowThreadList* flowThreadList = view()->flowThreadCont
roller()->renderNamedFlowThreadList(); |
2398 for (RenderNamedFlowThreadList::const_iterator iter = flowThreadList->be
gin(); iter != flowThreadList->end(); ++iter) { | 2393 for (RenderNamedFlowThreadList::const_iterator iter = flowThreadList->be
gin(); iter != flowThreadList->end(); ++iter) { |
2399 const RenderNamedFlowThread* renderFlowThread = *iter; | 2394 const RenderNamedFlowThread* renderFlowThread = *iter; |
2400 ASSERT(!renderFlowThread->hasChild(this)); | 2395 ASSERT(!renderFlowThread->hasChild(this)); |
2401 ASSERT(!renderFlowThread->hasChildInfo(this)); | 2396 ASSERT(!renderFlowThread->hasChildInfo(this)); |
2402 } | 2397 } |
2403 } | 2398 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2517 for (RenderObject* destroyRootParent = destroyRoot->parent(); destroyRootPar
ent && destroyRootParent->isAnonymous(); destroyRoot = destroyRootParent, destro
yRootParent = destroyRootParent->parent()) { | 2512 for (RenderObject* destroyRootParent = destroyRoot->parent(); destroyRootPar
ent && destroyRootParent->isAnonymous(); destroyRoot = destroyRootParent, destro
yRootParent = destroyRootParent->parent()) { |
2518 // Currently we only remove anonymous cells' wrapper but we should remov
e all unneeded | 2513 // Currently we only remove anonymous cells' wrapper but we should remov
e all unneeded |
2519 // wrappers. See http://webkit.org/b/52123 as an example where this is n
eeded. | 2514 // wrappers. See http://webkit.org/b/52123 as an example where this is n
eeded. |
2520 if (!destroyRootParent->isTableCell()) | 2515 if (!destroyRootParent->isTableCell()) |
2521 break; | 2516 break; |
2522 | 2517 |
2523 if (destroyRootParent->firstChild() != this || destroyRootParent->lastCh
ild() != this) | 2518 if (destroyRootParent->firstChild() != this || destroyRootParent->lastCh
ild() != this) |
2524 break; | 2519 break; |
2525 } | 2520 } |
2526 | 2521 |
2527 // We repaint, so that the area exposed when this object disappears gets rep
ainted properly. | |
2528 // FIXME: A RenderObject with RenderLayer should probably repaint through it
as getting the | |
2529 // repaint rects is O(1) through a RenderLayer (assuming it's up-to-date). | |
2530 if (destroyRoot->everHadLayout()) { | |
2531 if (destroyRoot->isBody()) | |
2532 destroyRoot->view()->repaint(); | |
2533 else { | |
2534 destroyRoot->repaint(); | |
2535 destroyRoot->repaintOverhangingFloats(true); | |
2536 } | |
2537 } | |
2538 | |
2539 destroyRoot->destroy(); | 2522 destroyRoot->destroy(); |
2540 | 2523 |
2541 // WARNING: |this| is deleted here. | 2524 // WARNING: |this| is deleted here. |
2542 } | 2525 } |
2543 | 2526 |
2544 void RenderObject::destroy() | 2527 void RenderObject::destroy() |
2545 { | 2528 { |
2546 willBeDestroyed(); | 2529 willBeDestroyed(); |
2547 arenaDelete(renderArena(), this); | 2530 arenaDelete(renderArena(), this); |
2548 } | 2531 } |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3178 { | 3161 { |
3179 if (object1) { | 3162 if (object1) { |
3180 const WebCore::RenderObject* root = object1; | 3163 const WebCore::RenderObject* root = object1; |
3181 while (root->parent()) | 3164 while (root->parent()) |
3182 root = root->parent(); | 3165 root = root->parent(); |
3183 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3166 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3184 } | 3167 } |
3185 } | 3168 } |
3186 | 3169 |
3187 #endif | 3170 #endif |
OLD | NEW |