Chromium Code Reviews| Index: cc/layers/layer_impl.cc |
| diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc |
| index 2b1193370eee237e307ce28f4074ce6a3134ce8c..9081fa581d8db15a02682a163ac4d43700b71728 100644 |
| --- a/cc/layers/layer_impl.cc |
| +++ b/cc/layers/layer_impl.cc |
| @@ -402,18 +402,10 @@ void LayerImpl::ApplySentScrollDeltasFromAbortedCommit() { |
| // Apply sent scroll deltas to scroll position / scroll delta as if the |
| // main thread had applied them and then committed those values. |
| - // |
| - // This function should not change the total scroll offset; it just shifts |
| - // some of the scroll delta to the scroll offset. Therefore, adjust these |
| - // variables directly rather than calling the scroll offset delegate to |
| - // avoid sending it multiple spurious calls. |
| - // |
| - // Because of the way scroll delta is calculated with a delegate, this will |
| - // leave the total scroll offset unchanged on this layer regardless of |
| - // whether a delegate is being used. |
| - scroll_offset_ += gfx::ScrollOffset(sent_scroll_delta_); |
| - scroll_delta_ -= sent_scroll_delta_; |
| - sent_scroll_delta_ = gfx::Vector2dF(); |
| + SetScrollOffsetAndDelta( |
| + scroll_offset_ + gfx::ScrollOffset(sent_scroll_delta_), |
| + ScrollDelta() - sent_scroll_delta_); |
|
bokan
2014/10/29 23:55:42
SetScrollOffsetAndDelta sets the unsent delta on t
aelias_OOO_until_Jul13
2014/10/30 01:46:55
Empirically I don't see any bugs if I try scrollin
|
| + SetSentScrollDelta(gfx::Vector2dF()); |
| } |
| void LayerImpl::ApplyScrollDeltasSinceBeginMainFrame() { |