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

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

Issue 9160034: Merge 105750 - Crash when accessing removed parent in InlineTextBox. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 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 | « LayoutTests/fast/block/block-remove-child-delete-line-box-crash-expected.txt ('k') | no next file » | 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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 RenderBlock* anonBlock = toRenderBlock(children()->removeChildNode(this, child, child->hasLayer())); 1078 RenderBlock* anonBlock = toRenderBlock(children()->removeChildNode(this, child, child->hasLayer()));
1079 anonBlock->moveAllChildrenTo(this, child->hasLayer()); 1079 anonBlock->moveAllChildrenTo(this, child->hasLayer());
1080 // Delete the now-empty block's lines and nuke it. 1080 // Delete the now-empty block's lines and nuke it.
1081 anonBlock->deleteLineBoxTree(); 1081 anonBlock->deleteLineBoxTree();
1082 anonBlock->destroy(); 1082 anonBlock->destroy();
1083 } 1083 }
1084 1084
1085 if (!firstChild() && !documentBeingDestroyed()) { 1085 if (!firstChild() && !documentBeingDestroyed()) {
1086 // If this was our last child be sure to clear out our line boxes. 1086 // If this was our last child be sure to clear out our line boxes.
1087 if (childrenInline()) 1087 if (childrenInline())
1088 lineBoxes()->deleteLineBoxes(renderArena()); 1088 deleteLineBoxTree();
1089 } 1089 }
1090 } 1090 }
1091 1091
1092 bool RenderBlock::isSelfCollapsingBlock() const 1092 bool RenderBlock::isSelfCollapsingBlock() const
1093 { 1093 {
1094 // We are not self-collapsing if we 1094 // We are not self-collapsing if we
1095 // (a) have a non-zero height according to layout (an optimization to avoid wasting time) 1095 // (a) have a non-zero height according to layout (an optimization to avoid wasting time)
1096 // (b) are a table, 1096 // (b) are a table,
1097 // (c) have border/padding, 1097 // (c) have border/padding,
1098 // (d) have a min-height 1098 // (d) have a min-height
(...skipping 5945 matching lines...) Expand 10 before | Expand all | Expand 10 after
7044 } 7044 }
7045 7045
7046 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject) 7046 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject)
7047 { 7047 {
7048 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); 7048 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY());
7049 } 7049 }
7050 7050
7051 #endif 7051 #endif
7052 7052
7053 } // namespace WebCore 7053 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/block/block-remove-child-delete-line-box-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698