| 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 } | 367 } |
| 368 beforeChildParent->addChildIgnoringContinuation(newChild, beforeChild); | 368 beforeChildParent->addChildIgnoringContinuation(newChild, beforeChild); |
| 369 } | 369 } |
| 370 | 370 |
| 371 | 371 |
| 372 void RenderBlock::addChildToAnonymousColumnBlocks(RenderObject* newChild, Render
Object* beforeChild) | 372 void RenderBlock::addChildToAnonymousColumnBlocks(RenderObject* newChild, Render
Object* beforeChild) |
| 373 { | 373 { |
| 374 ASSERT(!continuation()); // We don't yet support column spans that aren't im
mediate children of the multi-column block. | 374 ASSERT(!continuation()); // We don't yet support column spans that aren't im
mediate children of the multi-column block. |
| 375 | 375 |
| 376 // The goal is to locate a suitable box in which to place our child. | 376 // The goal is to locate a suitable box in which to place our child. |
| 377 RenderBlock* beforeChildParent = toRenderBlock(beforeChild && beforeChild->p
arent()->isRenderBlock() ? beforeChild->parent() : lastChild()); | 377 RenderBlock* beforeChildParent = 0; |
| 378 | 378 if (beforeChild) { |
| 379 RenderObject* curr = beforeChild; |
| 380 while (curr && curr->parent() != this) |
| 381 curr = curr->parent(); |
| 382 beforeChildParent = toRenderBlock(curr); |
| 383 ASSERT(beforeChildParent); |
| 384 ASSERT(beforeChildParent->isAnonymousColumnsBlock() || beforeChildParent
->isAnonymousColumnSpanBlock()); |
| 385 } else |
| 386 beforeChildParent = toRenderBlock(lastChild()); |
| 387 |
| 379 // If the new child is floating or positioned it can just go in that block. | 388 // If the new child is floating or positioned it can just go in that block. |
| 380 if (newChild->isFloatingOrPositioned()) { | 389 if (newChild->isFloatingOrPositioned()) { |
| 381 beforeChildParent->addChildIgnoringAnonymousColumnBlocks(newChild, befor
eChild); | 390 beforeChildParent->addChildIgnoringAnonymousColumnBlocks(newChild, befor
eChild); |
| 382 return; | 391 return; |
| 383 } | 392 } |
| 384 | 393 |
| 385 // See if the child can be placed in the box. | 394 // See if the child can be placed in the box. |
| 386 bool newChildHasColumnSpan = newChild->style()->columnSpan() && !newChild->i
sInline(); | 395 bool newChildHasColumnSpan = newChild->style()->columnSpan() && !newChild->i
sInline(); |
| 387 bool beforeChildParentHoldsColumnSpans = beforeChildParent->isAnonymousColum
nSpanBlock(); | 396 bool beforeChildParentHoldsColumnSpans = beforeChildParent->isAnonymousColum
nSpanBlock(); |
| 388 | 397 |
| (...skipping 6789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7178 } | 7187 } |
| 7179 | 7188 |
| 7180 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) | 7189 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) |
| 7181 { | 7190 { |
| 7182 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); | 7191 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); |
| 7183 } | 7192 } |
| 7184 | 7193 |
| 7185 #endif | 7194 #endif |
| 7186 | 7195 |
| 7187 } // namespace WebCore | 7196 } // namespace WebCore |
| OLD | NEW |