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

Side by Side Diff: Source/platform/scroll/ScrollableArea.h

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) 2008, 2011 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 WTF_MAKE_NONCOPYABLE(ScrollableArea); 61 WTF_MAKE_NONCOPYABLE(ScrollableArea);
62 public: 62 public:
63 static int pixelsPerLineStep(); 63 static int pixelsPerLineStep();
64 static float minFractionToStepWhenPaging(); 64 static float minFractionToStepWhenPaging();
65 static int maxOverlapBetweenPages(); 65 static int maxOverlapBetweenPages();
66 66
67 // The window that hosts the ScrollableArea. The ScrollableArea will communi cate scrolls and repaints to the 67 // The window that hosts the ScrollableArea. The ScrollableArea will communi cate scrolls and repaints to the
68 // host window in the window's coordinate space. 68 // host window in the window's coordinate space.
69 virtual HostWindow* hostWindow() const { return 0; }; 69 virtual HostWindow* hostWindow() const { return 0; };
70 70
71 virtual bool scroll(ScrollDirection, ScrollGranularity, float delta = 1); 71 virtual ScrollResultOneDimensional scroll(ScrollDirection, ScrollGranularity , float delta = 1);
72 virtual void setScrollPosition(const DoublePoint&, ScrollBehavior = ScrollBe haviorInstant); 72 virtual void setScrollPosition(const DoublePoint&, ScrollBehavior = ScrollBe haviorInstant);
73 void scrollToOffsetWithoutAnimation(const FloatPoint&, bool cancelProgrammat icAnimations = true); 73 void scrollToOffsetWithoutAnimation(const FloatPoint&, bool cancelProgrammat icAnimations = true);
74 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset); 74 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset);
75 75
76 // Scrolls the area so that the given rect, given in the document's content coordinates, such that it's 76 // Scrolls the area so that the given rect, given in the document's content coordinates, such that it's
77 // visible in the area. Returns the new location of the input rect relative once again to the document. 77 // visible in the area. Returns the new location of the input rect relative once again to the document.
78 // Note, in the case of a Document container, such as FrameView, the output will always be the input rect 78 // Note, in the case of a Document container, such as FrameView, the output will always be the input rect
79 // since scrolling it can't change the location of content relative to the d ocument, unlike an overflowing 79 // since scrolling it can't change the location of content relative to the d ocument, unlike an overflowing
80 // element. 80 // element.
81 virtual LayoutRect scrollIntoView(const LayoutRect& rectInContent, const Scr ollAlignment& alignX, const ScrollAlignment& alignY); 81 virtual LayoutRect scrollIntoView(const LayoutRect& rectInContent, const Scr ollAlignment& alignX, const ScrollAlignment& alignY);
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 // vertical-lr / ltr NO NO 354 // vertical-lr / ltr NO NO
355 // vertical-lr / rtl NO YES 355 // vertical-lr / rtl NO YES
356 // vertical-rl / ltr YES NO 356 // vertical-rl / ltr YES NO
357 // vertical-rl / rtl YES YES 357 // vertical-rl / rtl YES YES
358 IntPoint m_scrollOrigin; 358 IntPoint m_scrollOrigin;
359 }; 359 };
360 360
361 } // namespace blink 361 } // namespace blink
362 362
363 #endif // ScrollableArea_h 363 #endif // ScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698