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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 } | 728 } |
729 | 729 |
730 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { | 730 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { |
731 ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasHorizo
ntalScrollbar()); | 731 ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasHorizo
ntalScrollbar()); |
732 return horizontalScrollbarHeight(); | 732 return horizontalScrollbarHeight(); |
733 } | 733 } |
734 | 734 |
735 return 0; | 735 return 0; |
736 } | 736 } |
737 | 737 |
738 bool LayoutBox::scroll(ScrollDirection direction, ScrollGranularity granularity,
float delta) | 738 ScrollResultOneDimensional LayoutBox::scroll(ScrollDirection direction, ScrollGr
anularity granularity, float delta) |
739 { | 739 { |
740 // Presumably the same issue as in setScrollTop. See crbug.com/343132. | 740 // Presumably the same issue as in setScrollTop. See crbug.com/343132. |
741 DisableCompositingQueryAsserts disabler; | 741 DisableCompositingQueryAsserts disabler; |
742 | 742 |
743 // Logical scroll is a higher level concept, all directions by here must be
physical | 743 // Logical scroll is a higher level concept, all directions by here must be
physical |
744 ASSERT(!isLogical(direction)); | 744 ASSERT(!isLogical(direction)); |
745 | 745 |
746 if (!layer() || !layer()->scrollableArea()) | 746 if (!layer() || !layer()->scrollableArea()) |
747 return false; | 747 return ScrollResultOneDimensional(false, delta); |
748 | 748 |
749 return layer()->scrollableArea()->scroll(direction, granularity, delta); | 749 return layer()->scrollableArea()->scroll(direction, granularity, delta); |
750 } | 750 } |
751 | 751 |
752 bool LayoutBox::canBeScrolledAndHasScrollableArea() const | 752 bool LayoutBox::canBeScrolledAndHasScrollableArea() const |
753 { | 753 { |
754 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe
lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth()
); | 754 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe
lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth()
); |
755 } | 755 } |
756 | 756 |
757 bool LayoutBox::canBeProgramaticallyScrolled() const | 757 bool LayoutBox::canBeProgramaticallyScrolled() const |
(...skipping 3945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4703 computedValues.m_margins.m_end = marginEnd(); | 4703 computedValues.m_margins.m_end = marginEnd(); |
4704 | 4704 |
4705 setLogicalTop(oldLogicalTop); | 4705 setLogicalTop(oldLogicalTop); |
4706 setLogicalWidth(oldLogicalWidth); | 4706 setLogicalWidth(oldLogicalWidth); |
4707 setLogicalLeft(oldLogicalLeft); | 4707 setLogicalLeft(oldLogicalLeft); |
4708 setMarginLeft(oldMarginLeft); | 4708 setMarginLeft(oldMarginLeft); |
4709 setMarginRight(oldMarginRight); | 4709 setMarginRight(oldMarginRight); |
4710 } | 4710 } |
4711 | 4711 |
4712 } // namespace blink | 4712 } // namespace blink |
OLD | NEW |