| 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 } | 370 } |
| 371 setHasOverflowClip(shouldClipOverflow); | 371 setHasOverflowClip(shouldClipOverflow); |
| 372 } | 372 } |
| 373 | 373 |
| 374 bool LayoutBlock::allowsOverflowClip() const | 374 bool LayoutBlock::allowsOverflowClip() const |
| 375 { | 375 { |
| 376 // If overflow has been propagated to the viewport, it has no effect here. | 376 // If overflow has been propagated to the viewport, it has no effect here. |
| 377 return node() != document().viewportDefiningElement(); | 377 return node() != document().viewportDefiningElement(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 void LayoutBlock::addChildIgnoringContinuation(LayoutObject* newChild, LayoutObj
ect* beforeChild) | 380 void LayoutBlock::addChild(LayoutObject* newChild, LayoutObject* beforeChild) |
| 381 { | 381 { |
| 382 if (beforeChild && beforeChild->parent() != this) { | 382 if (beforeChild && beforeChild->parent() != this) { |
| 383 LayoutObject* beforeChildContainer = beforeChild->parent(); | 383 LayoutObject* beforeChildContainer = beforeChild->parent(); |
| 384 while (beforeChildContainer->parent() != this) | 384 while (beforeChildContainer->parent() != this) |
| 385 beforeChildContainer = beforeChildContainer->parent(); | 385 beforeChildContainer = beforeChildContainer->parent(); |
| 386 ASSERT(beforeChildContainer); | 386 ASSERT(beforeChildContainer); |
| 387 | 387 |
| 388 if (beforeChildContainer->isAnonymous()) { | 388 if (beforeChildContainer->isAnonymous()) { |
| 389 // If the requested beforeChild is not one of our children, then thi
s is because | 389 // If the requested beforeChild is not one of our children, then thi
s is because |
| 390 // there is an anonymous container within this object that contains
the beforeChild. | 390 // there is an anonymous container within this object that contains
the beforeChild. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 } | 458 } |
| 459 } | 459 } |
| 460 | 460 |
| 461 LayoutBox::addChild(newChild, beforeChild); | 461 LayoutBox::addChild(newChild, beforeChild); |
| 462 | 462 |
| 463 if (madeBoxesNonInline && parent() && isAnonymousBlock() && parent()->isLayo
utBlock()) | 463 if (madeBoxesNonInline && parent() && isAnonymousBlock() && parent()->isLayo
utBlock()) |
| 464 toLayoutBlock(parent())->removeLeftoverAnonymousBlock(this); | 464 toLayoutBlock(parent())->removeLeftoverAnonymousBlock(this); |
| 465 // this object may be dead here | 465 // this object may be dead here |
| 466 } | 466 } |
| 467 | 467 |
| 468 void LayoutBlock::addChild(LayoutObject* newChild, LayoutObject* beforeChild) | |
| 469 { | |
| 470 addChildIgnoringContinuation(newChild, beforeChild); | |
| 471 } | |
| 472 | |
| 473 static void getInlineRun(LayoutObject* start, LayoutObject* boundary, | 468 static void getInlineRun(LayoutObject* start, LayoutObject* boundary, |
| 474 LayoutObject*& inlineRunStart, | 469 LayoutObject*& inlineRunStart, |
| 475 LayoutObject*& inlineRunEnd) | 470 LayoutObject*& inlineRunEnd) |
| 476 { | 471 { |
| 477 // Beginning at |start| we find the largest contiguous run of inlines that | 472 // Beginning at |start| we find the largest contiguous run of inlines that |
| 478 // we can. We denote the run with start and end points, |inlineRunStart| | 473 // we can. We denote the run with start and end points, |inlineRunStart| |
| 479 // and |inlineRunEnd|. Note that these two values may be the same if | 474 // and |inlineRunEnd|. Note that these two values may be the same if |
| 480 // we encounter only one inline. | 475 // we encounter only one inline. |
| 481 // | 476 // |
| 482 // We skip any non-inlines we encounter as long as we haven't found any | 477 // We skip any non-inlines we encounter as long as we haven't found any |
| (...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2266 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda
ntSet->begin(); it != end; ++it) { | 2261 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda
ntSet->begin(); it != end; ++it) { |
| 2267 LayoutBox* currBox = *it; | 2262 LayoutBox* currBox = *it; |
| 2268 ASSERT(!currBox->needsLayout()); | 2263 ASSERT(!currBox->needsLayout()); |
| 2269 } | 2264 } |
| 2270 } | 2265 } |
| 2271 } | 2266 } |
| 2272 | 2267 |
| 2273 #endif | 2268 #endif |
| 2274 | 2269 |
| 2275 } // namespace blink | 2270 } // namespace blink |
| OLD | NEW |