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

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: Make OpacityIsAnimating() virtual. 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 3d83aebf30f541d6036e683f2ef32d9363dd2fa7..3d1a9f82f61fc9f692ed9b44a64fdc33f775a77c 100644
--- a/cc/scrollbar_layer.cc
+++ b/cc/scrollbar_layer.cc
@@ -19,11 +19,17 @@ namespace cc {
scoped_ptr<LayerImpl> ScrollbarLayer::CreateLayerImpl(
LayerTreeImpl* tree_impl) {
- return ScrollbarLayerImpl::Create(
- tree_impl,
- id(),
- ScrollbarGeometryFixedThumb::create(make_scoped_ptr(geometry_->clone())))
- .PassAs<LayerImpl>();
+ scoped_ptr<LayerImpl> scroll_layer_impl =
+ ScrollbarLayerImpl::Create(
+ tree_impl,
+ id(),
+ ScrollbarGeometryFixedThumb::create(
+ make_scoped_ptr(geometry_->clone()))).PassAs<LayerImpl>();
+
+ if (scroll_layer_id_ == Layer::PINCH_ZOOM_ROOT_SCROLL_LAYER_ID)
+ scroll_layer_impl->ToScrollbarLayer()->SetOpacity(0);
enne (OOO) 2013/03/12 21:10:08 Why are opacity updates blocked and this is requir
wjmaclean 2013/03/12 22:02:22 The call to "ToScrollbarLayer()" is not necessary,
+
+ return scroll_layer_impl.Pass();
}
scoped_refptr<ScrollbarLayer> ScrollbarLayer::Create(
@@ -61,6 +67,11 @@ void ScrollbarLayer::SetScrollLayerId(int id) {
SetNeedsFullTreeSync();
}
+bool ScrollbarLayer::OpacityIsAnimating() const {
+ return Layer::OpacityIsAnimating() ||
enne (OOO) 2013/03/12 21:10:08 Maybe just return Layer::OpacityIsAnimating || isO
wjmaclean 2013/03/12 22:02:22 Sure, though Clank also uses overlay scrollbars, a
+ scroll_layer_id_ == Layer::PINCH_ZOOM_ROOT_SCROLL_LAYER_ID;
+}
+
WebKit::WebScrollbar::Orientation ScrollbarLayer::Orientation() const {
return scrollbar_->orientation();
}
« 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