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

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

Issue 2929873002: Shifting layer position for sticky element to avoid passing unnessary variable to cc (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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp ('k') | no next file » | 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 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
211 // The scroll client is notified when the scroll position of the WebLayer 205 // The scroll client is notified when the scroll position of the WebLayer
212 // changes. Only a single scroll client can be set for a WebLayer at a time. 206 // changes. Only a single scroll client can be set for a WebLayer at a time.
213 // The WebLayer does not take ownership of the scroll client, and it is the 207 // The WebLayer does not take ownership of the scroll client, and it is the
214 // responsibility of the client to reset the layer's scroll client before 208 // responsibility of the client to reset the layer's scroll client before
215 // deleting the scroll client. 209 // deleting the scroll client.
216 virtual void SetScrollClient(WebLayerScrollClient*) = 0; 210 virtual void SetScrollClient(WebLayerScrollClient*) = 0;
217 211
218 // Sets the cc-side layer client. 212 // Sets the cc-side layer client.
219 virtual void SetLayerClient(cc::LayerClient*) = 0; 213 virtual void SetLayerClient(cc::LayerClient*) = 0;
220 214
221 // Gets the underlying cc layer. 215 // Gets the underlying cc layer.
222 virtual const cc::Layer* CcLayer() const = 0; 216 virtual const cc::Layer* CcLayer() const = 0;
223 virtual cc::Layer* CcLayer() = 0; 217 virtual cc::Layer* CcLayer() = 0;
224 218
225 virtual void SetElementId(const cc::ElementId&) = 0; 219 virtual void SetElementId(const cc::ElementId&) = 0;
226 virtual cc::ElementId GetElementId() const = 0; 220 virtual cc::ElementId GetElementId() const = 0;
227 221
228 virtual void SetCompositorMutableProperties(uint32_t) = 0; 222 virtual void SetCompositorMutableProperties(uint32_t) = 0;
229 virtual uint32_t CompositorMutableProperties() const = 0; 223 virtual uint32_t CompositorMutableProperties() const = 0;
230 224
231 virtual void SetHasWillChangeTransformHint(bool) = 0; 225 virtual void SetHasWillChangeTransformHint(bool) = 0;
232 226
233 // Called on the scroll layer to trigger showing the overlay scrollbars. 227 // Called on the scroll layer to trigger showing the overlay scrollbars.
234 virtual void ShowScrollbars() = 0; 228 virtual void ShowScrollbars() = 0;
235 }; 229 };
236 230
237 } // namespace blink 231 } // namespace blink
238 232
239 #endif // WebLayer_h 233 #endif // WebLayer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698