| OLD | NEW |
| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 void RenderBlock::addChild(RenderObject* newChild, RenderObject* beforeChild) | 300 void RenderBlock::addChild(RenderObject* newChild, RenderObject* beforeChild) |
| 301 { | 301 { |
| 302 addChildIgnoringAnonymousColumnBlocks(newChild, beforeChild); | 302 addChildIgnoringAnonymousColumnBlocks(newChild, beforeChild); |
| 303 } | 303 } |
| 304 | 304 |
| 305 void RenderBlock::deleteLineBoxTree() | 305 void RenderBlock::deleteLineBoxTree() |
| 306 { | 306 { |
| 307 ASSERT(!m_lineBoxes.firstLineBox()); | 307 ASSERT(!m_lineBoxes.firstLineBox()); |
| 308 } | 308 } |
| 309 | 309 |
| 310 void RenderBlock::makeChildrenNonInline(RenderObject *insertionPoint) | |
| 311 { | |
| 312 ASSERT_NOT_REACHED(); | |
| 313 // FIXME(sky): Remove | |
| 314 } | |
| 315 | |
| 316 void RenderBlock::collapseAnonymousBlockChild(RenderBlock* parent, RenderBlock*
child) | |
| 317 { | |
| 318 // It's possible that this block's destruction may have been triggered by th
e | |
| 319 // child's removal. Just bail if the anonymous child block is already being | |
| 320 // destroyed. See crbug.com/282088 | |
| 321 if (child->beingDestroyed()) | |
| 322 return; | |
| 323 parent->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); | |
| 324 parent->setChildrenInline(child->childrenInline()); | |
| 325 RenderObject* nextSibling = child->nextSibling(); | |
| 326 | |
| 327 parent->children()->removeChildNode(parent, child, child->hasLayer()); | |
| 328 child->moveAllChildrenTo(parent, nextSibling, child->hasLayer()); | |
| 329 // Explicitly delete the child's line box tree, or the special anonymous | |
| 330 // block handling in willBeDestroyed will cause problems. | |
| 331 child->deleteLineBoxTree(); | |
| 332 child->destroy(); | |
| 333 } | |
| 334 | |
| 335 void RenderBlock::removeChild(RenderObject* oldChild) | 310 void RenderBlock::removeChild(RenderObject* oldChild) |
| 336 { | 311 { |
| 337 RenderBox::removeChild(oldChild); | 312 RenderBox::removeChild(oldChild); |
| 338 | 313 |
| 339 // No need to waste time deleting the line box tree if we're getting destroy
ed. | 314 // No need to waste time deleting the line box tree if we're getting destroy
ed. |
| 340 if (documentBeingDestroyed()) | 315 if (documentBeingDestroyed()) |
| 341 return; | 316 return; |
| 342 | 317 |
| 343 // If this was our last child be sure to clear out our line boxes. | 318 // If this was our last child be sure to clear out our line boxes. |
| 344 if (!firstChild() && childrenInline()) | 319 if (!firstChild() && childrenInline()) |
| (...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2209 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 2184 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
| 2210 { | 2185 { |
| 2211 showRenderObject(); | 2186 showRenderObject(); |
| 2212 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2187 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 2213 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2188 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 2214 } | 2189 } |
| 2215 | 2190 |
| 2216 #endif | 2191 #endif |
| 2217 | 2192 |
| 2218 } // namespace blink | 2193 } // namespace blink |
| OLD | NEW |