| Index: cc/trees/property_tree_builder.cc
|
| diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc
|
| index 0c080dd2ace2e883c98e64cbcac10a239db34d0b..6f3f79235317488bb9b7f52dd887f3e34fad768d 100644
|
| --- a/cc/trees/property_tree_builder.cc
|
| +++ b/cc/trees/property_tree_builder.cc
|
| @@ -128,10 +128,9 @@ void AddTransformNodeIfNeeded(const DataForRecursion& data_from_ancestor,
|
| layer->should_flatten_transform() &&
|
| !layer->parent()->should_flatten_transform();
|
|
|
| - bool requires_node = is_root || is_scrollable || is_fixed ||
|
| - has_significant_transform || has_animated_transform ||
|
| - is_page_scale_application_layer || flattening_change ||
|
| - has_surface;
|
| + bool requires_node = is_root || is_scrollable || has_significant_transform ||
|
| + has_animated_transform || has_surface ||
|
| + is_page_scale_application_layer || flattening_change;
|
|
|
| Layer* transform_parent = GetTransformParent(data_from_ancestor, layer);
|
|
|
| @@ -139,8 +138,21 @@ void AddTransformNodeIfNeeded(const DataForRecursion& data_from_ancestor,
|
| gfx::Vector2dF parent_offset;
|
| if (transform_parent) {
|
| // TODO(vollick): This is to mimic existing bugs (crbug.com/441447).
|
| - if (!is_fixed)
|
| + if (!is_fixed) {
|
| parent_offset = transform_parent->offset_to_transform_parent();
|
| + } else if (data_from_ancestor.transform_tree_parent !=
|
| + data_from_ancestor.transform_fixed_parent) {
|
| + gfx::Vector2dF fixed_offset = data_from_ancestor.transform_tree_parent
|
| + ->offset_to_transform_parent();
|
| + gfx::Transform parent_to_parent;
|
| + data_from_ancestor.transform_tree->ComputeTransform(
|
| + data_from_ancestor.transform_tree_parent->transform_tree_index(),
|
| + data_from_ancestor.transform_fixed_parent->transform_tree_index(),
|
| + &parent_to_parent);
|
| +
|
| + fixed_offset += parent_to_parent.To2dTranslation();
|
| + parent_offset += fixed_offset;
|
| + }
|
|
|
| gfx::Transform to_parent;
|
| Layer* source = data_from_ancestor.transform_tree_parent;
|
|
|