| 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 2770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2781 if (layoutObject->isOutOfFlowPositioned() || !layoutObject->needsOverflowRec
alcAfterStyleChange()) | 2781 if (layoutObject->isOutOfFlowPositioned() || !layoutObject->needsOverflowRec
alcAfterStyleChange()) |
| 2782 return false; | 2782 return false; |
| 2783 | 2783 |
| 2784 ASSERT(layoutObject->isLayoutBlock()); | 2784 ASSERT(layoutObject->isLayoutBlock()); |
| 2785 return toLayoutBlock(layoutObject)->recalcOverflowAfterStyleChange(); | 2785 return toLayoutBlock(layoutObject)->recalcOverflowAfterStyleChange(); |
| 2786 } | 2786 } |
| 2787 | 2787 |
| 2788 bool LayoutBlock::recalcChildOverflowAfterStyleChange() | 2788 bool LayoutBlock::recalcChildOverflowAfterStyleChange() |
| 2789 { | 2789 { |
| 2790 ASSERT(childNeedsOverflowRecalcAfterStyleChange()); | 2790 ASSERT(childNeedsOverflowRecalcAfterStyleChange()); |
| 2791 setChildNeedsOverflowRecalcAfterStyleChange(false); | 2791 clearChildNeedsOverflowRecalcAfterStyleChange(); |
| 2792 | 2792 |
| 2793 bool childrenOverflowChanged = false; | 2793 bool childrenOverflowChanged = false; |
| 2794 | 2794 |
| 2795 if (childrenInline()) { | 2795 if (childrenInline()) { |
| 2796 ListHashSet<RootInlineBox*> lineBoxes; | 2796 ListHashSet<RootInlineBox*> lineBoxes; |
| 2797 ASSERT_WITH_SECURITY_IMPLICATION(isLayoutBlockFlow()); | 2797 ASSERT_WITH_SECURITY_IMPLICATION(isLayoutBlockFlow()); |
| 2798 for (InlineWalker walker(toLayoutBlockFlow(this)); !walker.atEnd(); walk
er.advance()) { | 2798 for (InlineWalker walker(toLayoutBlockFlow(this)); !walker.atEnd(); walk
er.advance()) { |
| 2799 LayoutObject* layoutObject = walker.current(); | 2799 LayoutObject* layoutObject = walker.current(); |
| 2800 if (recalcNormalFlowChildOverflowIfNeeded(layoutObject)) { | 2800 if (recalcNormalFlowChildOverflowIfNeeded(layoutObject)) { |
| 2801 childrenOverflowChanged = true; | 2801 childrenOverflowChanged = true; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2837 { | 2837 { |
| 2838 ASSERT(needsOverflowRecalcAfterStyleChange()); | 2838 ASSERT(needsOverflowRecalcAfterStyleChange()); |
| 2839 | 2839 |
| 2840 bool childrenOverflowChanged = false; | 2840 bool childrenOverflowChanged = false; |
| 2841 if (childNeedsOverflowRecalcAfterStyleChange()) | 2841 if (childNeedsOverflowRecalcAfterStyleChange()) |
| 2842 childrenOverflowChanged = recalcChildOverflowAfterStyleChange(); | 2842 childrenOverflowChanged = recalcChildOverflowAfterStyleChange(); |
| 2843 | 2843 |
| 2844 if (!selfNeedsOverflowRecalcAfterStyleChange() && !childrenOverflowChanged) | 2844 if (!selfNeedsOverflowRecalcAfterStyleChange() && !childrenOverflowChanged) |
| 2845 return false; | 2845 return false; |
| 2846 | 2846 |
| 2847 setSelfNeedsOverflowRecalcAfterStyleChange(false); | 2847 clearSelfNeedsOverflowRecalcAfterStyleChange(); |
| 2848 // If the current block needs layout, overflow will be recalculated during | 2848 // If the current block needs layout, overflow will be recalculated during |
| 2849 // layout time anyway. We can safely exit here. | 2849 // layout time anyway. We can safely exit here. |
| 2850 if (needsLayout()) | 2850 if (needsLayout()) |
| 2851 return false; | 2851 return false; |
| 2852 | 2852 |
| 2853 LayoutUnit oldClientAfterEdge = hasOverflowModel() ? m_overflow->layoutClien
tAfterEdge() : clientLogicalBottom(); | 2853 LayoutUnit oldClientAfterEdge = hasOverflowModel() ? m_overflow->layoutClien
tAfterEdge() : clientLogicalBottom(); |
| 2854 computeOverflow(oldClientAfterEdge); | 2854 computeOverflow(oldClientAfterEdge); |
| 2855 | 2855 |
| 2856 if (hasOverflowClip()) | 2856 if (hasOverflowClip()) |
| 2857 layer()->scrollableArea()->updateAfterOverflowRecalc(); | 2857 layer()->scrollableArea()->updateAfterOverflowRecalc(); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2928 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const | 2928 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const |
| 2929 { | 2929 { |
| 2930 showLayoutObject(); | 2930 showLayoutObject(); |
| 2931 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2931 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 2932 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2932 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 2933 } | 2933 } |
| 2934 | 2934 |
| 2935 #endif | 2935 #endif |
| 2936 | 2936 |
| 2937 } // namespace blink | 2937 } // namespace blink |
| OLD | NEW |