• David Bokan's avatar
    [BlinkGenPropertyTrees] Fix layer commit for wheel handler region · 6a4a425f
    David Bokan authored
    When a wheel event listener is added or removed on a page, we set each
    layer as having a WheelEventHandlerRegion equal to the entire bounds of
    the layer. This happens in Layer::PushPropertiesTo.
    
    This means that when an event listener is changed, we need to cause all
    layers to need a push properties and commit. Prior to this CL, this
    happens in LayerTreeHost::SetEventListenerProperties by setting
    SetNeedsFullTreeSync and SetSubtreePropertyChanged. However, as noted by
    surrounding comments, this looks wrong; SetNeedsFullTreeSync only causes
    the tree structure to be synced, properties aren't pushed.
    SetSubtreePropertyChanged causes a property sync only on the root layer.
    
    This works prior to BGPT because SetNeedsFullTreeSync causes a property
    tree rebuild during which all layers are marked as needing a property
    push. See PropertyTreeBuilderContext::BuildPropertyTreesInternal which
    calls SetLayerPropertyTreeChangedForChild for all child layers as the
    tree is built.
    
    When BGPT is turned on, property trees are built in Blink independent of
    the layer tree so this doesn't cause us to SetNeedsPushProperties. This
    CL fixes SetEventListenerProperties to set the correct flags to
    propagate the listener state to the active tree.
    
    This CL fixes:
    
    PointerLockBrowserTest.PointerLockWheelEventRouting
    TouchpadPinchBrowserTest.WheelListenerAllowingPinch/0
    TouchpadPinchBrowserTest.WheelListenerAllowingPinch/1
    
    With BGPT turned on.
    
    Bug: 912334,881011
    Change-Id: I4446ccfd32de12e618219e5fa15c48f5093bcc98
    Reviewed-on: https://chromium-review.googlesource.com/c/1369059Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
    Commit-Queue: David Bokan <bokan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#615579}
    6a4a425f
layer_tree_host.cc 64.2 KB