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

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

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Force main thread scrolling, set experimental status, and address review comments. Created 5 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
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void frameViewRootLayerDidChange(FrameView*); 91 void frameViewRootLayerDidChange(FrameView*);
92 92
93 #if OS(MACOSX) 93 #if OS(MACOSX)
94 // Dispatched by the scrolling tree during handleWheelEvent. This is require d as long as scrollbars are painted on the main thread. 94 // Dispatched by the scrolling tree during handleWheelEvent. This is require d as long as scrollbars are painted on the main thread.
95 void handleWheelEventPhase(PlatformWheelEventPhase); 95 void handleWheelEventPhase(PlatformWheelEventPhase);
96 #endif 96 #endif
97 97
98 enum MainThreadScrollingReasonFlags { 98 enum MainThreadScrollingReasonFlags {
99 HasBackgroundAttachmentFixedObjects = 1 << 0, 99 HasBackgroundAttachmentFixedObjects = 1 << 0,
100 HasNonLayerViewportConstrainedObjects = 1 << 1, 100 HasNonLayerViewportConstrainedObjects = 1 << 1,
101 ThreadedScrollingDisabled = 1 << 2 101 HasStickyPositionObjects = 1 << 2,
102 ThreadedScrollingDisabled = 1 << 3
102 }; 103 };
103 104
104 MainThreadScrollingReasons mainThreadScrollingReasons() const; 105 MainThreadScrollingReasons mainThreadScrollingReasons() const;
105 bool shouldUpdateScrollLayerPositionOnMainThread() const { return mainThread ScrollingReasons() != 0; } 106 bool shouldUpdateScrollLayerPositionOnMainThread() const { return mainThread ScrollingReasons() != 0; }
106 107
107 PassOwnPtr<WebScrollbarLayer> createSolidColorScrollbarLayer(ScrollbarOrient ation, int thumbThickness, int trackStart, bool isLeftSideVerticalScrollbar); 108 PassOwnPtr<WebScrollbarLayer> createSolidColorScrollbarLayer(ScrollbarOrient ation, int thumbThickness, int trackStart, bool isLeftSideVerticalScrollbar);
108 109
109 void willDestroyScrollableArea(ScrollableArea*); 110 void willDestroyScrollableArea(ScrollableArea*);
110 // Returns true if the coordinator handled this change. 111 // Returns true if the coordinator handled this change.
111 bool scrollableAreaScrollLayerDidChange(ScrollableArea*); 112 bool scrollableAreaScrollLayerDidChange(ScrollableArea*);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 ScrollbarMap m_verticalScrollbars; 167 ScrollbarMap m_verticalScrollbars;
167 HashSet<const PaintLayer*> m_layersWithTouchRects; 168 HashSet<const PaintLayer*> m_layersWithTouchRects;
168 bool m_wasFrameScrollable; 169 bool m_wasFrameScrollable;
169 170
170 MainThreadScrollingReasons m_lastMainThreadScrollingReasons; 171 MainThreadScrollingReasons m_lastMainThreadScrollingReasons;
171 }; 172 };
172 173
173 } // namespace blink 174 } // namespace blink
174 175
175 #endif // ScrollingCoordinator_h 176 #endif // ScrollingCoordinator_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698