• tdanderson's avatar
    Convert ui::GestureEvent coordinates during targeting · 76b7f06e
    tdanderson authored
    In RootView::DispatchGestureEvent(), use Event::Clone()
    to copy gesture events prior to processing and perform
    coordinate conversion of the events during targeting but
    before dispatch (so the location of the gesture event
    is in the coordinate space of the target).
    
    In preparation for removing
    RootView::DispatchGestureEvent(), also make the
    corresponding changes to
    EventProcessor::OnEventFromSource(). These changes
    are necessary to ensure that located events will
    be dispatched with their locations in the correct
    coordinate space in all situations (in particular,
    when an event is bubbling during an invocation of
    nested event-processing).
    
    BUG=411487
    TEST=WidgetTest.GestureEventLocationWhileBubbling,
         ViewTargeterTest.GestureEventCoordinateConversion,
         modified ViewTargeterTest.ViewTargeterForGestureEvents
    
    Review URL: https://codereview.chromium.org/542323002
    
    Cr-Commit-Position: refs/heads/master@{#293797}
    76b7f06e
view_targeter.cc 3.52 KB