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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2770293003: Feed ScrollableArea::showOverlayScrollbars into ScrollbarAnimationController. (Closed)
Patch Set: rebase 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/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index bfb276a0f8ae4e2eb7fd6d3b60ab90b18e33245c..daaccca36ccc062375cb50561a3821b9f8abaacf 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -541,6 +541,23 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
target_tree->set_hud_layer(NULL);
target_tree->has_ever_been_drawn_ = false;
+
+ // Note: this needs to happen after SetPropertyTrees.
+ target_tree->ShowScrollbars();
+}
+
+void LayerTreeImpl::ShowScrollbars() {
+ LayerTreeHostCommon::CallFunctionForEveryLayer(this, [this](
+ LayerImpl* layer) {
+ if (!layer->needs_show_scrollbars())
+ return;
+ ScrollbarAnimationController* controller =
+ layer_tree_host_impl_->ScrollbarAnimationControllerForId(layer->id());
+ if (controller) {
+ controller->DidRequestShowFromMainThread();
+ layer->set_needs_show_scrollbars(false);
+ }
+ });
}
void LayerTreeImpl::MoveChangeTrackingToLayers() {
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698