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

Side by Side Diff: cc/tree_synchronizer.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/scrollbar_layer_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/tree_synchronizer.h" 5 #include "cc/tree_synchronizer.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/layer.h" 9 #include "cc/layer.h"
10 #include "cc/layer_impl.h" 10 #include "cc/layer_impl.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 LayerType* layer) { 141 LayerType* layer) {
142 if (!layer) 142 if (!layer)
143 return; 143 return;
144 144
145 for (size_t i = 0; i < layer->children().size(); ++i) { 145 for (size_t i = 0; i < layer->children().size(); ++i) {
146 UpdateScrollbarLayerPointersRecursiveInternal< 146 UpdateScrollbarLayerPointersRecursiveInternal<
147 LayerType, ScrollbarLayerType>(new_layers, layer->child_at(i)); 147 LayerType, ScrollbarLayerType>(new_layers, layer->child_at(i));
148 } 148 }
149 149
150 ScrollbarLayerType* scrollbar_layer = layer->ToScrollbarLayer(); 150 ScrollbarLayerType* scrollbar_layer = layer->ToScrollbarLayer();
151 if (!scrollbar_layer) 151 // Pinch-zoom scrollbars will have an invalid scrollLayerId, but they are
152 // managed by LayerTreeImpl and not LayerImpl, so should not be
153 // processed here.
154 if (!scrollbar_layer || (scrollbar_layer->scroll_layer_id() ==
155 Layer::PINCH_ZOOM_ROOT_SCROLL_LAYER_ID))
152 return; 156 return;
153 157
154 RawPtrLayerImplMap::const_iterator iter = 158 RawPtrLayerImplMap::const_iterator iter =
155 new_layers->find(scrollbar_layer->id()); 159 new_layers->find(scrollbar_layer->id());
156 ScrollbarLayerImpl* scrollbar_layer_impl = 160 ScrollbarLayerImpl* scrollbar_layer_impl =
157 iter != new_layers->end() ? static_cast<ScrollbarLayerImpl*>(iter->second) 161 iter != new_layers->end() ? static_cast<ScrollbarLayerImpl*>(iter->second)
158 : NULL; 162 : NULL;
159 iter = new_layers->find(scrollbar_layer->scroll_layer_id()); 163 iter = new_layers->find(scrollbar_layer->scroll_layer_id());
160 LayerImpl* scroll_layer_impl = 164 LayerImpl* scroll_layer_impl =
161 iter != new_layers->end() ? iter->second : NULL; 165 iter != new_layers->end() ? iter->second : NULL;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 208
205 void TreeSynchronizer::PushProperties(Layer* layer, LayerImpl* layer_impl) { 209 void TreeSynchronizer::PushProperties(Layer* layer, LayerImpl* layer_impl) {
206 PushPropertiesInternal(layer, layer_impl); 210 PushPropertiesInternal(layer, layer_impl);
207 } 211 }
208 212
209 void TreeSynchronizer::PushProperties(LayerImpl* layer, LayerImpl* layer_impl) { 213 void TreeSynchronizer::PushProperties(LayerImpl* layer, LayerImpl* layer_impl) {
210 PushPropertiesInternal(layer, layer_impl); 214 PushPropertiesInternal(layer, layer_impl);
211 } 215 }
212 216
213 } // namespace cc 217 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scrollbar_layer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698