| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 // This map keeps track of the descendants whose 'height' is percentage associat
ed | 103 // This map keeps track of the descendants whose 'height' is percentage associat
ed |
| 104 // with a containing block. Like |gPositionedDescendantsMap|, it is also recompu
ted | 104 // with a containing block. Like |gPositionedDescendantsMap|, it is also recompu
ted |
| 105 // for every layout (see the comment above about why). | 105 // for every layout (see the comment above about why). |
| 106 static TrackedDescendantsMap* gPercentHeightDescendantsMap = nullptr; | 106 static TrackedDescendantsMap* gPercentHeightDescendantsMap = nullptr; |
| 107 | 107 |
| 108 static TrackedContainerMap* gPositionedContainerMap = nullptr; | 108 static TrackedContainerMap* gPositionedContainerMap = nullptr; |
| 109 static TrackedContainerMap* gPercentHeightContainerMap = nullptr; | 109 static TrackedContainerMap* gPercentHeightContainerMap = nullptr; |
| 110 | 110 |
| 111 struct ScrollInfo { | 111 struct ScrollInfo { |
| 112 ScrollInfo() : autoHorizontalScrollBarChanged(false), autoVerticalScrollBarC
hanged(false) {} |
| 112 DoubleSize scrollOffset; | 113 DoubleSize scrollOffset; |
| 113 bool autoHorizontalScrollBarChanged; | 114 bool autoHorizontalScrollBarChanged; |
| 114 bool autoVerticalScrollBarChanged; | 115 bool autoVerticalScrollBarChanged; |
| 115 bool hasOffset() const { return scrollOffset != DoubleSize(); } | 116 bool hasOffset() const { return scrollOffset != DoubleSize(); } |
| 116 bool scrollBarsChanged() const { return autoHorizontalScrollBarChanged || au
toVerticalScrollBarChanged; } | 117 bool scrollBarsChanged() const { return autoHorizontalScrollBarChanged || au
toVerticalScrollBarChanged; } |
| 117 void merge(const ScrollInfo& other) | 118 void merge(const ScrollInfo& other) |
| 118 { | 119 { |
| 119 // We always keep the first scrollOffset we saw for this block, so don't
copy that field. | 120 // We always keep the first scrollOffset we saw for this block, so don't
copy that field. |
| 120 autoHorizontalScrollBarChanged |= other.autoHorizontalScrollBarChanged; | 121 autoHorizontalScrollBarChanged |= other.autoHorizontalScrollBarChanged; |
| 121 autoVerticalScrollBarChanged |= other.autoVerticalScrollBarChanged; | 122 autoVerticalScrollBarChanged |= other.autoVerticalScrollBarChanged; |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 if (gDelayUpdateScrollInfo == 0) { | 857 if (gDelayUpdateScrollInfo == 0) { |
| 857 ASSERT(gDelayedUpdateScrollInfoMap); | 858 ASSERT(gDelayedUpdateScrollInfoMap); |
| 858 | 859 |
| 859 OwnPtr<DelayedUpdateScrollInfoMap> infoMap(adoptPtr(gDelayedUpdateScroll
InfoMap)); | 860 OwnPtr<DelayedUpdateScrollInfoMap> infoMap(adoptPtr(gDelayedUpdateScroll
InfoMap)); |
| 860 gDelayedUpdateScrollInfoMap = nullptr; | 861 gDelayedUpdateScrollInfoMap = nullptr; |
| 861 | 862 |
| 862 for (auto block : *infoMap) { | 863 for (auto block : *infoMap) { |
| 863 if (block.key->hasOverflowClip()) { | 864 if (block.key->hasOverflowClip()) { |
| 864 PaintLayerScrollableArea* scrollableArea = block.key->layer()->s
crollableArea(); | 865 PaintLayerScrollableArea* scrollableArea = block.key->layer()->s
crollableArea(); |
| 865 ScrollInfo& scrollInfo = block.value; | 866 ScrollInfo& scrollInfo = block.value; |
| 867 scrollableArea->updateScrollDimensions(scrollInfo.scrollOffset,
scrollInfo.autoHorizontalScrollBarChanged, scrollInfo.autoVerticalScrollBarChang
ed); |
| 866 scrollableArea->finalizeScrollDimensions(scrollInfo.scrollOffset
, scrollInfo.autoHorizontalScrollBarChanged, scrollInfo.autoVerticalScrollBarCha
nged); | 868 scrollableArea->finalizeScrollDimensions(scrollInfo.scrollOffset
, scrollInfo.autoHorizontalScrollBarChanged, scrollInfo.autoVerticalScrollBarCha
nged); |
| 867 } | 869 } |
| 868 } | 870 } |
| 869 } | 871 } |
| 870 } | 872 } |
| 871 | 873 |
| 872 void LayoutBlock::updateScrollInfoAfterLayout() | 874 void LayoutBlock::updateScrollInfoAfterLayout() |
| 873 { | 875 { |
| 874 if (hasOverflowClip()) { | 876 if (hasOverflowClip()) { |
| 875 if (style()->isFlippedBlocksWritingMode()) { | 877 if (style()->isFlippedBlocksWritingMode()) { |
| (...skipping 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2889 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const | 2891 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const |
| 2890 { | 2892 { |
| 2891 showLayoutObject(); | 2893 showLayoutObject(); |
| 2892 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2894 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 2893 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2895 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 2894 } | 2896 } |
| 2895 | 2897 |
| 2896 #endif | 2898 #endif |
| 2897 | 2899 |
| 2898 } // namespace blink | 2900 } // namespace blink |
| OLD | NEW |