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

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

Issue 146003002: Bindings for CSSOM View smooth scroll API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/Window.idl ('k') | Source/platform/scroll/ScrollableArea.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 static int maxOverlapBetweenPages(); 55 static int maxOverlapBetweenPages();
56 56
57 bool scroll(ScrollDirection, ScrollGranularity, float delta = 1); 57 bool scroll(ScrollDirection, ScrollGranularity, float delta = 1);
58 void scrollToOffsetWithoutAnimation(const FloatPoint&); 58 void scrollToOffsetWithoutAnimation(const FloatPoint&);
59 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset); 59 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset);
60 60
61 // Should be called when the scroll position changes externally, for example if the scroll layer position 61 // Should be called when the scroll position changes externally, for example if the scroll layer position
62 // is updated on the scrolling thread and we need to notify the main thread. 62 // is updated on the scrolling thread and we need to notify the main thread.
63 void notifyScrollPositionChanged(const IntPoint&); 63 void notifyScrollPositionChanged(const IntPoint&);
64 64
65 static bool scrollBehaviorFromString(const String&, ScrollBehavior&);
66
65 bool handleWheelEvent(const PlatformWheelEvent&); 67 bool handleWheelEvent(const PlatformWheelEvent&);
66 68
67 // Functions for controlling if you can scroll past the end of the document. 69 // Functions for controlling if you can scroll past the end of the document.
68 bool constrainsScrollingToContentEdge() const { return m_constrainsScrolling ToContentEdge; } 70 bool constrainsScrollingToContentEdge() const { return m_constrainsScrolling ToContentEdge; }
69 void setConstrainsScrollingToContentEdge(bool constrainsScrollingToContentEd ge) { m_constrainsScrollingToContentEdge = constrainsScrollingToContentEdge; } 71 void setConstrainsScrollingToContentEdge(bool constrainsScrollingToContentEd ge) { m_constrainsScrollingToContentEdge = constrainsScrollingToContentEdge; }
70 72
71 void setVerticalScrollElasticity(ScrollElasticity scrollElasticity) { m_vert icalScrollElasticity = scrollElasticity; } 73 void setVerticalScrollElasticity(ScrollElasticity scrollElasticity) { m_vert icalScrollElasticity = scrollElasticity; }
72 ScrollElasticity verticalScrollElasticity() const { return static_cast<Scrol lElasticity>(m_verticalScrollElasticity); } 74 ScrollElasticity verticalScrollElasticity() const { return static_cast<Scrol lElasticity>(m_verticalScrollElasticity); }
73 75
74 void setHorizontalScrollElasticity(ScrollElasticity scrollElasticity) { m_ho rizontalScrollElasticity = scrollElasticity; } 76 void setHorizontalScrollElasticity(ScrollElasticity scrollElasticity) { m_ho rizontalScrollElasticity = scrollElasticity; }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // vertical-lr / ltr NO NO 250 // vertical-lr / ltr NO NO
249 // vertical-lr / rtl NO YES 251 // vertical-lr / rtl NO YES
250 // vertical-rl / ltr YES NO 252 // vertical-rl / ltr YES NO
251 // vertical-rl / rtl YES YES 253 // vertical-rl / rtl YES YES
252 IntPoint m_scrollOrigin; 254 IntPoint m_scrollOrigin;
253 }; 255 };
254 256
255 } // namespace WebCore 257 } // namespace WebCore
256 258
257 #endif // ScrollableArea_h 259 #endif // ScrollableArea_h
OLDNEW
« no previous file with comments | « Source/core/frame/Window.idl ('k') | Source/platform/scroll/ScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698