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

Side by Side Diff: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h

Issue 1602773006: blink: Make WebMainThreadScrollingReason wrap the cc enum. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enumwrap: . Created 4 years, 11 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) 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 12 matching lines...) Expand all
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 "core/CoreExport.h" 29 #include "core/CoreExport.h"
30 #include "core/layout/LayoutObject.h" 30 #include "core/layout/LayoutObject.h"
31 #include "platform/PlatformWheelEvent.h" 31 #include "platform/PlatformWheelEvent.h"
32 #include "platform/geometry/IntRect.h" 32 #include "platform/geometry/IntRect.h"
33 #include "platform/scroll/MainThreadScrollingReason.h"
33 #include "platform/scroll/ScrollTypes.h" 34 #include "platform/scroll/ScrollTypes.h"
34 #include "public/platform/WebMainThreadScrollingReason.h"
35 #include "wtf/Noncopyable.h" 35 #include "wtf/Noncopyable.h"
36 #include "wtf/text/WTFString.h" 36 #include "wtf/text/WTFString.h"
37 37
38 namespace blink { 38 namespace blink {
39 class WebScrollbarLayer; 39 class WebScrollbarLayer;
40 } 40 }
41 41
42 namespace blink { 42 namespace blink {
43 43
44 typedef unsigned MainThreadScrollingReasons; 44 typedef unsigned MainThreadScrollingReasons;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 RawPtrWillBeMember<Page> m_page; 133 RawPtrWillBeMember<Page> m_page;
134 134
135 // Dirty flags used to idenfity what really needs to be computed after compo siting is updated. 135 // Dirty flags used to idenfity what really needs to be computed after compo siting is updated.
136 bool m_scrollGestureRegionIsDirty; 136 bool m_scrollGestureRegionIsDirty;
137 bool m_touchEventTargetRectsAreDirty; 137 bool m_touchEventTargetRectsAreDirty;
138 bool m_shouldScrollOnMainThreadDirty; 138 bool m_shouldScrollOnMainThreadDirty;
139 139
140 private: 140 private:
141 bool shouldUpdateAfterCompositingChange() const { return m_scrollGestureRegi onIsDirty || m_touchEventTargetRectsAreDirty || m_shouldScrollOnMainThreadDirty || frameViewIsDirty(); } 141 bool shouldUpdateAfterCompositingChange() const { return m_scrollGestureRegi onIsDirty || m_touchEventTargetRectsAreDirty || m_shouldScrollOnMainThreadDirty || frameViewIsDirty(); }
142 142
143 void setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReaso ns); 143 void setShouldUpdateScrollLayerPositionOnMainThread(uint32_t mainThreadScrol lingReasons);
144 144
145 bool hasVisibleSlowRepaintViewportConstrainedObjects(FrameView*) const; 145 bool hasVisibleSlowRepaintViewportConstrainedObjects(FrameView*) const;
146 146
147 void setShouldHandleScrollGestureOnMainThreadRegion(const Region&); 147 void setShouldHandleScrollGestureOnMainThreadRegion(const Region&);
148 void setTouchEventTargetRects(LayerHitTestRects&); 148 void setTouchEventTargetRects(LayerHitTestRects&);
149 void computeTouchEventTargetRects(LayerHitTestRects&); 149 void computeTouchEventTargetRects(LayerHitTestRects&);
150 150
151 WebScrollbarLayer* addWebScrollbarLayer(ScrollableArea*, ScrollbarOrientatio n, PassOwnPtr<WebScrollbarLayer>); 151 WebScrollbarLayer* addWebScrollbarLayer(ScrollableArea*, ScrollbarOrientatio n, PassOwnPtr<WebScrollbarLayer>);
152 WebScrollbarLayer* getWebScrollbarLayer(ScrollableArea*, ScrollbarOrientatio n); 152 WebScrollbarLayer* getWebScrollbarLayer(ScrollableArea*, ScrollbarOrientatio n);
153 void removeWebScrollbarLayer(ScrollableArea*, ScrollbarOrientation); 153 void removeWebScrollbarLayer(ScrollableArea*, ScrollbarOrientation);
154 154
155 bool frameViewIsDirty() const; 155 bool frameViewIsDirty() const;
156 156
157 OwnPtr<WebCompositorAnimationTimeline> m_programmaticScrollAnimatorTimeline; 157 OwnPtr<WebCompositorAnimationTimeline> m_programmaticScrollAnimatorTimeline;
158 158
159 using ScrollbarMap = WillBeHeapHashMap<RawPtrWillBeMember<ScrollableArea>, O wnPtr<WebScrollbarLayer>>; 159 using ScrollbarMap = WillBeHeapHashMap<RawPtrWillBeMember<ScrollableArea>, O wnPtr<WebScrollbarLayer>>;
160 ScrollbarMap m_horizontalScrollbars; 160 ScrollbarMap m_horizontalScrollbars;
161 ScrollbarMap m_verticalScrollbars; 161 ScrollbarMap m_verticalScrollbars;
162 HashSet<const PaintLayer*> m_layersWithTouchRects; 162 HashSet<const PaintLayer*> m_layersWithTouchRects;
163 bool m_wasFrameScrollable; 163 bool m_wasFrameScrollable;
164 164
165 MainThreadScrollingReasons m_lastMainThreadScrollingReasons; 165 uint32_t m_lastMainThreadScrollingReasons;
esprehn 2016/01/20 00:09:56 we often do // ActualType in a comment so you kno
danakj 2016/01/20 00:15:11 Done. "A set of flags from MainThreadScrollingReas
danakj 2016/01/20 22:38:07 Actually I found there is a MainThreadScrollingRea
166 }; 166 };
167 167
168 } // namespace blink 168 } // namespace blink
169 169
170 #endif // ScrollingCoordinator_h 170 #endif // ScrollingCoordinator_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698