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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 void LayoutBlock::startDelayUpdateScrollInfo() | 830 void LayoutBlock::startDelayUpdateScrollInfo() |
831 { | 831 { |
832 if (gDelayUpdateScrollInfo == 0) { | 832 if (gDelayUpdateScrollInfo == 0) { |
833 ASSERT(!gDelayedUpdateScrollInfoSet); | 833 ASSERT(!gDelayedUpdateScrollInfoSet); |
834 gDelayedUpdateScrollInfoSet = new DelayedUpdateScrollInfoSet; | 834 gDelayedUpdateScrollInfoSet = new DelayedUpdateScrollInfoSet; |
835 } | 835 } |
836 ASSERT(gDelayedUpdateScrollInfoSet); | 836 ASSERT(gDelayedUpdateScrollInfoSet); |
837 ++gDelayUpdateScrollInfo; | 837 ++gDelayUpdateScrollInfo; |
838 } | 838 } |
839 | 839 |
840 void LayoutBlock::finishDelayUpdateScrollInfo() | 840 bool LayoutBlock::finishDelayUpdateScrollInfo(SubtreeLayoutScope* layoutScope) |
841 { | 841 { |
| 842 bool childrenMarkedForRelayout = false; |
| 843 |
842 --gDelayUpdateScrollInfo; | 844 --gDelayUpdateScrollInfo; |
843 ASSERT(gDelayUpdateScrollInfo >= 0); | 845 ASSERT(gDelayUpdateScrollInfo >= 0); |
844 if (gDelayUpdateScrollInfo == 0) { | 846 if (gDelayUpdateScrollInfo == 0) { |
845 ASSERT(gDelayedUpdateScrollInfoSet); | 847 ASSERT(gDelayedUpdateScrollInfoSet); |
846 | 848 |
847 OwnPtr<DelayedUpdateScrollInfoSet> infoSet(adoptPtr(gDelayedUpdateScroll
InfoSet)); | 849 OwnPtr<DelayedUpdateScrollInfoSet> infoSet(adoptPtr(gDelayedUpdateScroll
InfoSet)); |
848 gDelayedUpdateScrollInfoSet = nullptr; | 850 gDelayedUpdateScrollInfoSet = nullptr; |
849 | 851 |
850 for (auto* block : *infoSet) { | 852 for (auto* block : *infoSet) { |
851 if (block->hasOverflowClip()) { | 853 if (block->hasOverflowClip()) { |
852 block->layer()->scrollableArea()->updateAfterLayout(); | 854 childrenMarkedForRelayout |= block->layer()->scrollableArea()->u
pdateAfterLayout(layoutScope); |
853 } | 855 } |
854 } | 856 } |
855 } | 857 } |
| 858 return childrenMarkedForRelayout; |
856 } | 859 } |
857 | 860 |
858 void LayoutBlock::updateScrollInfoAfterLayout() | 861 void LayoutBlock::updateScrollInfoAfterLayout() |
859 { | 862 { |
860 if (hasOverflowClip()) { | 863 if (hasOverflowClip()) { |
861 if (style()->isFlippedBlocksWritingMode()) { | 864 if (style()->isFlippedBlocksWritingMode()) { |
862 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=97937 | 865 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=97937 |
863 // Workaround for now. We cannot delay the scroll info for overflow | 866 // Workaround for now. We cannot delay the scroll info for overflow |
864 // for items with opposite writing directions, as the contents needs | 867 // for items with opposite writing directions, as the contents needs |
865 // to overflow in that direction | 868 // to overflow in that direction |
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2862 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const | 2865 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const |
2863 { | 2866 { |
2864 showLayoutObject(); | 2867 showLayoutObject(); |
2865 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2868 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
2866 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2869 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
2867 } | 2870 } |
2868 | 2871 |
2869 #endif | 2872 #endif |
2870 | 2873 |
2871 } // namespace blink | 2874 } // namespace blink |
OLD | NEW |