| 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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 } | 704 } |
| 705 | 705 |
| 706 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { | 706 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { |
| 707 ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasHorizo
ntalScrollbar()); | 707 ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasHorizo
ntalScrollbar()); |
| 708 return horizontalScrollbarHeight(); | 708 return horizontalScrollbarHeight(); |
| 709 } | 709 } |
| 710 | 710 |
| 711 return 0; | 711 return 0; |
| 712 } | 712 } |
| 713 | 713 |
| 714 bool LayoutBox::scroll(ScrollDirection direction, ScrollGranularity granularity,
float delta) | 714 bool LayoutBox::scroll(ScrollDirectionPhysical direction, ScrollGranularity gran
ularity, float delta) |
| 715 { | 715 { |
| 716 // Presumably the same issue as in setScrollTop. See crbug.com/343132. | 716 // Presumably the same issue as in setScrollTop. See crbug.com/343132. |
| 717 DisableCompositingQueryAsserts disabler; | 717 DisableCompositingQueryAsserts disabler; |
| 718 | 718 |
| 719 // Logical scroll is a higher level concept, all directions by here must be
physical | |
| 720 ASSERT(!isLogical(direction)); | |
| 721 | |
| 722 if (!layer() || !layer()->scrollableArea()) | 719 if (!layer() || !layer()->scrollableArea()) |
| 723 return false; | 720 return false; |
| 724 | 721 |
| 725 return layer()->scrollableArea()->scroll(direction, granularity, delta); | 722 return layer()->scrollableArea()->scroll(direction, granularity, delta); |
| 726 } | 723 } |
| 727 | 724 |
| 728 bool LayoutBox::canBeScrolledAndHasScrollableArea() const | 725 bool LayoutBox::canBeScrolledAndHasScrollableArea() const |
| 729 { | 726 { |
| 730 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe
lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth()
); | 727 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe
lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth()
); |
| 731 } | 728 } |
| (...skipping 4069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4801 bool LayoutBox::canRenderBorderImage() const | 4798 bool LayoutBox::canRenderBorderImage() const |
| 4802 { | 4799 { |
| 4803 if (!style()->hasBorder()) | 4800 if (!style()->hasBorder()) |
| 4804 return false; | 4801 return false; |
| 4805 | 4802 |
| 4806 StyleImage* borderImage = style()->borderImage().image(); | 4803 StyleImage* borderImage = style()->borderImage().image(); |
| 4807 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); | 4804 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); |
| 4808 } | 4805 } |
| 4809 | 4806 |
| 4810 } // namespace blink | 4807 } // namespace blink |
| OLD | NEW |