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 3791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3802 if (renderer->isOutOfFlowPositioned() || !renderer->needsOverflowRecalcAfter
StyleChange()) | 3802 if (renderer->isOutOfFlowPositioned() || !renderer->needsOverflowRecalcAfter
StyleChange()) |
3803 return false; | 3803 return false; |
3804 | 3804 |
3805 ASSERT(renderer->isRenderBlock()); | 3805 ASSERT(renderer->isRenderBlock()); |
3806 return toRenderBlock(renderer)->recalcOverflowAfterStyleChange(); | 3806 return toRenderBlock(renderer)->recalcOverflowAfterStyleChange(); |
3807 } | 3807 } |
3808 | 3808 |
3809 bool RenderBlock::recalcChildOverflowAfterStyleChange() | 3809 bool RenderBlock::recalcChildOverflowAfterStyleChange() |
3810 { | 3810 { |
3811 ASSERT(childNeedsOverflowRecalcAfterStyleChange()); | 3811 ASSERT(childNeedsOverflowRecalcAfterStyleChange()); |
3812 setChildNeedsOverflowRecalcAfterStyleChange(false); | 3812 clearChildNeedsOverflowRecalcAfterStyleChange(); |
3813 | 3813 |
3814 bool childrenOverflowChanged = false; | 3814 bool childrenOverflowChanged = false; |
3815 | 3815 |
3816 if (childrenInline()) { | 3816 if (childrenInline()) { |
3817 ListHashSet<RootInlineBox*> lineBoxes; | 3817 ListHashSet<RootInlineBox*> lineBoxes; |
3818 for (InlineWalker walker(this); !walker.atEnd(); walker.advance()) { | 3818 for (InlineWalker walker(this); !walker.atEnd(); walker.advance()) { |
3819 RenderObject* renderer = walker.current(); | 3819 RenderObject* renderer = walker.current(); |
3820 if (recalcNormalFlowChildOverflowIfNeeded(renderer)) { | 3820 if (recalcNormalFlowChildOverflowIfNeeded(renderer)) { |
3821 childrenOverflowChanged = true; | 3821 childrenOverflowChanged = true; |
3822 if (InlineBox* inlineBoxWrapper = toRenderBlock(renderer)->inlin
eBoxWrapper()) | 3822 if (InlineBox* inlineBoxWrapper = toRenderBlock(renderer)->inlin
eBoxWrapper()) |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3860 { | 3860 { |
3861 ASSERT(needsOverflowRecalcAfterStyleChange()); | 3861 ASSERT(needsOverflowRecalcAfterStyleChange()); |
3862 | 3862 |
3863 bool childrenOverflowChanged = false; | 3863 bool childrenOverflowChanged = false; |
3864 if (childNeedsOverflowRecalcAfterStyleChange()) | 3864 if (childNeedsOverflowRecalcAfterStyleChange()) |
3865 childrenOverflowChanged = recalcChildOverflowAfterStyleChange(); | 3865 childrenOverflowChanged = recalcChildOverflowAfterStyleChange(); |
3866 | 3866 |
3867 if (!selfNeedsOverflowRecalcAfterStyleChange() && !childrenOverflowChanged) | 3867 if (!selfNeedsOverflowRecalcAfterStyleChange() && !childrenOverflowChanged) |
3868 return false; | 3868 return false; |
3869 | 3869 |
3870 setSelfNeedsOverflowRecalcAfterStyleChange(false); | 3870 clearSelfNeedsOverflowRecalcAfterStyleChange(); |
3871 // If the current block needs layout, overflow will be recalculated during | 3871 // If the current block needs layout, overflow will be recalculated during |
3872 // layout time anyway. We can safely exit here. | 3872 // layout time anyway. We can safely exit here. |
3873 if (needsLayout()) | 3873 if (needsLayout()) |
3874 return false; | 3874 return false; |
3875 | 3875 |
3876 LayoutUnit oldClientAfterEdge = hasRenderOverflow() ? m_overflow->layoutClie
ntAfterEdge() : clientLogicalBottom(); | 3876 LayoutUnit oldClientAfterEdge = hasRenderOverflow() ? m_overflow->layoutClie
ntAfterEdge() : clientLogicalBottom(); |
3877 computeOverflow(oldClientAfterEdge, true); | 3877 computeOverflow(oldClientAfterEdge, true); |
3878 | 3878 |
3879 if (hasOverflowClip()) | 3879 if (hasOverflowClip()) |
3880 layer()->scrollableArea()->updateAfterOverflowRecalc(); | 3880 layer()->scrollableArea()->updateAfterOverflowRecalc(); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3917 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 3917 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
3918 { | 3918 { |
3919 showRenderObject(); | 3919 showRenderObject(); |
3920 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 3920 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
3921 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 3921 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
3922 } | 3922 } |
3923 | 3923 |
3924 #endif | 3924 #endif |
3925 | 3925 |
3926 } // namespace blink | 3926 } // namespace blink |
OLD | NEW |