Chromium Code Reviews| Index: cc/trees/layer_tree_host_common.cc |
| diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc |
| index e12e272653ab7fa2ed335c41ed084711a0da16c0..4a14d02432ccf754fa1bef7c3e1d53441239d7f5 100644 |
| --- a/cc/trees/layer_tree_host_common.cc |
| +++ b/cc/trees/layer_tree_host_common.cc |
| @@ -46,13 +46,15 @@ static void SortLayers(LayerImplList::iterator first, |
| template <typename LayerType> |
| static gfx::Vector2dF GetEffectiveScrollDelta(LayerType* layer) { |
| - gfx::Vector2dF scroll_delta = layer->ScrollDelta(); |
| + gfx::Vector2dF scroll_delta = |
| + layer->ScrollDelta() + layer->MainScrollOffsetFracitionalPart(); |
|
aelias_OOO_until_Jul13
2015/01/28 02:04:00
Please add a comment explaining why the fractional
Yufeng Shen (Slow to review)
2015/01/28 22:28:09
Done.
|
| // The scroll parent's scroll delta is the amount we've scrolled on the |
| // compositor thread since the commit for this layer tree's source frame. |
| // we last reported to the main thread. I.e., it's the discrepancy between |
| // a scroll parent's scroll delta and offset, so we must add it here. |
| if (layer->scroll_parent()) |
| - scroll_delta += layer->scroll_parent()->ScrollDelta(); |
| + scroll_delta += layer->scroll_parent()->ScrollDelta() + |
| + layer->scroll_parent()->MainScrollOffsetFracitionalPart(); |
| return scroll_delta; |
| } |