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

Unified Diff: cc/scrollbar_layer.cc

Issue 11550035: Implement pinch-zoom scaling for main-frame scrollbars and pinch-zoom overlay scrollbars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to fix collision with solid colour scrollbars patch. Created 7 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/scrollbar_layer.h ('k') | cc/scrollbar_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scrollbar_layer.cc
diff --git a/cc/scrollbar_layer.cc b/cc/scrollbar_layer.cc
index 6d8d6ea6cbe91b71f2274b0ef13ea2bbe374dd3e..cd7b5d014eaea7e848aca8b0e0bc45bbebf9f792 100644
--- a/cc/scrollbar_layer.cc
+++ b/cc/scrollbar_layer.cc
@@ -61,6 +61,10 @@ void ScrollbarLayer::SetScrollLayerId(int id) {
SetNeedsFullTreeSync();
}
+bool ScrollbarLayer::OpacityCanAnimateOnImplThread() const {
+ return scrollbar_->isOverlay();
+}
+
WebKit::WebScrollbar::Orientation ScrollbarLayer::Orientation() const {
return scrollbar_->orientation();
}
@@ -129,6 +133,11 @@ void ScrollbarLayer::PushPropertiesTo(LayerImpl* layer) {
scrollbar_layer->set_thumb_resource_id(thumb_->texture()->resourceId());
else
scrollbar_layer->set_thumb_resource_id(0);
+
+ // Pinch zoom scrollbarLayerImpl does not get its scroll_layer_id_
+ // set in LayerImpl, so we need to push it here.
+ if (scroll_layer_id_ == Layer::PINCH_ZOOM_ROOT_SCROLL_LAYER_ID)
+ scrollbar_layer->set_scroll_layer_id(scroll_layer_id_);
}
ScrollbarLayer* ScrollbarLayer::ToScrollbarLayer() {
« no previous file with comments | « cc/scrollbar_layer.h ('k') | cc/scrollbar_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698