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 2577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2588 if (!child->avoidsFloats() && childRenderBlock->containsFloats()) | 2588 if (!child->avoidsFloats() && childRenderBlock->containsFloats()) |
2589 childRenderBlock->markAllDescendantsWithFloatsForLayout(); | 2589 childRenderBlock->markAllDescendantsWithFloatsForLayout(); |
2590 if (!child->needsLayout()) | 2590 if (!child->needsLayout()) |
2591 child->markForPaginationRelayoutIfNeeded(); | 2591 child->markForPaginationRelayoutIfNeeded(); |
2592 } | 2592 } |
2593 | 2593 |
2594 // Our guess was wrong. Make the child lay itself out again. | 2594 // Our guess was wrong. Make the child lay itself out again. |
2595 child->layoutIfNeeded(); | 2595 child->layoutIfNeeded(); |
2596 } | 2596 } |
2597 | 2597 |
2598 // Dialog requires special positioning and must lay itself out. | |
2599 if (child->isDialog()) { | |
2600 child->setNeedsLayout(true); | |
2601 child->layout(); | |
2602 } | |
2603 | |
2598 // We are no longer at the top of the block if we encounter a non-empty chil d. | 2604 // We are no longer at the top of the block if we encounter a non-empty chil d. |
2599 // This has to be done after checking for clear, so that margins can be rese t if a clear occurred. | 2605 // This has to be done after checking for clear, so that margins can be rese t if a clear occurred. |
2600 if (marginInfo.atBeforeSideOfBlock() && !child->isSelfCollapsingBlock()) | 2606 if (marginInfo.atBeforeSideOfBlock() && !child->isSelfCollapsingBlock()) |
2601 marginInfo.setAtBeforeSideOfBlock(false); | 2607 marginInfo.setAtBeforeSideOfBlock(false); |
2602 | 2608 |
2603 // Now place the child in the correct left position | 2609 // Now place the child in the correct left position |
2604 determineLogicalLeftPositionForChild(child, ApplyLayoutDelta); | 2610 determineLogicalLeftPositionForChild(child, ApplyLayoutDelta); |
2605 | 2611 |
2606 // Update our height now that the child has been placed in the correct posit ion. | 2612 // Update our height now that the child has been placed in the correct posit ion. |
2607 setLogicalHeight(logicalHeight() + logicalHeightForChild(child)); | 2613 setLogicalHeight(logicalHeight() + logicalHeightForChild(child)); |
(...skipping 22 matching lines...) Expand all Loading... | |
2630 child->repaintOverhangingFloats(true); | 2636 child->repaintOverhangingFloats(true); |
2631 } | 2637 } |
2632 | 2638 |
2633 if (paginated) { | 2639 if (paginated) { |
2634 // Check for an after page/column break. | 2640 // Check for an after page/column break. |
2635 LayoutUnit newHeight = applyAfterBreak(child, logicalHeight(), marginInf o); | 2641 LayoutUnit newHeight = applyAfterBreak(child, logicalHeight(), marginInf o); |
2636 if (newHeight != height()) | 2642 if (newHeight != height()) |
2637 setLogicalHeight(newHeight); | 2643 setLogicalHeight(newHeight); |
2638 } | 2644 } |
2639 | 2645 |
2640 ASSERT(view()->layoutDeltaMatches(oldLayoutDelta)); | 2646 if (!view()->layoutDeltaMatches(oldLayoutDelta)) { |
falken
2013/04/09 10:35:51
Unfortunately this ASSERT gets tripped even with t
| |
2647 fprintf(stderr, "layout delta doesn't match\n"); | |
2648 } | |
2641 } | 2649 } |
2642 | 2650 |
2643 void RenderBlock::simplifiedNormalFlowLayout() | 2651 void RenderBlock::simplifiedNormalFlowLayout() |
2644 { | 2652 { |
2645 if (childrenInline()) { | 2653 if (childrenInline()) { |
2646 ListHashSet<RootInlineBox*> lineBoxes; | 2654 ListHashSet<RootInlineBox*> lineBoxes; |
2647 for (InlineWalker walker(this); !walker.atEnd(); walker.advance()) { | 2655 for (InlineWalker walker(this); !walker.atEnd(); walker.advance()) { |
2648 RenderObject* o = walker.current(); | 2656 RenderObject* o = walker.current(); |
2649 if (!o->isOutOfFlowPositioned() && (o->isReplaced() || o->isFloating ())) { | 2657 if (!o->isOutOfFlowPositioned() && (o->isReplaced() || o->isFloating ())) { |
2650 o->layoutIfNeeded(); | 2658 o->layoutIfNeeded(); |
(...skipping 5456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8107 { | 8115 { |
8108 memoryInstrumentation->addRootObject(gColumnInfoMap, WebCoreMemoryTypes::Ren deringStructures); | 8116 memoryInstrumentation->addRootObject(gColumnInfoMap, WebCoreMemoryTypes::Ren deringStructures); |
8109 memoryInstrumentation->addRootObject(gPositionedDescendantsMap, WebCoreMemor yTypes::RenderingStructures); | 8117 memoryInstrumentation->addRootObject(gPositionedDescendantsMap, WebCoreMemor yTypes::RenderingStructures); |
8110 memoryInstrumentation->addRootObject(gPercentHeightDescendantsMap, WebCoreMe moryTypes::RenderingStructures); | 8118 memoryInstrumentation->addRootObject(gPercentHeightDescendantsMap, WebCoreMe moryTypes::RenderingStructures); |
8111 memoryInstrumentation->addRootObject(gPositionedContainerMap, WebCoreMemoryT ypes::RenderingStructures); | 8119 memoryInstrumentation->addRootObject(gPositionedContainerMap, WebCoreMemoryT ypes::RenderingStructures); |
8112 memoryInstrumentation->addRootObject(gPercentHeightContainerMap, WebCoreMemo ryTypes::RenderingStructures); | 8120 memoryInstrumentation->addRootObject(gPercentHeightContainerMap, WebCoreMemo ryTypes::RenderingStructures); |
8113 memoryInstrumentation->addRootObject(gDelayedUpdateScrollInfoSet, WebCoreMem oryTypes::RenderingStructures); | 8121 memoryInstrumentation->addRootObject(gDelayedUpdateScrollInfoSet, WebCoreMem oryTypes::RenderingStructures); |
8114 } | 8122 } |
8115 | 8123 |
8116 } // namespace WebCore | 8124 } // namespace WebCore |
OLD | NEW |