Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: Source/core/layout/LayoutBox.cpp

Issue 1056983004: OverscrollGlow for mainThread-{BLINK CHANGES} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: added function for comparison Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 } 702 }
703 703
704 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { 704 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) {
705 ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasHorizo ntalScrollbar()); 705 ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasHorizo ntalScrollbar());
706 return horizontalScrollbarHeight(); 706 return horizontalScrollbarHeight();
707 } 707 }
708 708
709 return 0; 709 return 0;
710 } 710 }
711 711
712 bool LayoutBox::scroll(ScrollDirection direction, ScrollGranularity granularity, float delta) 712 ScrollResultOneDimensional LayoutBox::scroll(ScrollDirection direction, ScrollGr anularity granularity, float delta)
713 { 713 {
714 // Presumably the same issue as in setScrollTop. See crbug.com/343132. 714 // Presumably the same issue as in setScrollTop. See crbug.com/343132.
715 DisableCompositingQueryAsserts disabler; 715 DisableCompositingQueryAsserts disabler;
716 716
717 // Logical scroll is a higher level concept, all directions by here must be physical 717 // Logical scroll is a higher level concept, all directions by here must be physical
718 ASSERT(!isLogical(direction)); 718 ASSERT(!isLogical(direction));
719 719
720 if (!layer() || !layer()->scrollableArea()) 720 if (!layer() || !layer()->scrollableArea())
721 return false; 721 return ScrollResultOneDimensional(false);
722 722
723 return layer()->scrollableArea()->scroll(direction, granularity, delta); 723 return layer()->scrollableArea()->scroll(direction, granularity, delta);
724 } 724 }
725 725
726 bool LayoutBox::canBeScrolledAndHasScrollableArea() const 726 bool LayoutBox::canBeScrolledAndHasScrollableArea() const
727 { 727 {
728 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth() ); 728 return canBeProgramaticallyScrolled() && (pixelSnappedScrollHeight() != pixe lSnappedClientHeight() || pixelSnappedScrollWidth() != pixelSnappedClientWidth() );
729 } 729 }
730 730
731 bool LayoutBox::canBeProgramaticallyScrolled() const 731 bool LayoutBox::canBeProgramaticallyScrolled() const
(...skipping 4022 matching lines...) Expand 10 before | Expand all | Expand 10 after
4754 return true; 4754 return true;
4755 4755
4756 // Our fill layers are ok. Let's check border. 4756 // Our fill layers are ok. Let's check border.
4757 if (style()->hasBorder() && canRenderBorderImage()) 4757 if (style()->hasBorder() && canRenderBorderImage())
4758 return true; 4758 return true;
4759 4759
4760 return false; 4760 return false;
4761 } 4761 }
4762 4762
4763 } // namespace blink 4763 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698