summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_unittest.cc
diff options
context:
space:
mode:
authorricea@chromium.org <ricea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-29 14:32:46 +0000
committerricea@chromium.org <ricea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-29 14:32:46 +0000
commitd35cd7b26ab76fee5a42eeaec4a9538265a490e3 (patch)
treedeca5f14d0c152f12146f2dcb0613bdbef72805c /cc/trees/layer_tree_host_unittest.cc
parentb5ef3d30c1e8f33718f6dcfde5fa19fa4a6c7f93 (diff)
downloadchromium_src-d35cd7b26ab76fee5a42eeaec4a9538265a490e3.zip
chromium_src-d35cd7b26ab76fee5a42eeaec4a9538265a490e3.tar.gz
chromium_src-d35cd7b26ab76fee5a42eeaec4a9538265a490e3.tar.bz2
Revert of Pinch/Zoom Infrastructure & Plumbing CL (https://codereview.chromium.org/23983047/)
Reason for revert: Broke Linux ASAN Tests (3) bot. Original issue's description: > Pinch/Zoom Infrastructure & Plumbing CL > > This CL supplies the necessary changes to CC to support the > inner/outer viewport model for pinch-zoom and fixed-position > elements. The specification for these changes is contained in > the document "Layer-based Solution for Pinch Zoom / Fixed > Position". > > It incorporates a change to how scrollbar parameters are > computed (removes the notion of max_scroll_offset as a > quantity set be the embedder, and instead inferred from the > relative sizes of a clip layer w.r.t. the scroll layer). > > Scrollbars are generalized so that a layer may have more than > two scrollbars, and the parameters of the scrollbar are set > w.r.t. the sizes and positions of a clip and a scroll layer. > Further, changes to the scrip/scroll layer automatically > notify any attached scrollbars. > > The CL also removes existing references to root_scroll_layer > from LTH, LTI and LTHI and replaces them with either > Inner/OuterViewportScrollLayer (dual-layer operation only > exists at present if the --enable-pinch-virtual-viewport flag > is specified, otherwise behavior is unchanged). > > Logic is added to (i) combine scroll offsets for the two > viewports before passing it to the embedder, and (ii) > splitting any offsets received from the embedder > appropriately between the two viewports. > > This CL relies on https://codereview.chromium.org/138453004/ > for changes in Blink to support it. > > BUG=148816 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=246812 > > R=aelias@chromium.org, enne@chromium.org, joi@chromium.org, piman@chromium.org, sky@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247684 TBR=enne@chromium.org,aelias@chromium.org,joi@chromium.org,sky@chromium.org,piman@chromium.org,tony@chromium.org,wjmaclean@chromium.org NOTREECHECKS=true NOTRY=true BUG=148816 Review URL: https://codereview.chromium.org/135183016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247688 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees/layer_tree_host_unittest.cc')
-rw-r--r--cc/trees/layer_tree_host_unittest.cc16
1 files changed, 4 insertions, 12 deletions
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 5c8d624..5737b42 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -392,7 +392,7 @@ class LayerTreeHostTestNoExtraCommitFromScrollbarInvalidate
bool paint_scrollbar = true;
bool has_thumb = false;
scrollbar_ = FakePaintedScrollbarLayer::Create(
- paint_scrollbar, has_thumb, root_layer_.get());
+ paint_scrollbar, has_thumb, root_layer_->id());
scrollbar_->SetPosition(gfx::Point(0, 10));
scrollbar_->SetBounds(gfx::Size(10, 10));
@@ -1137,17 +1137,9 @@ class LayerTreeHostTestStartPageScaleAnimation : public LayerTreeHostTest {
scroll_layer_ = FakeContentLayer::Create(&client_);
}
- Layer* root_layer = layer_tree_host()->root_layer();
- scroll_layer_->SetScrollClipLayer(root_layer);
- scroll_layer_->SetIsContainerForFixedPositionLayers(true);
- scroll_layer_->SetBounds(gfx::Size(2 * root_layer->bounds().width(),
- 2 * root_layer->bounds().height()));
+ scroll_layer_->SetScrollable(true);
scroll_layer_->SetScrollOffset(gfx::Vector2d());
layer_tree_host()->root_layer()->AddChild(scroll_layer_);
- // This test requires the page_scale and inner viewport layers to be
- // identified.
- layer_tree_host()->RegisterViewportLayers(
- root_layer, scroll_layer_.get(), NULL);
layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.5f, 2.f);
}
@@ -1456,7 +1448,7 @@ class LayerTreeHostTestDirectRendererAtomicCommit : public LayerTreeHostTest {
bool paint_scrollbar = true;
bool has_thumb = false;
scrollbar_ = FakePaintedScrollbarLayer::Create(
- paint_scrollbar, has_thumb, layer_);
+ paint_scrollbar, has_thumb, layer_->id());
scrollbar_->SetPosition(gfx::Point(0, 10));
scrollbar_->SetBounds(gfx::Size(10, 10));
@@ -3669,7 +3661,7 @@ class LayerTreeHostTestPropertyChangesDuringUpdateArePushed
bool paint_scrollbar = true;
bool has_thumb = false;
scrollbar_layer_ = FakePaintedScrollbarLayer::Create(
- paint_scrollbar, has_thumb, root_.get());
+ paint_scrollbar, has_thumb, root_->id());
root_->AddChild(scrollbar_layer_);