| Index: cc/layers/solid_color_scrollbar_layer.cc
|
| diff --git a/cc/layers/solid_color_scrollbar_layer.cc b/cc/layers/solid_color_scrollbar_layer.cc
|
| index 2eb5484c855035419083a89ce65e147cff1a62f2..e53941e64a636e6da425eb17f1c3177439bab784 100644
|
| --- a/cc/layers/solid_color_scrollbar_layer.cc
|
| +++ b/cc/layers/solid_color_scrollbar_layer.cc
|
| @@ -27,10 +27,11 @@ scoped_refptr<SolidColorScrollbarLayer> SolidColorScrollbarLayer::Create(
|
| int thumb_thickness,
|
| int track_start,
|
| bool is_left_side_vertical_scrollbar,
|
| - int scroll_layer_id) {
|
| + int scroll_layer_id,
|
| + ElementId scroll_element_id) {
|
| return make_scoped_refptr(new SolidColorScrollbarLayer(
|
| orientation, thumb_thickness, track_start,
|
| - is_left_side_vertical_scrollbar, scroll_layer_id));
|
| + is_left_side_vertical_scrollbar, scroll_layer_id, scroll_element_id));
|
| }
|
|
|
| SolidColorScrollbarLayer::SolidColorScrollbarLayerInputs::
|
| @@ -38,8 +39,10 @@ SolidColorScrollbarLayer::SolidColorScrollbarLayerInputs::
|
| int thumb_thickness,
|
| int track_start,
|
| bool is_left_side_vertical_scrollbar,
|
| - int scroll_layer_id)
|
| + int scroll_layer_id,
|
| + ElementId scroll_element_id)
|
| : scroll_layer_id(scroll_layer_id),
|
| + scroll_element_id(scroll_element_id),
|
| orientation(orientation),
|
| thumb_thickness(thumb_thickness),
|
| track_start(track_start),
|
| @@ -53,12 +56,14 @@ SolidColorScrollbarLayer::SolidColorScrollbarLayer(
|
| int thumb_thickness,
|
| int track_start,
|
| bool is_left_side_vertical_scrollbar,
|
| - int scroll_layer_id)
|
| + int scroll_layer_id,
|
| + ElementId scroll_element_id)
|
| : solid_color_scrollbar_layer_inputs_(orientation,
|
| thumb_thickness,
|
| track_start,
|
| is_left_side_vertical_scrollbar,
|
| - scroll_layer_id) {
|
| + scroll_layer_id,
|
| + scroll_element_id) {
|
| Layer::SetOpacity(0.f);
|
| }
|
|
|
| @@ -79,8 +84,9 @@ void SolidColorScrollbarLayer::PushPropertiesTo(LayerImpl* layer) {
|
| SolidColorScrollbarLayerImpl* scrollbar_layer =
|
| static_cast<SolidColorScrollbarLayerImpl*>(layer);
|
|
|
| - scrollbar_layer->SetScrollLayerId(
|
| - solid_color_scrollbar_layer_inputs_.scroll_layer_id);
|
| + scrollbar_layer->SetScrollInfo(
|
| + solid_color_scrollbar_layer_inputs_.scroll_layer_id,
|
| + solid_color_scrollbar_layer_inputs_.scroll_element_id);
|
| }
|
|
|
| void SolidColorScrollbarLayer::SetNeedsDisplayRect(const gfx::Rect& rect) {
|
| @@ -95,15 +101,18 @@ bool SolidColorScrollbarLayer::AlwaysUseActiveTreeOpacity() const {
|
| return true;
|
| }
|
|
|
| -int SolidColorScrollbarLayer::ScrollLayerId() const {
|
| - return solid_color_scrollbar_layer_inputs_.scroll_layer_id;
|
| +ElementId SolidColorScrollbarLayer::scroll_element_id() const {
|
| + return solid_color_scrollbar_layer_inputs_.scroll_element_id;
|
| }
|
|
|
| -void SolidColorScrollbarLayer::SetScrollLayer(int layer_id) {
|
| - if (layer_id == solid_color_scrollbar_layer_inputs_.scroll_layer_id)
|
| +void SolidColorScrollbarLayer::SetScrollInfo(int layer_id,
|
| + ElementId element_id) {
|
| + if (layer_id == solid_color_scrollbar_layer_inputs_.scroll_layer_id &&
|
| + element_id == solid_color_scrollbar_layer_inputs_.scroll_element_id)
|
| return;
|
|
|
| solid_color_scrollbar_layer_inputs_.scroll_layer_id = layer_id;
|
| + solid_color_scrollbar_layer_inputs_.scroll_element_id = element_id;
|
| SetNeedsFullTreeSync();
|
| }
|
|
|
|
|