Comment 1 for bug 1501473

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

It looks like a scroll animation is never created when the event is passed to the compositor. If I break in the for-loop in LayerTreeHostImpl::ScrollAnimated, just after |actual_delta| is calculated:

      gfx::ScrollOffset current_offset = layer_impl->CurrentScrollOffset();
      gfx::ScrollOffset target_offset =
          ScrollOffsetWithDelta(current_offset, pending_delta);
      target_offset.SetToMax(gfx::ScrollOffset());
      target_offset.SetToMin(layer_impl->MaxScrollOffset());
      gfx::Vector2dF actual_delta = target_offset.DeltaFrom(current_offset);

      const float kEpsilon = 0.1f;
      bool can_layer_scroll = (std::abs(actual_delta.x()) > kEpsilon ||
                               std::abs(actual_delta.y()) > kEpsilon);

(gdb) p actual_delta
$65 = {x_ = 0, y_ = 0}
(gdb) p target_offset
$66 = {x_ = 0, y_ = 53.333332061767578}
(gdb) p current_offset
$67 = {x_ = 0, y_ = 0}

The value of |actual_delta| looks bogus