• chaopeng's avatar
    Reland "Recreate DirectManipulationHelper when every LRWHH UpdateParent" · 07da8ba6
    chaopeng authored
    This is a reland of 61450bbc
    
    Original change's description:
    > Recreate DirectManipulationHelper when every LRWHH UpdateParent
    >
    > Compositor and window event target is associated with window's parent. We call
    > LRWHH UpdateParent when window's parent update, includes window's parent
    > actually update and window initialize. Recreate DirectManipulationHelper on
    > every window's parent update helps keep DirectManipulationHelper lifecycle
    > tracking simpler. We also make CompositorAnimationObserver owned by
    > DirectManipulationHelper.
    >
    > With this changes, we start the DirectManipulation event polling when
    > DirectManipulationHelper created and stop when it destroyed. The issue should be
    > fix since event polling start no more depends on DM_POINTERHITTEST.
    >
    >
    > This also includes 2 refactoring changes:
    >
    > 1. Move CompositorAnimationObserver into DirectManipulationHelper.
    > 2. Call ZoomToRect to reset viewport of DirectManipulation when viewport is
    >    actually transformed in RUNNING - READAY sequence.
    >
    > Bug: 914914
    > Change-Id: I0a63f9a407e0231d631e64f2b22a9975471f2fd9
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1547049
    > Reviewed-by: Scott Violet <sky@chromium.org>
    > Commit-Queue: Jianpeng Chao <chaopeng@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#649342}
    
    TBR=sky@chromium.org
    
    Bug: 914914
    Change-Id: Ic0c8aa84d21fe7a88fd9d3552dbd5ffdb6adcc4f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1562582
    Commit-Queue: Jianpeng Chao <chaopeng@chromium.org>
    Reviewed-by: default avatarJianpeng Chao <chaopeng@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#649682}
    07da8ba6
direct_manipulation_win_unittest.cc 22.8 KB