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

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 14367021: Rename ClampToMin and ClampToMax (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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/layers/tiled_layer.cc ('k') | chrome/browser/ui/app_list/app_list_service_mac.mm » ('j') | 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/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/animation/keyframed_animation_curve.h" 8 #include "cc/animation/keyframed_animation_curve.h"
9 #include "cc/animation/scrollbar_animation_controller.h" 9 #include "cc/animation/scrollbar_animation_controller.h"
10 #include "cc/debug/traced_value.h" 10 #include "cc/debug/traced_value.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 void LayerTreeImpl::UpdateMaxScrollOffset() { 211 void LayerTreeImpl::UpdateMaxScrollOffset() {
212 if (!root_scroll_layer_ || !root_scroll_layer_->children().size()) 212 if (!root_scroll_layer_ || !root_scroll_layer_->children().size())
213 return; 213 return;
214 214
215 gfx::Vector2dF max_scroll = gfx::Rect(ScrollableSize()).bottom_right() - 215 gfx::Vector2dF max_scroll = gfx::Rect(ScrollableSize()).bottom_right() -
216 gfx::RectF(ScrollableViewportSize()).bottom_right(); 216 gfx::RectF(ScrollableViewportSize()).bottom_right();
217 217
218 // The viewport may be larger than the contents in some cases, such as 218 // The viewport may be larger than the contents in some cases, such as
219 // having a vertical scrollbar but no horizontal overflow. 219 // having a vertical scrollbar but no horizontal overflow.
220 max_scroll.ClampToMin(gfx::Vector2dF()); 220 max_scroll.SetToMax(gfx::Vector2dF());
221 221
222 root_scroll_layer_->SetMaxScrollOffset(gfx::ToFlooredVector2d(max_scroll)); 222 root_scroll_layer_->SetMaxScrollOffset(gfx::ToFlooredVector2d(max_scroll));
223 } 223 }
224 224
225 void LayerTreeImpl::UpdateSolidColorScrollbars() { 225 void LayerTreeImpl::UpdateSolidColorScrollbars() {
226 DCHECK(settings().solid_color_scrollbars); 226 DCHECK(settings().solid_color_scrollbars);
227 227
228 LayerImpl* root_scroll = RootScrollLayer(); 228 LayerImpl* root_scroll = RootScrollLayer();
229 DCHECK(root_scroll); 229 DCHECK(root_scroll);
230 DCHECK(IsActiveTree()); 230 DCHECK(IsActiveTree());
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 564
565 void LayerTreeImpl::ClearLatencyInfo() { 565 void LayerTreeImpl::ClearLatencyInfo() {
566 latency_info_.Clear(); 566 latency_info_.Clear();
567 } 567 }
568 568
569 void LayerTreeImpl::WillModifyTilePriorities() { 569 void LayerTreeImpl::WillModifyTilePriorities() {
570 layer_tree_host_impl_->tile_manager()->WillModifyTilePriorities(); 570 layer_tree_host_impl_->tile_manager()->WillModifyTilePriorities();
571 } 571 }
572 572
573 } // namespace cc 573 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer.cc ('k') | chrome/browser/ui/app_list/app_list_service_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698