diff options
author | leviw <leviw@chromium.org> | 2016-03-18 16:21:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-18 23:22:05 +0000 |
commit | 6d17a1bfafce005d086278b83889fb5945ade2d1 (patch) | |
tree | 9907b2e7987a09bdc848d6bbfc420fe87720144c /cc | |
parent | b793f945e5981fa6bf5b9e7d9c6b4782689e97ec (diff) | |
download | chromium_src-6d17a1bfafce005d086278b83889fb5945ade2d1.zip chromium_src-6d17a1bfafce005d086278b83889fb5945ade2d1.tar.gz chromium_src-6d17a1bfafce005d086278b83889fb5945ade2d1.tar.bz2 |
Revert of Fix display of wheel event listeners on a page. (patchset #1 id:1 of https://codereview.chromium.org/1810363002/ )
Reason for revert:
Failing on continuous builders.
https://chromegw.corp.google.com/i/official.desktop.continuous/builders/win%20stable/builds/464/steps/compile/logs/stdio
BUG=596215
Original issue's description:
> Fix display of wheel event listeners on a page.
>
> Fields were getting duplicated for scrollbars. Mark the entire
> inner viewport as blocked on scroll if we have a wheel listener
> we don't need to iterate the tree.
>
> BUG=595591
> CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
>
> Committed: https://crrev.com/8f35ce554d594f2069d7f4515602e3fb6a5fc5a9
> Cr-Commit-Position: refs/heads/master@{#382053}
TBR=aelias@chromium.org,dtapuska@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=595591
Review URL: https://codereview.chromium.org/1816723003
Cr-Commit-Position: refs/heads/master@{#382131}
Diffstat (limited to 'cc')
-rw-r--r-- | cc/debug/debug_rect_history.cc | 26 | ||||
-rw-r--r-- | cc/debug/debug_rect_history.h | 1 |
2 files changed, 14 insertions, 13 deletions
diff --git a/cc/debug/debug_rect_history.cc b/cc/debug/debug_rect_history.cc index cc8d123..80c58383 100644 --- a/cc/debug/debug_rect_history.cc +++ b/cc/debug/debug_rect_history.cc @@ -174,26 +174,26 @@ void DebugRectHistory::SaveTouchEventHandlerRectsCallback(LayerImpl* layer) { } } -void DebugRectHistory::SaveWheelEventHandlerRects(LayerImpl* root_layer) { +void DebugRectHistory::SaveWheelEventHandlerRects(LayerImpl* layer) { + LayerTreeHostCommon::CallFunctionForSubtree(layer, [this](LayerImpl* layer) { + SaveWheelEventHandlerRectsCallback(layer); + }); +} + +void DebugRectHistory::SaveWheelEventHandlerRectsCallback(LayerImpl* layer) { EventListenerProperties event_properties = - root_layer->layer_tree_impl()->event_listener_properties( + layer->layer_tree_impl()->event_listener_properties( EventListenerClass::kMouseWheel); if (event_properties == EventListenerProperties::kNone || - (root_layer->layer_tree_impl()->settings().use_mouse_wheel_gestures && + (layer->layer_tree_impl()->settings().use_mouse_wheel_gestures && event_properties == EventListenerProperties::kPassive)) { return; } - // Since the wheel event handlers property is on the entire layer tree just - // mark inner viewport if have listeners. - LayerImpl* inner_viewport = - root_layer->layer_tree_impl()->InnerViewportScrollLayer(); - if (!inner_viewport) - return; - debug_rects_.push_back(DebugRect( - WHEEL_EVENT_HANDLER_RECT_TYPE, - MathUtil::MapEnclosingClippedRect(inner_viewport->ScreenSpaceTransform(), - gfx::Rect(inner_viewport->bounds())))); + debug_rects_.push_back( + DebugRect(WHEEL_EVENT_HANDLER_RECT_TYPE, + MathUtil::MapEnclosingClippedRect(layer->ScreenSpaceTransform(), + gfx::Rect(layer->bounds())))); } void DebugRectHistory::SaveScrollEventHandlerRects(LayerImpl* layer) { diff --git a/cc/debug/debug_rect_history.h b/cc/debug/debug_rect_history.h index 0057817..bea3467 100644 --- a/cc/debug/debug_rect_history.h +++ b/cc/debug/debug_rect_history.h @@ -87,6 +87,7 @@ class DebugRectHistory { void SaveTouchEventHandlerRects(LayerImpl* layer); void SaveTouchEventHandlerRectsCallback(LayerImpl* layer); void SaveWheelEventHandlerRects(LayerImpl* layer); + void SaveWheelEventHandlerRectsCallback(LayerImpl* layer); void SaveScrollEventHandlerRects(LayerImpl* layer); void SaveScrollEventHandlerRectsCallback(LayerImpl* layer); void SaveNonFastScrollableRects(LayerImpl* layer); |