Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: Source/WebCore/rendering/RenderObject.cpp

Issue 12278026: Merge 142500 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/dom/Node.cpp ('k') | Source/WebCore/rendering/RenderObjectChildList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after
2384 if (AXObjectCache::accessibilityEnabled()) 2384 if (AXObjectCache::accessibilityEnabled())
2385 document()->axObjectCache()->childrenChanged(this->parent()); 2385 document()->axObjectCache()->childrenChanged(this->parent());
2386 2386
2387 remove(); 2387 remove();
2388 2388
2389 // The remove() call above may invoke axObjectCache()->childrenChanged() on the parent, which may require the AX render 2389 // The remove() call above may invoke axObjectCache()->childrenChanged() on the parent, which may require the AX render
2390 // object for this renderer. So we remove the AX render object now, after th e renderer is removed. 2390 // object for this renderer. So we remove the AX render object now, after th e renderer is removed.
2391 if (AXObjectCache::accessibilityEnabled()) 2391 if (AXObjectCache::accessibilityEnabled())
2392 document()->axObjectCache()->remove(this); 2392 document()->axObjectCache()->remove(this);
2393 2393
2394 // Continuation and first-letter can generate several renderers associated w ith a single node.
2395 // We only want to clear the node's renderer if we are the associated render er.
2396 if (node() && node()->renderer() == this)
2397 node()->setRenderer(0);
2398
2399 #ifndef NDEBUG 2394 #ifndef NDEBUG
2400 if (!documentBeingDestroyed() && view() && view()->hasRenderNamedFlowThreads ()) { 2395 if (!documentBeingDestroyed() && view() && view()->hasRenderNamedFlowThreads ()) {
2401 // After remove, the object and the associated information should not be in any flow thread. 2396 // After remove, the object and the associated information should not be in any flow thread.
2402 const RenderNamedFlowThreadList* flowThreadList = view()->flowThreadCont roller()->renderNamedFlowThreadList(); 2397 const RenderNamedFlowThreadList* flowThreadList = view()->flowThreadCont roller()->renderNamedFlowThreadList();
2403 for (RenderNamedFlowThreadList::const_iterator iter = flowThreadList->be gin(); iter != flowThreadList->end(); ++iter) { 2398 for (RenderNamedFlowThreadList::const_iterator iter = flowThreadList->be gin(); iter != flowThreadList->end(); ++iter) {
2404 const RenderNamedFlowThread* renderFlowThread = *iter; 2399 const RenderNamedFlowThread* renderFlowThread = *iter;
2405 ASSERT(!renderFlowThread->hasChild(this)); 2400 ASSERT(!renderFlowThread->hasChild(this));
2406 ASSERT(!renderFlowThread->hasChildInfo(this)); 2401 ASSERT(!renderFlowThread->hasChildInfo(this));
2407 } 2402 }
2408 } 2403 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 for (RenderObject* destroyRootParent = destroyRoot->parent(); destroyRootPar ent && destroyRootParent->isAnonymous(); destroyRoot = destroyRootParent, destro yRootParent = destroyRootParent->parent()) { 2517 for (RenderObject* destroyRootParent = destroyRoot->parent(); destroyRootPar ent && destroyRootParent->isAnonymous(); destroyRoot = destroyRootParent, destro yRootParent = destroyRootParent->parent()) {
2523 // Currently we only remove anonymous cells' wrapper but we should remov e all unneeded 2518 // Currently we only remove anonymous cells' wrapper but we should remov e all unneeded
2524 // wrappers. See http://webkit.org/b/52123 as an example where this is n eeded. 2519 // wrappers. See http://webkit.org/b/52123 as an example where this is n eeded.
2525 if (!destroyRootParent->isTableCell()) 2520 if (!destroyRootParent->isTableCell())
2526 break; 2521 break;
2527 2522
2528 if (destroyRootParent->firstChild() != this || destroyRootParent->lastCh ild() != this) 2523 if (destroyRootParent->firstChild() != this || destroyRootParent->lastCh ild() != this)
2529 break; 2524 break;
2530 } 2525 }
2531 2526
2532 // We repaint, so that the area exposed when this object disappears gets rep ainted properly.
2533 // FIXME: A RenderObject with RenderLayer should probably repaint through it as getting the
2534 // repaint rects is O(1) through a RenderLayer (assuming it's up-to-date).
2535 if (destroyRoot->everHadLayout()) {
2536 if (destroyRoot->isBody())
2537 destroyRoot->view()->repaint();
2538 else {
2539 destroyRoot->repaint();
2540 destroyRoot->repaintOverhangingFloats(true);
2541 }
2542 }
2543
2544 destroyRoot->destroy(); 2527 destroyRoot->destroy();
2545 2528
2546 // WARNING: |this| is deleted here. 2529 // WARNING: |this| is deleted here.
2547 } 2530 }
2548 2531
2549 void RenderObject::destroy() 2532 void RenderObject::destroy()
2550 { 2533 {
2551 willBeDestroyed(); 2534 willBeDestroyed();
2552 arenaDelete(renderArena(), this); 2535 arenaDelete(renderArena(), this);
2553 } 2536 }
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
3191 { 3174 {
3192 if (object1) { 3175 if (object1) {
3193 const WebCore::RenderObject* root = object1; 3176 const WebCore::RenderObject* root = object1;
3194 while (root->parent()) 3177 while (root->parent())
3195 root = root->parent(); 3178 root = root->parent();
3196 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3179 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3197 } 3180 }
3198 } 3181 }
3199 3182
3200 #endif 3183 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/dom/Node.cpp ('k') | Source/WebCore/rendering/RenderObjectChildList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698