| 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 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 | 783 |
| 784 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { | 784 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { |
| 785 ASSERT(layer()->scrollableArea()); | 785 ASSERT(layer()->scrollableArea()); |
| 786 // Even with OSCROLL, the scrollbar may not exist (crbug.com/415031). | 786 // Even with OSCROLL, the scrollbar may not exist (crbug.com/415031). |
| 787 return layer()->scrollableArea()->hasHorizontalScrollbar() ? horizontalS
crollbarHeight() : 0; | 787 return layer()->scrollableArea()->hasHorizontalScrollbar() ? horizontalS
crollbarHeight() : 0; |
| 788 } | 788 } |
| 789 | 789 |
| 790 return 0; | 790 return 0; |
| 791 } | 791 } |
| 792 | 792 |
| 793 ScrollResultOneDimensional LayoutBox::scroll(ScrollDirectionPhysical direction,
ScrollGranularity granularity, float delta) | 793 ScrollResult LayoutBox::scroll(ScrollGranularity granularity, const FloatSize& d
elta) |
| 794 { | 794 { |
| 795 // Presumably the same issue as in setScrollTop. See crbug.com/343132. | 795 // Presumably the same issue as in setScrollTop. See crbug.com/343132. |
| 796 DisableCompositingQueryAsserts disabler; | 796 DisableCompositingQueryAsserts disabler; |
| 797 | 797 |
| 798 if (!layer() || !layer()->scrollableArea()) | 798 if (!layer() || !layer()->scrollableArea()) |
| 799 return ScrollResultOneDimensional(false); | 799 return ScrollResult(); |
| 800 | 800 |
| 801 return layer()->scrollableArea()->userScroll(direction, granularity, delta); | 801 return layer()->scrollableArea()->userScroll(granularity, delta); |
| 802 } | 802 } |
| 803 | 803 |
| 804 bool LayoutBox::canBeScrolledAndHasScrollableArea() const | 804 bool LayoutBox::canBeScrolledAndHasScrollableArea() const |
| 805 { | 805 { |
| 806 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe
lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth()
); | 806 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe
lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth()
); |
| 807 } | 807 } |
| 808 | 808 |
| 809 bool LayoutBox::canBeProgramaticallyScrolled() const | 809 bool LayoutBox::canBeProgramaticallyScrolled() const |
| 810 { | 810 { |
| 811 Node* node = this->node(); | 811 Node* node = this->node(); |
| (...skipping 3870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4682 } | 4682 } |
| 4683 | 4683 |
| 4684 void LayoutBox::IntrinsicSizingInfo::transpose() | 4684 void LayoutBox::IntrinsicSizingInfo::transpose() |
| 4685 { | 4685 { |
| 4686 size = size.transposedSize(); | 4686 size = size.transposedSize(); |
| 4687 aspectRatio = aspectRatio.transposedSize(); | 4687 aspectRatio = aspectRatio.transposedSize(); |
| 4688 std::swap(hasWidth, hasHeight); | 4688 std::swap(hasWidth, hasHeight); |
| 4689 } | 4689 } |
| 4690 | 4690 |
| 4691 } // namespace blink | 4691 } // namespace blink |
| OLD | NEW |