| Index: cc/layers/layer.cc
|
| diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
|
| index d016571e9094b6ea052661a4dbcee33e80a4d6c5..5ac3829aec1095ddf5b405f4659d494f86c69224 100644
|
| --- a/cc/layers/layer.cc
|
| +++ b/cc/layers/layer.cc
|
| @@ -674,11 +674,6 @@ void Layer::RemoveClipChild(Layer* child) {
|
| void Layer::SetScrollOffset(gfx::Vector2d scroll_offset) {
|
| DCHECK(IsPropertyChangeAllowed());
|
|
|
| - if (layer_tree_host()) {
|
| - scroll_offset = layer_tree_host()->DistributeScrollOffsetToViewports(
|
| - scroll_offset, this);
|
| - }
|
| -
|
| if (scroll_offset_ == scroll_offset)
|
| return;
|
| scroll_offset_ = scroll_offset;
|
| @@ -700,40 +695,6 @@ void Layer::SetScrollOffsetFromImplSide(const gfx::Vector2d& scroll_offset) {
|
| // "this" may have been destroyed during the process.
|
| }
|
|
|
| -// TODO(wjmaclean) We should template this and put it into LayerTreeHostCommon
|
| -// so that both Layer and LayerImpl are using the same code. In order
|
| -// to template it we should avoid calling layer_tree_host() by giving
|
| -// Layer/LayerImpl local accessors for page_scale_layer() and
|
| -// page_scale_factor().
|
| -gfx::Vector2d Layer::MaxScrollOffset() const {
|
| - if (scroll_clip_layer_id_ == INVALID_ID)
|
| - return gfx::Vector2d();
|
| -
|
| - gfx::Size scaled_scroll_bounds(bounds());
|
| - Layer const* current_layer = this;
|
| - Layer const* page_scale_layer = layer_tree_host()->page_scale_layer();
|
| - float scale_factor = 1.f;
|
| - do {
|
| - if (current_layer == page_scale_layer) {
|
| - scale_factor = layer_tree_host()->page_scale_factor();
|
| - scaled_scroll_bounds.SetSize(
|
| - scale_factor * scaled_scroll_bounds.width(),
|
| - scale_factor * scaled_scroll_bounds.height());
|
| - }
|
| - current_layer = current_layer->parent();
|
| - } while (current_layer && current_layer->id() != scroll_clip_layer_id_);
|
| - DCHECK(current_layer);
|
| - DCHECK(current_layer->id() == scroll_clip_layer_id_);
|
| -
|
| - gfx::Vector2dF max_offset(
|
| - scaled_scroll_bounds.width() - current_layer->bounds().width(),
|
| - scaled_scroll_bounds.height() - current_layer->bounds().height());
|
| - // We need the final scroll offset to be in CSS coords.
|
| - max_offset.Scale(1.f / scale_factor);
|
| - max_offset.SetToMax(gfx::Vector2dF());
|
| - return gfx::ToFlooredVector2d(max_offset);
|
| -}
|
| -
|
| void Layer::SetScrollClipLayerId(int clip_layer_id) {
|
| DCHECK(IsPropertyChangeAllowed());
|
| if (scroll_clip_layer_id_ == clip_layer_id)
|
|
|