• dmazzoni's avatar
    Fix system freeze in accessibility focus ring code. · 822d339a
    dmazzoni authored
    The change to accessibility_focus_ring_layer.cc prevents an endless loop if
    the input ring is all the same point.
    
    The change to accessibility_focus_ring_controller.cc addresses the underlying
    cause - the timestamp we get from CompositorAnimationObserver::OnAnimationStep
    is not guaranteed to be later than the most recent focus time (in practice,
    it's up to 0.002 s earlier on an ARM Chromebook). A negative delta time
    turned into NaN when we computed pow(fraction, 0.3) and that led to the
    input ring being all zeros, triggering the issue above.
    
    BUG=427649
    
    Review URL: https://codereview.chromium.org/693623003
    
    Cr-Commit-Position: refs/heads/master@{#302178}
    822d339a
accessibility_focus_ring_controller.cc 10.3 KB