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

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

Issue 584033002: [New Multicolumn] Add support for column-span:all (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 return !isTable(); 329 return !isTable();
330 else if (newChild->isTableSection()) 330 else if (newChild->isTableSection())
331 return !isTable(); 331 return !isTable();
332 else if (newChild->isTableRow()) 332 else if (newChild->isTableRow())
333 return !isTableSection(); 333 return !isTableSection();
334 else if (newChild->isTableCell()) 334 else if (newChild->isTableCell())
335 return !isTableRow(); 335 return !isTableRow();
336 return false; 336 return false;
337 } 337 }
338 338
339 bool RenderObject::isValidColumnSpanAll() const
340 {
341 ASSERT(style()->columnSpan() == ColumnSpanAll);
342 RenderFlowThread* flowThread = flowThreadContainingBlock();
343 return flowThread && flowThread->isColumnSpanner(this);
344 }
345
339 void RenderObject::addChild(RenderObject* newChild, RenderObject* beforeChild) 346 void RenderObject::addChild(RenderObject* newChild, RenderObject* beforeChild)
340 { 347 {
341 ASSERT(isAllowedToModifyRenderTreeStructure(document())); 348 ASSERT(isAllowedToModifyRenderTreeStructure(document()));
342 349
343 RenderObjectChildList* children = virtualChildren(); 350 RenderObjectChildList* children = virtualChildren();
344 ASSERT(children); 351 ASSERT(children);
345 if (!children) 352 if (!children)
346 return; 353 return;
347 354
348 if (requiresAnonymousTableWrappers(newChild)) { 355 if (requiresAnonymousTableWrappers(newChild)) {
(...skipping 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after
2742 // that needs to be drawn and layer visibility optimization can't be used 2749 // that needs to be drawn and layer visibility optimization can't be used
2743 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V ISIBLE && !hasLayer()) { 2750 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V ISIBLE && !hasLayer()) {
2744 if (!layer) 2751 if (!layer)
2745 layer = parent()->enclosingLayer(); 2752 layer = parent()->enclosingLayer();
2746 if (layer) 2753 if (layer)
2747 layer->dirtyVisibleContentStatus(); 2754 layer->dirtyVisibleContentStatus();
2748 } 2755 }
2749 2756
2750 if (!isFloating() && parent()->childrenInline()) 2757 if (!isFloating() && parent()->childrenInline())
2751 parent()->dirtyLinesFromChangedChild(this); 2758 parent()->dirtyLinesFromChangedChild(this);
2759
2760 if (RenderFlowThread* flowThread = parent()->flowThreadContainingBlock())
2761 flowThread->flowThreadDescendantInserted(this);
2752 } 2762 }
2753 2763
2754 void RenderObject::willBeRemovedFromTree() 2764 void RenderObject::willBeRemovedFromTree()
2755 { 2765 {
2756 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removal s which would need to be fixed first. 2766 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removal s which would need to be fixed first.
2757 2767
2758 // If we remove a visible child from an invisible parent, we don't know the layer visibility any more. 2768 // If we remove a visible child from an invisible parent, we don't know the layer visibility any more.
2759 RenderLayer* layer = 0; 2769 RenderLayer* layer = 0;
2760 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V ISIBLE && !hasLayer()) { 2770 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V ISIBLE && !hasLayer()) {
2761 layer = parent()->enclosingLayer(); 2771 layer = parent()->enclosingLayer();
(...skipping 30 matching lines...) Expand all
2792 removeFromRenderFlowThreadRecursive(flowThreadContainingBlock()); 2802 removeFromRenderFlowThreadRecursive(flowThreadContainingBlock());
2793 } 2803 }
2794 2804
2795 void RenderObject::removeFromRenderFlowThreadRecursive(RenderFlowThread* renderF lowThread) 2805 void RenderObject::removeFromRenderFlowThreadRecursive(RenderFlowThread* renderF lowThread)
2796 { 2806 {
2797 if (const RenderObjectChildList* children = virtualChildren()) { 2807 if (const RenderObjectChildList* children = virtualChildren()) {
2798 for (RenderObject* child = children->firstChild(); child; child = child- >nextSibling()) 2808 for (RenderObject* child = children->firstChild(); child; child = child- >nextSibling())
2799 child->removeFromRenderFlowThreadRecursive(renderFlowThread); 2809 child->removeFromRenderFlowThreadRecursive(renderFlowThread);
2800 } 2810 }
2801 2811
2812 if (renderFlowThread && renderFlowThread != this)
2813 renderFlowThread->flowThreadDescendantWillBeRemoved(this);
2802 setFlowThreadState(NotInsideFlowThread); 2814 setFlowThreadState(NotInsideFlowThread);
2803 } 2815 }
2804 2816
2805 void RenderObject::destroyAndCleanupAnonymousWrappers() 2817 void RenderObject::destroyAndCleanupAnonymousWrappers()
2806 { 2818 {
2807 // If the tree is destroyed, there is no need for a clean-up phase. 2819 // If the tree is destroyed, there is no need for a clean-up phase.
2808 if (documentBeingDestroyed()) { 2820 if (documentBeingDestroyed()) {
2809 destroy(); 2821 destroy();
2810 return; 2822 return;
2811 } 2823 }
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
3519 { 3531 {
3520 if (object1) { 3532 if (object1) {
3521 const blink::RenderObject* root = object1; 3533 const blink::RenderObject* root = object1;
3522 while (root->parent()) 3534 while (root->parent())
3523 root = root->parent(); 3535 root = root->parent();
3524 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3536 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3525 } 3537 }
3526 } 3538 }
3527 3539
3528 #endif 3540 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698