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

Side by Side Diff: third_party/WebKit/public/platform/WebLayer.h

Issue 2911463002: Unify the calculation of main thread offset of sticky element (Closed)
Patch Set: Bug fix Created 3 years, 6 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 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // to adjust layer position during threaded scrolling. 195 // to adjust layer position during threaded scrolling.
196 virtual void SetPositionConstraint(const WebLayerPositionConstraint&) = 0; 196 virtual void SetPositionConstraint(const WebLayerPositionConstraint&) = 0;
197 virtual WebLayerPositionConstraint PositionConstraint() const = 0; 197 virtual WebLayerPositionConstraint PositionConstraint() const = 0;
198 198
199 // Sets the sticky position constraint. This will be used to adjust sticky 199 // Sets the sticky position constraint. This will be used to adjust sticky
200 // position objects during threaded scrolling. 200 // position objects during threaded scrolling.
201 virtual void SetStickyPositionConstraint( 201 virtual void SetStickyPositionConstraint(
202 const WebLayerStickyPositionConstraint&) = 0; 202 const WebLayerStickyPositionConstraint&) = 0;
203 virtual WebLayerStickyPositionConstraint StickyPositionConstraint() const = 0; 203 virtual WebLayerStickyPositionConstraint StickyPositionConstraint() const = 0;
204 204
205 // Sets the relative position of the sticky box and its original position
206 // before scroll. This will be used to calculate the actual sticky position
207 // offset from cc side.
208 virtual void SetOffsetForStickyPosition(const WebSize&) = 0;
209 virtual WebSize OffsetForStickyPosition() const = 0;
210
205 // The scroll client is notified when the scroll position of the WebLayer 211 // The scroll client is notified when the scroll position of the WebLayer
206 // changes. Only a single scroll client can be set for a WebLayer at a time. 212 // changes. Only a single scroll client can be set for a WebLayer at a time.
207 // The WebLayer does not take ownership of the scroll client, and it is the 213 // The WebLayer does not take ownership of the scroll client, and it is the
208 // responsibility of the client to reset the layer's scroll client before 214 // responsibility of the client to reset the layer's scroll client before
209 // deleting the scroll client. 215 // deleting the scroll client.
210 virtual void SetScrollClient(WebLayerScrollClient*) = 0; 216 virtual void SetScrollClient(WebLayerScrollClient*) = 0;
211 217
212 // Sets the cc-side layer client. 218 // Sets the cc-side layer client.
213 virtual void SetLayerClient(cc::LayerClient*) = 0; 219 virtual void SetLayerClient(cc::LayerClient*) = 0;
214 220
215 // Gets the underlying cc layer. 221 // Gets the underlying cc layer.
216 virtual const cc::Layer* CcLayer() const = 0; 222 virtual const cc::Layer* CcLayer() const = 0;
217 virtual cc::Layer* CcLayer() = 0; 223 virtual cc::Layer* CcLayer() = 0;
218 224
219 virtual void SetElementId(const cc::ElementId&) = 0; 225 virtual void SetElementId(const cc::ElementId&) = 0;
220 virtual cc::ElementId GetElementId() const = 0; 226 virtual cc::ElementId GetElementId() const = 0;
221 227
222 virtual void SetCompositorMutableProperties(uint32_t) = 0; 228 virtual void SetCompositorMutableProperties(uint32_t) = 0;
223 virtual uint32_t CompositorMutableProperties() const = 0; 229 virtual uint32_t CompositorMutableProperties() const = 0;
224 230
225 virtual void SetHasWillChangeTransformHint(bool) = 0; 231 virtual void SetHasWillChangeTransformHint(bool) = 0;
226 232
227 // Called on the scroll layer to trigger showing the overlay scrollbars. 233 // Called on the scroll layer to trigger showing the overlay scrollbars.
228 virtual void ShowScrollbars() = 0; 234 virtual void ShowScrollbars() = 0;
229 }; 235 };
230 236
231 } // namespace blink 237 } // namespace blink
232 238
233 #endif // WebLayer_h 239 #endif // WebLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698