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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. |
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
948 bool LayoutBox::needsPreferredWidthsRecalculation() const | 948 bool LayoutBox::needsPreferredWidthsRecalculation() const |
949 { | 949 { |
950 return style()->paddingStart().hasPercent() || style()->paddingEnd().hasPerc ent(); | 950 return style()->paddingStart().hasPercent() || style()->paddingEnd().hasPerc ent(); |
951 } | 951 } |
952 | 952 |
953 IntSize LayoutBox::scrolledContentOffset() const | 953 IntSize LayoutBox::scrolledContentOffset() const |
954 { | 954 { |
955 ASSERT(hasOverflowClip()); | 955 ASSERT(hasOverflowClip()); |
956 ASSERT(hasLayer()); | 956 ASSERT(hasLayer()); |
957 // FIXME: Return DoubleSize here. crbug.com/414283. | 957 // FIXME: Return DoubleSize here. crbug.com/414283. |
958 return flooredIntSize(getScrollableArea()->scrollOffset()); | 958 PaintLayerScrollableArea* scrollableArea = getScrollableArea(); |
959 IntSize result = flooredIntSize(scrollableArea->scrollOffset()) + scrollable Area->originAdjustmentForScrollbars(); | |
960 if (isHorizontalWritingMode() && shouldPlaceBlockDirectionScrollbarOnLogical Left()) | |
leviw_travelin_and_unemployed
2016/04/28 22:12:12
Probably deserves a comment.
| |
961 result.expand(-verticalScrollbarWidth(), 0); | |
962 return result; | |
959 } | 963 } |
960 | 964 |
961 bool LayoutBox::mapScrollingContentsRectToBoxSpace(LayoutRect& rect, ApplyOverfl owClipFlag applyOverflowClip, VisualRectFlags visualRectFlags) const | 965 bool LayoutBox::mapScrollingContentsRectToBoxSpace(LayoutRect& rect, ApplyOverfl owClipFlag applyOverflowClip, VisualRectFlags visualRectFlags) const |
962 { | 966 { |
963 if (!hasOverflowClip()) | 967 if (!hasOverflowClip()) |
964 return true; | 968 return true; |
965 | 969 |
966 LayoutSize offset = LayoutSize(-scrolledContentOffset()); | 970 LayoutSize offset = LayoutSize(-scrolledContentOffset()); |
967 if (UNLIKELY(hasFlippedBlocksWritingMode())) | 971 if (UNLIKELY(hasFlippedBlocksWritingMode())) |
968 offset.setWidth(-offset.width()); | 972 offset.setWidth(-offset.width()); |
(...skipping 3761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4730 | 4734 |
4731 void LayoutBox::clearPercentHeightDescendants() | 4735 void LayoutBox::clearPercentHeightDescendants() |
4732 { | 4736 { |
4733 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde r(this)) { | 4737 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde r(this)) { |
4734 if (curr->isBox()) | 4738 if (curr->isBox()) |
4735 toLayoutBox(curr)->removeFromPercentHeightContainer(); | 4739 toLayoutBox(curr)->removeFromPercentHeightContainer(); |
4736 } | 4740 } |
4737 } | 4741 } |
4738 | 4742 |
4739 } // namespace blink | 4743 } // namespace blink |
OLD | NEW |