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

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

Issue 9546037: Merge 107622 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 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/RenderFlowThread.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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
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 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 // Make sure the types of the anonymous blocks match up. 1146 // Make sure the types of the anonymous blocks match up.
1147 return prev->isAnonymousColumnsBlock() == next->isAnonymousColumnsBlock() 1147 return prev->isAnonymousColumnsBlock() == next->isAnonymousColumnsBlock()
1148 && prev->isAnonymousColumnSpanBlock() == next->isAnonymousColumnSpanB lock(); 1148 && prev->isAnonymousColumnSpanBlock() == next->isAnonymousColumnSpanB lock();
1149 } 1149 }
1150 1150
1151 void RenderBlock::collapseAnonymousBoxChild(RenderBlock* parent, RenderObject* c hild) 1151 void RenderBlock::collapseAnonymousBoxChild(RenderBlock* parent, RenderObject* c hild)
1152 { 1152 {
1153 parent->setNeedsLayoutAndPrefWidthsRecalc(); 1153 parent->setNeedsLayoutAndPrefWidthsRecalc();
1154 parent->setChildrenInline(child->childrenInline()); 1154 parent->setChildrenInline(child->childrenInline());
1155 RenderObject* nextSibling = child->nextSibling(); 1155 RenderObject* nextSibling = child->nextSibling();
1156
1157 RenderFlowThread* childFlowThread = child->enclosingRenderFlowThread();
1156 RenderBlock* anonBlock = toRenderBlock(parent->children()->removeChildNode(p arent, child, child->hasLayer())); 1158 RenderBlock* anonBlock = toRenderBlock(parent->children()->removeChildNode(p arent, child, child->hasLayer()));
1157 anonBlock->moveAllChildrenTo(parent, nextSibling, child->hasLayer()); 1159 anonBlock->moveAllChildrenTo(parent, nextSibling, child->hasLayer());
1158 // Delete the now-empty block's lines and nuke it. 1160 // Delete the now-empty block's lines and nuke it.
1159 if (!parent->documentBeingDestroyed()) 1161 if (!parent->documentBeingDestroyed())
1160 anonBlock->deleteLineBoxTree(); 1162 anonBlock->deleteLineBoxTree();
1163 if (childFlowThread && !parent->documentBeingDestroyed())
1164 childFlowThread->removeFlowChildInfo(anonBlock);
1161 anonBlock->destroy(); 1165 anonBlock->destroy();
1162 } 1166 }
1163 1167
1164 void RenderBlock::removeChild(RenderObject* oldChild) 1168 void RenderBlock::removeChild(RenderObject* oldChild)
1165 { 1169 {
1166 // If this child is a block, and if our previous and next siblings are 1170 // If this child is a block, and if our previous and next siblings are
1167 // both anonymous blocks with inline content, then we can go ahead and 1171 // both anonymous blocks with inline content, then we can go ahead and
1168 // fold the inline content back together. 1172 // fold the inline content back together.
1169 RenderObject* prev = oldChild->previousSibling(); 1173 RenderObject* prev = oldChild->previousSibling();
1170 RenderObject* next = oldChild->nextSibling(); 1174 RenderObject* next = oldChild->nextSibling();
(...skipping 6055 matching lines...) Expand 10 before | Expand all | Expand 10 after
7226 } 7230 }
7227 7231
7228 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject) 7232 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject)
7229 { 7233 {
7230 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); 7234 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY());
7231 } 7235 }
7232 7236
7233 #endif 7237 #endif
7234 7238
7235 } // namespace WebCore 7239 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/dom/Node.cpp ('k') | Source/WebCore/rendering/RenderFlowThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698