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

Side by Side Diff: cc/layers/scrollbar_layer.cc

Issue 18202006: Make scrollable viewport size no longer depend on clip layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Apply to MaxScrollOffset Created 7 years, 5 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 | « no previous file | cc/layers/scrollbar_layer_impl.h » ('j') | cc/trees/layer_tree_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 // Copyright 2012 The Chromium Authors. All rights reserved. 2 // Copyright 2012 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "cc/layers/scrollbar_layer.h" 6 #include "cc/layers/scrollbar_layer.h"
7 7
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 if (track_ && track_->texture()->have_backing_texture()) 131 if (track_ && track_->texture()->have_backing_texture())
132 scrollbar_layer->set_track_resource_id(track_->texture()->resource_id()); 132 scrollbar_layer->set_track_resource_id(track_->texture()->resource_id());
133 else 133 else
134 scrollbar_layer->set_track_resource_id(0); 134 scrollbar_layer->set_track_resource_id(0);
135 135
136 if (thumb_ && thumb_->texture()->have_backing_texture()) 136 if (thumb_ && thumb_->texture()->have_backing_texture())
137 scrollbar_layer->set_thumb_resource_id(thumb_->texture()->resource_id()); 137 scrollbar_layer->set_thumb_resource_id(thumb_->texture()->resource_id());
138 else 138 else
139 scrollbar_layer->set_thumb_resource_id(0); 139 scrollbar_layer->set_thumb_resource_id(0);
140
141 scrollbar_layer->set_is_overlay_scrollbar(scrollbar_->IsOverlay());
140 } 142 }
141 143
142 ScrollbarLayer* ScrollbarLayer::ToScrollbarLayer() { 144 ScrollbarLayer* ScrollbarLayer::ToScrollbarLayer() {
143 return this; 145 return this;
144 } 146 }
145 147
146 void ScrollbarLayer::SetLayerTreeHost(LayerTreeHost* host) { 148 void ScrollbarLayer::SetLayerTreeHost(LayerTreeHost* host) {
147 if (!host || host != layer_tree_host()) { 149 if (!host || host != layer_tree_host()) {
148 track_updater_ = NULL; 150 track_updater_ = NULL;
149 track_.reset(); 151 track_.reset();
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 thumb_size = gfx::Size(scrollbar_->ThumbLength(), 338 thumb_size = gfx::Size(scrollbar_->ThumbLength(),
337 scrollbar_->ThumbThickness()); 339 scrollbar_->ThumbThickness());
338 } else { 340 } else {
339 thumb_size = gfx::Size(scrollbar_->ThumbThickness(), 341 thumb_size = gfx::Size(scrollbar_->ThumbThickness(),
340 scrollbar_->ThumbLength()); 342 scrollbar_->ThumbLength());
341 } 343 }
342 return ScrollbarLayerRectToContentRect(gfx::Rect(thumb_size)); 344 return ScrollbarLayerRectToContentRect(gfx::Rect(thumb_size));
343 } 345 }
344 346
345 } // namespace cc 347 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/scrollbar_layer_impl.h » ('j') | cc/trees/layer_tree_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698