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

Unified Diff: cc/layers/layer.cc

Issue 2733633002: Handle nested position:sticky elements correctly (compositor) (Closed)
Patch Set: Add comment referencing crbug.com/702229 Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index c966f75f132a66ac259d56504e5e50b3ac9e336d..8f50bc93abe639de80c6231759291024fa2b4985 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -29,6 +29,7 @@
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/mutable_properties.h"
#include "cc/trees/mutator_host.h"
+#include "cc/trees/scroll_node.h"
flackr 2017/03/17 15:01:55 Obsolete?
smcgruer 2017/03/17 17:36:51 Done.
#include "cc/trees/transform_node.h"
#include "third_party/skia/include/core/SkImageFilter.h"
#include "ui/gfx/geometry/rect_conversions.h"
@@ -589,6 +590,8 @@ void Layer::SetPosition(const gfx::PointF& position) {
StickyPositionNodeData* sticky_data =
property_trees->transform_tree.StickyPositionData(
transform_tree_index());
+ // This calculation will be incorrect if we have an ancestor sticky
+ // element that is not composited: http://crbug.com/702229
flackr 2017/03/17 15:01:55 Can you change this to a TODO to either pass the m
smcgruer 2017/03/17 17:36:51 Done.
sticky_data->main_thread_offset =
position.OffsetFromOrigin() -
sticky_data->constraints.parent_relative_sticky_box_offset

Powered by Google App Engine
This is Rietveld 408576698