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