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

Side by Side Diff: Source/WebCore/page/scrolling/ScrollingCoordinator.h

Issue 11644048: Revert 138209 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 8 years 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
« no previous file with comments | « Source/WebCore/page/Frame.cpp ('k') | Source/WebCore/page/scrolling/ScrollingCoordinator.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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 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 11 matching lines...) Expand all
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 * THE POSSIBILITY OF SUCH DAMAGE. 23 * THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef ScrollingCoordinator_h 26 #ifndef ScrollingCoordinator_h
27 #define ScrollingCoordinator_h 27 #define ScrollingCoordinator_h
28 28
29 #include "IntRect.h" 29 #include "IntRect.h"
30 #include "LayoutRect.h" 30 #include "LayoutRect.h"
31 #include "PlatformWheelEvent.h" 31 #include "PlatformWheelEvent.h"
32 #include "RenderObject.h"
32 #include "ScrollTypes.h" 33 #include "ScrollTypes.h"
33 #include "Timer.h" 34 #include "Timer.h"
34 #include <wtf/Forward.h> 35 #include <wtf/Forward.h>
35 36
36 #if ENABLE(THREADED_SCROLLING) 37 #if ENABLE(THREADED_SCROLLING)
37 #include <wtf/HashMap.h> 38 #include <wtf/HashMap.h>
38 #include <wtf/ThreadSafeRefCounted.h> 39 #include <wtf/ThreadSafeRefCounted.h>
39 #include <wtf/Threading.h> 40 #include <wtf/Threading.h>
40 #endif 41 #endif
41 42
42 #if PLATFORM(MAC) 43 #if PLATFORM(MAC)
43 #include <wtf/RetainPtr.h> 44 #include <wtf/RetainPtr.h>
44 #endif 45 #endif
45 46
46 namespace WebCore { 47 namespace WebCore {
47 48
48 typedef unsigned MainThreadScrollingReasons; 49 typedef unsigned MainThreadScrollingReasons;
49 typedef uint64_t ScrollingNodeID; 50 typedef uint64_t ScrollingNodeID;
50 51
51 enum ScrollingNodeType { ScrollingNode, FixedNode }; 52 enum ScrollingNodeType { ScrollingNode, FixedNode };
52 53
54 class Document;
53 class Frame; 55 class Frame;
54 class FrameView; 56 class FrameView;
55 class GraphicsLayer; 57 class GraphicsLayer;
56 class Page; 58 class Page;
57 class Region; 59 class Region;
58 class ScrollableArea; 60 class ScrollableArea;
59 class ViewportConstraints; 61 class ViewportConstraints;
60 62
61 #if ENABLE(THREADED_SCROLLING) 63 #if ENABLE(THREADED_SCROLLING)
62 class ScrollingTree; 64 class ScrollingTree;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 MainThreadScrollingReasons mainThreadScrollingReasons() const; 144 MainThreadScrollingReasons mainThreadScrollingReasons() const;
143 bool shouldUpdateScrollLayerPositionOnMainThread() const { return mainThread ScrollingReasons() != 0; } 145 bool shouldUpdateScrollLayerPositionOnMainThread() const { return mainThread ScrollingReasons() != 0; }
144 146
145 // These virtual functions are currently unique to Chromium's WebLayer appro ach. Their meaningful 147 // These virtual functions are currently unique to Chromium's WebLayer appro ach. Their meaningful
146 // implementations are in ScrollingCoordinatorChromium. 148 // implementations are in ScrollingCoordinatorChromium.
147 virtual void frameViewHorizontalScrollbarLayerDidChange(FrameView*, Graphics Layer*) { } 149 virtual void frameViewHorizontalScrollbarLayerDidChange(FrameView*, Graphics Layer*) { }
148 virtual void frameViewVerticalScrollbarLayerDidChange(FrameView*, GraphicsLa yer*) { } 150 virtual void frameViewVerticalScrollbarLayerDidChange(FrameView*, GraphicsLa yer*) { }
149 virtual void scrollableAreaScrollLayerDidChange(ScrollableArea*, GraphicsLay er*) { } 151 virtual void scrollableAreaScrollLayerDidChange(ScrollableArea*, GraphicsLay er*) { }
150 virtual void setLayerIsContainerForFixedPositionLayers(GraphicsLayer*, bool) { } 152 virtual void setLayerIsContainerForFixedPositionLayers(GraphicsLayer*, bool) { }
151 virtual void setLayerIsFixedToContainerLayer(GraphicsLayer*, bool) { } 153 virtual void setLayerIsFixedToContainerLayer(GraphicsLayer*, bool) { }
154 virtual void touchEventTargetRectsDidChange(const Document*) { }
155
156 #if ENABLE(TOUCH_EVENT_TRACKING)
157 void computeAbsoluteTouchEventTargetRects(const Document*, Vector<IntRect>&) ;
158 #endif
152 159
153 static String mainThreadScrollingReasonsAsText(MainThreadScrollingReasons); 160 static String mainThreadScrollingReasonsAsText(MainThreadScrollingReasons);
154 String mainThreadScrollingReasonsAsText() const; 161 String mainThreadScrollingReasonsAsText() const;
155 162
156 protected: 163 protected:
157 explicit ScrollingCoordinator(Page*); 164 explicit ScrollingCoordinator(Page*);
158 165
159 Region computeNonFastScrollableRegion(Frame*, const IntPoint& frameLocation) ; 166 Region computeNonFastScrollableRegion(Frame*, const IntPoint& frameLocation) ;
160 unsigned computeCurrentWheelEventHandlerCount(); 167 unsigned computeCurrentWheelEventHandlerCount();
161 GraphicsLayer* scrollLayerForFrameView(FrameView*); 168 GraphicsLayer* scrollLayerForFrameView(FrameView*);
(...skipping 13 matching lines...) Expand all
175 IntPoint m_scheduledUpdateScrollPosition; 182 IntPoint m_scheduledUpdateScrollPosition;
176 bool m_scheduledUpdateIsProgrammaticScroll; 183 bool m_scheduledUpdateIsProgrammaticScroll;
177 SetOrSyncScrollingLayerPosition m_scheduledScrollingLayerPositionAction; 184 SetOrSyncScrollingLayerPosition m_scheduledScrollingLayerPositionAction;
178 185
179 bool m_forceMainThreadScrollLayerPositionUpdates; 186 bool m_forceMainThreadScrollLayerPositionUpdates;
180 }; 187 };
181 188
182 } // namespace WebCore 189 } // namespace WebCore
183 190
184 #endif // ScrollingCoordinator_h 191 #endif // ScrollingCoordinator_h
OLDNEW
« no previous file with comments | « Source/WebCore/page/Frame.cpp ('k') | Source/WebCore/page/scrolling/ScrollingCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698