Index: cc/layers/painted_scrollbar_layer.cc |
diff --git a/cc/layers/painted_scrollbar_layer.cc b/cc/layers/painted_scrollbar_layer.cc |
index f2c3e450bd89177d9f62e45b267a161173a4badd..82b2858c31ae7cf732d2e6a4f8a32c0d8192c9c1 100644 |
--- a/cc/layers/painted_scrollbar_layer.cc |
+++ b/cc/layers/painted_scrollbar_layer.cc |
@@ -44,6 +44,10 @@ PaintedScrollbarLayer::PaintedScrollbarLayer( |
PaintedScrollbarLayer::~PaintedScrollbarLayer() {} |
+int PaintedScrollbarLayer::ScrollLayerId() const { |
+ return scroll_layer_id_; |
+} |
+ |
void PaintedScrollbarLayer::SetScrollLayerId(int id) { |
if (id == scroll_layer_id_) |
return; |
@@ -56,7 +60,7 @@ bool PaintedScrollbarLayer::OpacityCanAnimateOnImplThread() const { |
return scrollbar_->IsOverlay(); |
} |
-ScrollbarOrientation PaintedScrollbarLayer::Orientation() const { |
+ScrollbarOrientation PaintedScrollbarLayer::orientation() const { |
return scrollbar_->Orientation(); |
} |
@@ -66,9 +70,6 @@ int PaintedScrollbarLayer::MaxTextureSize() { |
} |
float PaintedScrollbarLayer::ClampScaleToMaxTextureSize(float scale) { |
- if (layer_tree_host()->settings().solid_color_scrollbars) |
- return scale; |
- |
// If the scaled content_bounds() is bigger than the max texture size of the |
// device, we need to clamp it by rescaling, since content_bounds() is used |
// below to set the texture size. |
@@ -107,14 +108,9 @@ void PaintedScrollbarLayer::PushPropertiesTo(LayerImpl* layer) { |
PaintedScrollbarLayerImpl* scrollbar_layer = |
static_cast<PaintedScrollbarLayerImpl*>(layer); |
- if (layer_tree_host() && |
- layer_tree_host()->settings().solid_color_scrollbars) { |
- scrollbar_layer->SetThumbThickness(scrollbar_->ThumbThickness()); |
- } else { |
- scrollbar_layer->SetThumbThickness(thumb_thickness_); |
- } |
+ scrollbar_layer->SetThumbThickness(thumb_thickness_); |
scrollbar_layer->SetThumbLength(thumb_length_); |
- if (Orientation() == HORIZONTAL) { |
+ if (orientation() == HORIZONTAL) { |
scrollbar_layer->SetTrackStart( |
track_rect_.x() - scrollbar_->Location().x()); |
scrollbar_layer->SetTrackLength(track_rect_.width()); |
@@ -135,7 +131,7 @@ void PaintedScrollbarLayer::PushPropertiesTo(LayerImpl* layer) { |
needs_push_properties_ = true; |
} |
-PaintedScrollbarLayer* PaintedScrollbarLayer::ToScrollbarLayer() { |
+ScrollbarLayerInterface* PaintedScrollbarLayer::ToScrollbarLayer() { |
return this; |
} |
@@ -165,7 +161,7 @@ gfx::Rect PaintedScrollbarLayer::ScrollbarLayerRectToContentRect( |
gfx::Rect PaintedScrollbarLayer::OriginThumbRect() const { |
gfx::Size thumb_size; |
- if (Orientation() == HORIZONTAL) { |
+ if (orientation() == HORIZONTAL) { |
thumb_size = |
gfx::Size(scrollbar_->ThumbLength(), scrollbar_->ThumbThickness()); |
} else { |
@@ -190,8 +186,7 @@ bool PaintedScrollbarLayer::Update(ResourceUpdateQueue* queue, |
gfx::Rect scaled_track_rect = ScrollbarLayerRectToContentRect( |
gfx::Rect(scrollbar_->Location(), bounds())); |
- if (layer_tree_host()->settings().solid_color_scrollbars || |
- track_rect_.IsEmpty() || scaled_track_rect.IsEmpty()) |
+ if (track_rect_.IsEmpty() || scaled_track_rect.IsEmpty()) |
return false; |
{ |
@@ -215,7 +210,6 @@ bool PaintedScrollbarLayer::Update(ResourceUpdateQueue* queue, |
scoped_refptr<UIResourceBitmap> PaintedScrollbarLayer::RasterizeScrollbarPart( |
gfx::Rect rect, |
ScrollbarPart part) { |
- DCHECK(!layer_tree_host()->settings().solid_color_scrollbars); |
DCHECK(!rect.size().IsEmpty()); |
scoped_refptr<UIResourceBitmap> bitmap = |