| 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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 } | 761 } |
| 762 | 762 |
| 763 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { | 763 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { |
| 764 // Even with OSCROLL, the scrollbar may not exist (crbug.com/415031). | 764 // Even with OSCROLL, the scrollbar may not exist (crbug.com/415031). |
| 765 return scrollableArea()->hasHorizontalScrollbar() ? horizontalScrollbarH
eight() : 0; | 765 return scrollableArea()->hasHorizontalScrollbar() ? horizontalScrollbarH
eight() : 0; |
| 766 } | 766 } |
| 767 | 767 |
| 768 return 0; | 768 return 0; |
| 769 } | 769 } |
| 770 | 770 |
| 771 ScrollResultOneDimensional LayoutBox::scroll(ScrollDirectionPhysical direction,
ScrollGranularity granularity, float delta) | 771 ScrollResult LayoutBox::scroll(ScrollGranularity granularity, const FloatSize& d
elta) |
| 772 { | 772 { |
| 773 // Presumably the same issue as in setScrollTop. See crbug.com/343132. | 773 // Presumably the same issue as in setScrollTop. See crbug.com/343132. |
| 774 DisableCompositingQueryAsserts disabler; | 774 DisableCompositingQueryAsserts disabler; |
| 775 | 775 |
| 776 if (!scrollableArea()) | 776 if (!scrollableArea()) |
| 777 return ScrollResultOneDimensional(false); | 777 return ScrollResult(); |
| 778 | 778 |
| 779 return scrollableArea()->userScroll(direction, granularity, delta); | 779 return scrollableArea()->userScroll(granularity, delta); |
| 780 } | 780 } |
| 781 | 781 |
| 782 bool LayoutBox::canBeScrolledAndHasScrollableArea() const | 782 bool LayoutBox::canBeScrolledAndHasScrollableArea() const |
| 783 { | 783 { |
| 784 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe
lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth()
); | 784 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe
lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth()
); |
| 785 } | 785 } |
| 786 | 786 |
| 787 bool LayoutBox::canBeProgramaticallyScrolled() const | 787 bool LayoutBox::canBeProgramaticallyScrolled() const |
| 788 { | 788 { |
| 789 Node* node = this->node(); | 789 Node* node = this->node(); |
| (...skipping 3876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4666 } | 4666 } |
| 4667 | 4667 |
| 4668 void LayoutBox::IntrinsicSizingInfo::transpose() | 4668 void LayoutBox::IntrinsicSizingInfo::transpose() |
| 4669 { | 4669 { |
| 4670 size = size.transposedSize(); | 4670 size = size.transposedSize(); |
| 4671 aspectRatio = aspectRatio.transposedSize(); | 4671 aspectRatio = aspectRatio.transposedSize(); |
| 4672 std::swap(hasWidth, hasHeight); | 4672 std::swap(hasWidth, hasHeight); |
| 4673 } | 4673 } |
| 4674 | 4674 |
| 4675 } // namespace blink | 4675 } // namespace blink |
| OLD | NEW |