summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_unittest_damage.cc
diff options
context:
space:
mode:
authoraelias <aelias@chromium.org>2015-10-07 17:20:09 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-08 00:20:53 +0000
commita57c40d1242c34e54e8b3da63421548b6489ce88 (patch)
treec3d940e299609a7ecbae5984f27e7862b0999c09 /cc/trees/layer_tree_host_unittest_damage.cc
parentdc022510b7862ece266ad6a212c7ea24541e4d98 (diff)
downloadchromium_src-a57c40d1242c34e54e8b3da63421548b6489ce88.zip
chromium_src-a57c40d1242c34e54e8b3da63421548b6489ce88.tar.gz
chromium_src-a57c40d1242c34e54e8b3da63421548b6489ce88.tar.bz2
Simplify the mapping between scroll layer and scrollbars.
1) I removed all scrollbar-related state and code from LayerImpl and put it into LTI/LTHI instead. LTHI now owns the ScrollbarAnimationControllers instead of holding short-lived references to them. In LTI::DidUpdateScrollState, I made explicit the mechanism of clip-layer (or inner-scroll-layer) notifications being associated with the primary scroll layer before getting reforwarded to the scrollbars (this has always been the case, but used to be implied in a fairly subtle way). 2) I deleted the scrollbar registration logic in tree_synchronizer.cc and SetScrollAndClipLayerById. This all existed purely to handle the special case of the root viewport layers, and I replaced it with a few lines of explicit special case logic (which became straightforward to write after the code was moved to LTI). This makes the scrollbar layer's pointer to the clip layer unneeded for anything, so I also deleted that. 3) To eliminate the clumsy argument passing of "bool on_resize" (which is there to make scrollbar fades longer during page load), I compute the value at the last minute by checking whether state changed on the scrollbar layer. This required reformulating scrollbar state from "maximum+visible ratio" to "scroll layer length+clip layer length". NOTRY=true BUG=476553 TEST=LayerTreeHostImplTest.ScrollbarRegistration CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1353883005 Cr-Commit-Position: refs/heads/master@{#352984}
Diffstat (limited to 'cc/trees/layer_tree_host_unittest_damage.cc')
-rw-r--r--cc/trees/layer_tree_host_unittest_damage.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/cc/trees/layer_tree_host_unittest_damage.cc b/cc/trees/layer_tree_host_unittest_damage.cc
index 20667bf..f626b55 100644
--- a/cc/trees/layer_tree_host_unittest_damage.cc
+++ b/cc/trees/layer_tree_host_unittest_damage.cc
@@ -353,7 +353,6 @@ class LayerTreeHostScrollbarDamageTest : public LayerTreeHostDamageTest {
layer_settings(), false, true, content_layer->id());
scrollbar_layer->SetPosition(gfx::Point(300, 300));
scrollbar_layer->SetBounds(gfx::Size(10, 100));
- scrollbar_layer->ToScrollbarLayer()->SetClipLayer(scroll_clip_layer->id());
scrollbar_layer->ToScrollbarLayer()->SetScrollLayer(content_layer->id());
root_layer->AddChild(scrollbar_layer);