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

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

Issue 10448067: Merge 117482 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 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/rendering/RenderBox.h ('k') | Source/WebCore/rendering/RenderBoxModelObject.h » ('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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 3991 matching lines...) Expand 10 before | Expand all | Expand 10 after
4002 || style()->minHeight().isPercent() || style()->minWidth().isPercent (); 4002 || style()->minHeight().isPercent() || style()->minWidth().isPercent ();
4003 } 4003 }
4004 4004
4005 bool RenderBox::hasRelativeLogicalHeight() const 4005 bool RenderBox::hasRelativeLogicalHeight() const
4006 { 4006 {
4007 return style()->logicalHeight().isPercent() 4007 return style()->logicalHeight().isPercent()
4008 || style()->logicalMinHeight().isPercent() 4008 || style()->logicalMinHeight().isPercent()
4009 || style()->logicalMaxHeight().isPercent(); 4009 || style()->logicalMaxHeight().isPercent();
4010 } 4010 }
4011 4011
4012 void RenderBox::moveChildTo(RenderBox* toBox, RenderObject* child, RenderObject* beforeChild, bool fullRemoveInsert)
4013 {
4014 ASSERT(this == child->parent());
4015 ASSERT(!beforeChild || toBox == beforeChild->parent());
4016 if (fullRemoveInsert && toBox->isRenderBlock()) {
4017 // Takes care of adding the new child correctly if toBlock and fromBlock
4018 // have different kind of children (block vs inline).
4019 toBox->addChild(virtualChildren()->removeChildNode(this, child), beforeC hild);
4020 } else
4021 toBox->virtualChildren()->insertChildNode(toBox, virtualChildren()->remo veChildNode(this, child, fullRemoveInsert), beforeChild, fullRemoveInsert);
4022 }
4023
4024 void RenderBox::moveChildrenTo(RenderBox* toBox, RenderObject* startChild, Rende rObject* endChild, RenderObject* beforeChild, bool fullRemoveInsert)
4025 {
4026 ASSERT(!beforeChild || toBox == beforeChild->parent());
4027 for (RenderObject* child = startChild; child && child != endChild; ) {
4028 // Save our next sibling as moveChildTo will clear it.
4029 RenderObject* nextSibling = child->nextSibling();
4030 moveChildTo(toBox, child, beforeChild, fullRemoveInsert);
4031 child = nextSibling;
4032 }
4033 }
4034
4035 static void markBoxForRelayoutAfterSplit(RenderBox* box) 4012 static void markBoxForRelayoutAfterSplit(RenderBox* box)
4036 { 4013 {
4037 // FIXME: The table code should handle that automatically. If not, 4014 // FIXME: The table code should handle that automatically. If not,
4038 // we should fix it and remove the table part checks. 4015 // we should fix it and remove the table part checks.
4039 if (box->isTable()) 4016 if (box->isTable())
4040 toRenderTable(box)->setNeedsSectionRecalc(); 4017 toRenderTable(box)->setNeedsSectionRecalc();
4041 else if (box->isTableSection()) 4018 else if (box->isTableSection())
4042 toRenderTableSection(box)->setNeedsCellRecalc(); 4019 toRenderTableSection(box)->setNeedsCellRecalc();
4043 4020
4044 box->setNeedsLayoutAndPrefWidthsRecalc(); 4021 box->setNeedsLayoutAndPrefWidthsRecalc();
(...skipping 25 matching lines...) Expand all
4070 } 4047 }
4071 4048
4072 if (didSplitParentAnonymousBoxes) 4049 if (didSplitParentAnonymousBoxes)
4073 markBoxForRelayoutAfterSplit(this); 4050 markBoxForRelayoutAfterSplit(this);
4074 4051
4075 ASSERT(beforeChild->parent() == this); 4052 ASSERT(beforeChild->parent() == this);
4076 return beforeChild; 4053 return beforeChild;
4077 } 4054 }
4078 4055
4079 } // namespace WebCore 4056 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderBox.h ('k') | Source/WebCore/rendering/RenderBoxModelObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698