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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 } | 779 } |
780 | 780 |
781 int LayoutBox::horizontalScrollbarHeight() const | 781 int LayoutBox::horizontalScrollbarHeight() const |
782 { | 782 { |
783 if (!hasOverflowClip() || style()->overflowX() == OverflowOverlay) | 783 if (!hasOverflowClip() || style()->overflowX() == OverflowOverlay) |
784 return 0; | 784 return 0; |
785 | 785 |
786 return getScrollableArea()->horizontalScrollbarHeight(); | 786 return getScrollableArea()->horizontalScrollbarHeight(); |
787 } | 787 } |
788 | 788 |
789 int LayoutBox::intrinsicScrollbarLogicalWidth() const | |
790 { | |
791 if (!hasOverflowClip()) | |
792 return 0; | |
793 | |
794 ASSERT(getScrollableArea()); | |
795 | |
796 if (isHorizontalWritingMode() && style()->overflowY() == OverflowScroll) { | |
797 // Even with OverflowScroll, the scrollbar may not exist (crbug.com/4150
31). | |
798 return getScrollableArea()->hasVerticalScrollbar() ? verticalScrollbarWi
dth() : 0; | |
799 } | |
800 | |
801 if (!isHorizontalWritingMode() && style()->overflowX() == OverflowScroll) { | |
802 // Even with OverflowScroll, the scrollbar may not exist (crbug.com/4150
31). | |
803 return getScrollableArea()->hasHorizontalScrollbar() ? horizontalScrollb
arHeight() : 0; | |
804 } | |
805 | |
806 return 0; | |
807 } | |
808 | |
809 ScrollResult LayoutBox::scroll(ScrollGranularity granularity, const FloatSize& d
elta) | 789 ScrollResult LayoutBox::scroll(ScrollGranularity granularity, const FloatSize& d
elta) |
810 { | 790 { |
811 // Presumably the same issue as in setScrollTop. See crbug.com/343132. | 791 // Presumably the same issue as in setScrollTop. See crbug.com/343132. |
812 DisableCompositingQueryAsserts disabler; | 792 DisableCompositingQueryAsserts disabler; |
813 | 793 |
814 if (!getScrollableArea()) | 794 if (!getScrollableArea()) |
815 return ScrollResult(); | 795 return ScrollResult(); |
816 | 796 |
817 return getScrollableArea()->userScroll(granularity, delta); | 797 return getScrollableArea()->userScroll(granularity, delta); |
818 } | 798 } |
(...skipping 4132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4951 m_rareData->m_snapAreas->remove(&snapArea); | 4931 m_rareData->m_snapAreas->remove(&snapArea); |
4952 } | 4932 } |
4953 } | 4933 } |
4954 | 4934 |
4955 SnapAreaSet* LayoutBox::snapAreas() const | 4935 SnapAreaSet* LayoutBox::snapAreas() const |
4956 { | 4936 { |
4957 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4937 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
4958 } | 4938 } |
4959 | 4939 |
4960 } // namespace blink | 4940 } // namespace blink |
OLD | NEW |