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

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

Issue 10911116: Merge 126048 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 3 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
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 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after
2387 layer->setHasVisibleContent(); 2387 layer->setHasVisibleContent();
2388 } 2388 }
2389 2389
2390 if (!isFloating() && parent()->childrenInline()) 2390 if (!isFloating() && parent()->childrenInline())
2391 parent()->dirtyLinesFromChangedChild(this); 2391 parent()->dirtyLinesFromChangedChild(this);
2392 2392
2393 if (RenderNamedFlowThread* containerFlowThread = parent()->enclosingRenderNa medFlowThread()) 2393 if (RenderNamedFlowThread* containerFlowThread = parent()->enclosingRenderNa medFlowThread())
2394 containerFlowThread->addFlowChild(this); 2394 containerFlowThread->addFlowChild(this);
2395 } 2395 }
2396 2396
2397 void RenderObject::willBeRemovedFromTree()
2398 {
2399 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removal s which would need to be fixed first.
2400
2401 // If we remove a visible child from an invisible parent, we don't know the layer visibility any more.
2402 RenderLayer* layer = 0;
2403 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V ISIBLE && !hasLayer()) {
2404 if ((layer = parent()->enclosingLayer()))
2405 layer->dirtyVisibleContentStatus();
2406 }
2407
2408 // Keep our layer hierarchy updated.
2409 if (firstChild() || hasLayer()) {
2410 if (!layer)
2411 layer = parent()->enclosingLayer();
2412 removeLayers(layer);
2413 }
2414
2415 if (isOutOfFlowPositioned() && parent()->childrenInline())
2416 parent()->dirtyLinesFromChangedChild(this);
2417
2418 if (inRenderFlowThread()) {
2419 if (isBox())
2420 enclosingRenderFlowThread()->removeRenderBoxRegionInfo(toRenderBox(t his));
2421 enclosingRenderFlowThread()->clearRenderObjectCustomStyle(this);
2422 }
2423
2424 if (RenderNamedFlowThread* containerFlowThread = parent()->enclosingRenderNa medFlowThread())
2425 containerFlowThread->removeFlowChild(this);
2426
2427 #if ENABLE(SVG)
2428 // Update cached boundaries in SVG renderers, if a child is removed.
2429 parent()->setNeedsBoundariesUpdate();
2430 #endif
2431 }
2432
2397 void RenderObject::destroyAndCleanupAnonymousWrappers() 2433 void RenderObject::destroyAndCleanupAnonymousWrappers()
2398 { 2434 {
2399 RenderObject* parent = this->parent(); 2435 RenderObject* parent = this->parent();
2400 2436
2401 // If the tree is destroyed or our parent is not anonymous, there is no need for a clean-up phase. 2437 // If the tree is destroyed or our parent is not anonymous, there is no need for a clean-up phase.
2402 if (documentBeingDestroyed() || !parent || !parent->isAnonymous()) { 2438 if (documentBeingDestroyed() || !parent || !parent->isAnonymous()) {
2403 destroy(); 2439 destroy();
2404 return; 2440 return;
2405 } 2441 }
2406 2442
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
3031 { 3067 {
3032 if (object1) { 3068 if (object1) {
3033 const WebCore::RenderObject* root = object1; 3069 const WebCore::RenderObject* root = object1;
3034 while (root->parent()) 3070 while (root->parent())
3035 root = root->parent(); 3071 root = root->parent();
3036 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3072 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3037 } 3073 }
3038 } 3074 }
3039 3075
3040 #endif 3076 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderObject.h ('k') | Source/WebCore/rendering/RenderObjectChildList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698