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

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

Issue 1158673006: Replace various ScrollableArea scroll methods with setScrollPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 6 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 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 scrollableBox->scrollByRecursively(remainingScrollOffset, clamp) ; 866 scrollableBox->scrollByRecursively(remainingScrollOffset, clamp) ;
867 867
868 LocalFrame* frame = this->frame(); 868 LocalFrame* frame = this->frame();
869 if (frame && frame->page()) 869 if (frame && frame->page())
870 frame->page()->autoscrollController().updateAutoscrollLayoutObje ct(); 870 frame->page()->autoscrollController().updateAutoscrollLayoutObje ct();
871 } 871 }
872 } else if (view()->frameView()) { 872 } else if (view()->frameView()) {
873 // If we are here, we were called on a layoutObject that can be programm atically scrolled, but doesn't 873 // If we are here, we were called on a layoutObject that can be programm atically scrolled, but doesn't
874 // have an overflow clip. Which means that it is a document node that ca n be scrolled. 874 // have an overflow clip. Which means that it is a document node that ca n be scrolled.
875 // FIXME: Pass in DoubleSize. crbug.com/414283. 875 // FIXME: Pass in DoubleSize. crbug.com/414283.
876 view()->frameView()->scrollBy(flooredIntSize(delta)); 876 view()->frameView()->scrollBy(flooredIntSize(delta), UserScroll);
877 877
878 // FIXME: If we didn't scroll the whole way, do we want to try looking a t the frames ownerElement? 878 // FIXME: If we didn't scroll the whole way, do we want to try looking a t the frames ownerElement?
879 // https://bugs.webkit.org/show_bug.cgi?id=28237 879 // https://bugs.webkit.org/show_bug.cgi?id=28237
880 } 880 }
881 } 881 }
882 882
883 bool LayoutBox::needsPreferredWidthsRecalculation() const 883 bool LayoutBox::needsPreferredWidthsRecalculation() const
884 { 884 {
885 return style()->paddingStart().hasPercent() || style()->paddingEnd().hasPerc ent(); 885 return style()->paddingStart().hasPercent() || style()->paddingEnd().hasPerc ent();
886 } 886 }
(...skipping 3906 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698