• bokan's avatar
    Made double-tap zoom work in pinch virtual viewport mode (Chromium-side). · 59379b09
    bokan authored
    On the Blink side:
    The clamping method used by computeScaleAndScrollForBlockRect now
    uses a new method PinchViewport::clampDocumentOffsetAtScale to clamp
    the requested viewport offset taking into account the inner and outer
    viewports.
    
    Also added an overload of applyViewportDeltas, called in virtual
    viewport mode only, that applies the inner and outer deltas along
    page scale in one shot. This makes the viewport layers a special case
    again in that their scroll offsets are set through this call, rather
    than the standard 'did_scroll' callback of most layers. This is needed
    since the scroll offsets may be invalid until the page scale is
    applied so this is handled in one method to prevent unintended
    clamping.
    
    On the Compositor side:
    Calls the appropriate applyViewportDeltas based on which pinch mode
    we're running in. The page scale animation now prefers to scroll the
    inner viewport first, scrolling the outer only when the inner has
    reached its scroll extent.
    
    Blink-side: https://codereview.chromium.org/584833003
    
    BUG=364106
    
    Review URL: https://codereview.chromium.org/585063002
    
    Cr-Commit-Position: refs/heads/master@{#297167}
    59379b09
layer_tree_host_impl.cc 121 KB