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(ScrollDirectionPhysical direction, ScrollGranularity gran
ularity, float delta) | 714 ScrollResultOneDimensional LayoutBox::scroll(ScrollDirectionPhysical direction,
ScrollGranularity granularity, 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 if (!layer() || !layer()->scrollableArea()) | 719 if (!layer() || !layer()->scrollableArea()) |
720 return false; | 720 return ScrollResultOneDimensional(false); |
721 | 721 |
722 return layer()->scrollableArea()->scroll(direction, granularity, delta); | 722 return layer()->scrollableArea()->scroll(direction, granularity, delta); |
723 } | 723 } |
724 | 724 |
725 bool LayoutBox::canBeScrolledAndHasScrollableArea() const | 725 bool LayoutBox::canBeScrolledAndHasScrollableArea() const |
726 { | 726 { |
727 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe
lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth()
); | 727 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe
lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth()
); |
728 } | 728 } |
729 | 729 |
730 bool LayoutBox::canBeProgramaticallyScrolled() const | 730 bool LayoutBox::canBeProgramaticallyScrolled() const |
(...skipping 4065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4796 bool LayoutBox::canRenderBorderImage() const | 4796 bool LayoutBox::canRenderBorderImage() const |
4797 { | 4797 { |
4798 if (!style()->hasBorder()) | 4798 if (!style()->hasBorder()) |
4799 return false; | 4799 return false; |
4800 | 4800 |
4801 StyleImage* borderImage = style()->borderImage().image(); | 4801 StyleImage* borderImage = style()->borderImage().image(); |
4802 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); | 4802 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); |
4803 } | 4803 } |
4804 | 4804 |
4805 } // namespace blink | 4805 } // namespace blink |
OLD | NEW |