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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
786 return getScrollableArea()->horizontalScrollbarHeight(); | 786 return getScrollableArea()->horizontalScrollbarHeight(); |
787 } | 787 } |
788 | 788 |
789 int LayoutBox::intrinsicScrollbarLogicalWidth() const | 789 int LayoutBox::intrinsicScrollbarLogicalWidth() const |
790 { | 790 { |
791 if (!hasOverflowClip()) | 791 if (!hasOverflowClip()) |
792 return 0; | 792 return 0; |
793 | 793 |
794 ASSERT(getScrollableArea()); | 794 ASSERT(getScrollableArea()); |
795 | 795 |
796 if (isHorizontalWritingMode() && style()->overflowY() == OverflowScroll) { | 796 if (isHorizontalWritingMode() && (style()->overflowY() == OverflowScroll || style()->overflowY() == OverflowAuto)) { |
cbiesinger
2016/05/13 19:52:48
Soo, I agree this will be better off in a differen
szager1
2016/05/13 20:52:05
The thing that makes this work is the following ch
cbiesinger
2016/05/13 21:02:13
Ah, thanks, I missed that part. Still, this now ma
| |
797 // Even with OverflowScroll, the scrollbar may not exist (crbug.com/4150 31). | 797 // Even with OverflowScroll, the scrollbar may not exist (crbug.com/4150 31). |
798 return getScrollableArea()->hasVerticalScrollbar() ? verticalScrollbarWi dth() : 0; | 798 return getScrollableArea()->hasVerticalScrollbar() ? verticalScrollbarWi dth() : 0; |
799 } | 799 } |
800 | 800 |
801 if (!isHorizontalWritingMode() && style()->overflowX() == OverflowScroll) { | 801 if (!isHorizontalWritingMode() && (style()->overflowX() == OverflowScroll || style()->overflowY() == OverflowAuto)) { |
802 // Even with OverflowScroll, the scrollbar may not exist (crbug.com/4150 31). | 802 // Even with OverflowScroll, the scrollbar may not exist (crbug.com/4150 31). |
803 return getScrollableArea()->hasHorizontalScrollbar() ? horizontalScrollb arHeight() : 0; | 803 return getScrollableArea()->hasHorizontalScrollbar() ? horizontalScrollb arHeight() : 0; |
804 } | 804 } |
805 | 805 |
806 return 0; | 806 return 0; |
807 } | 807 } |
808 | 808 |
809 ScrollResult LayoutBox::scroll(ScrollGranularity granularity, const FloatSize& d elta) | 809 ScrollResult LayoutBox::scroll(ScrollGranularity granularity, const FloatSize& d elta) |
810 { | 810 { |
811 // Presumably the same issue as in setScrollTop. See crbug.com/343132. | 811 // Presumably the same issue as in setScrollTop. See crbug.com/343132. |
(...skipping 4139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4951 m_rareData->m_snapAreas->remove(&snapArea); | 4951 m_rareData->m_snapAreas->remove(&snapArea); |
4952 } | 4952 } |
4953 } | 4953 } |
4954 | 4954 |
4955 SnapAreaSet* LayoutBox::snapAreas() const | 4955 SnapAreaSet* LayoutBox::snapAreas() const |
4956 { | 4956 { |
4957 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4957 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
4958 } | 4958 } |
4959 | 4959 |
4960 } // namespace blink | 4960 } // namespace blink |
OLD | NEW |