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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 } | 692 } |
693 | 693 |
694 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { | 694 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { |
695 ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasHorizo
ntalScrollbar()); | 695 ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasHorizo
ntalScrollbar()); |
696 return horizontalScrollbarHeight(); | 696 return horizontalScrollbarHeight(); |
697 } | 697 } |
698 | 698 |
699 return 0; | 699 return 0; |
700 } | 700 } |
701 | 701 |
702 bool LayoutBox::scroll(ScrollDirectionPhysical direction, ScrollGranularity gran
ularity, float delta) | 702 ScrollResultOneDimensional LayoutBox::scroll(ScrollDirectionPhysical direction,
ScrollGranularity granularity, float delta) |
703 { | 703 { |
704 // Presumably the same issue as in setScrollTop. See crbug.com/343132. | 704 // Presumably the same issue as in setScrollTop. See crbug.com/343132. |
705 DisableCompositingQueryAsserts disabler; | 705 DisableCompositingQueryAsserts disabler; |
706 | 706 |
707 if (!layer() || !layer()->scrollableArea()) | 707 if (!layer() || !layer()->scrollableArea()) |
708 return false; | 708 return ScrollResultOneDimensional(false); |
709 | 709 |
710 return layer()->scrollableArea()->userScroll(direction, granularity, delta); | 710 return layer()->scrollableArea()->userScroll(direction, granularity, delta); |
711 } | 711 } |
712 | 712 |
713 bool LayoutBox::canBeScrolledAndHasScrollableArea() const | 713 bool LayoutBox::canBeScrolledAndHasScrollableArea() const |
714 { | 714 { |
715 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe
lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth()
); | 715 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe
lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth()
); |
716 } | 716 } |
717 | 717 |
718 bool LayoutBox::canBeProgramaticallyScrolled() const | 718 bool LayoutBox::canBeProgramaticallyScrolled() const |
(...skipping 4074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4793 bool LayoutBox::canRenderBorderImage() const | 4793 bool LayoutBox::canRenderBorderImage() const |
4794 { | 4794 { |
4795 if (!style()->hasBorderDecoration()) | 4795 if (!style()->hasBorderDecoration()) |
4796 return false; | 4796 return false; |
4797 | 4797 |
4798 StyleImage* borderImage = style()->borderImage().image(); | 4798 StyleImage* borderImage = style()->borderImage().image(); |
4799 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); | 4799 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); |
4800 } | 4800 } |
4801 | 4801 |
4802 } // namespace blink | 4802 } // namespace blink |
OLD | NEW |