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

Unified Diff: cc/trees/property_tree_builder.cc

Issue 985283002: Get LayoutTests working with property tree verification Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | content/shell/app/shell_main_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree_builder.cc
diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc
index 8352ab88dc638ae942422cfa42709123ebb7a9ad..f5a906d63f383af39e66a99ed1f6e25559af04fe 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -134,8 +134,15 @@ void AddTransformNodeIfNeeded(const DataForRecursion& data_from_ancestor,
// May be non-zero if layer is fixed or has a scroll parent.
gfx::Vector2dF parent_offset;
if (transform_parent) {
- // TODO(vollick): This is to mimic existing bugs (crbug.com/441447).
- if (!is_fixed) {
+ if (layer->scroll_parent()) {
+ gfx::Transform to_parent;
+ Layer* source = layer->parent();
+ parent_offset += source->offset_to_transform_parent();
+ data_from_ancestor.transform_tree->ComputeTransform(
+ source->transform_tree_index(),
+ transform_parent->transform_tree_index(), &to_parent);
+ parent_offset += to_parent.To2dTranslation();
+ } else 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) {
@@ -150,18 +157,6 @@ void AddTransformNodeIfNeeded(const DataForRecursion& data_from_ancestor,
fixed_offset += parent_to_parent.To2dTranslation();
parent_offset += fixed_offset;
}
-
- gfx::Transform to_parent;
- Layer* source = data_from_ancestor.transform_tree_parent;
- if (layer->scroll_parent()) {
- source = layer->parent();
- parent_offset += layer->parent()->offset_to_transform_parent();
- }
- data_from_ancestor.transform_tree->ComputeTransform(
- source->transform_tree_index(),
- transform_parent->transform_tree_index(), &to_parent);
-
- parent_offset += to_parent.To2dTranslation();
}
if (layer->IsContainerForFixedPositionLayers() || is_root)
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | content/shell/app/shell_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698