Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Issue 2718833002: Refactor unreliable hit test code to avoid owning_layers (Closed)

Created:
3 years, 10 months ago by pdr.
Modified:
3 years, 9 months ago
Reviewers:
bokan, ajuma
CC:
cc-bugs_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor unreliable hit test code to avoid owning_layers In [1] we switched the unreliable hit test code from using ScrollNode's owning_layer to using the ScrollTree's layer_id_to_scroll_node_index. This patch improves on [1] to not use layer_id_to_scroll_node_index either, which turned out to be owning_layer in disguise. The existing IsClosestScrollAncestor code has been refactored into a helper (IsInitialScrollHitTestReliable) that makes the main thread fallback cases more obvious (see: [2,3]). A test has been added for the failure case noticed by Ali Juma in [1] where a drawn scrollbar is the child of a scrolling layer but itself does not scroll. [1] https://codereview.chromium.org/2702143002 [2] https://codereview.chromium.org/238803005 [3] https://codereview.chromium.org/1878323002 BUG=693740 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2718833002 Cr-Commit-Position: refs/heads/master@{#453462} Committed: https://chromium.googlesource.com/chromium/src/+/47fcc62bde25cb7275e56c3b256c0d0dc75aefaa

Patch Set 1 #

Patch Set 2 : Fix mistake in HitTestVisibleScrollableOrTouchableFunctor, cleaup comments #

Total comments: 8

Patch Set 3 : Fix bug when directly hitting a drawn scrollbar #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -46 lines) Patch
M cc/layers/layer_impl.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 4 chunks +42 lines, -33 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 1 chunk +60 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 1 chunk +6 lines, -12 lines 0 comments Download

Messages

Total messages: 28 (16 generated)
pdr.
3 years, 9 months ago (2017-02-27 21:15:56 UTC) #9
pdr.
https://codereview.chromium.org/2718833002/diff/20001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (left): https://codereview.chromium.org/2718833002/diff/20001/cc/trees/layer_tree_host_impl.cc#oldcode2648 cc/trees/layer_tree_host_impl.cc:2648: if (scroll_node->scrollable) The refactoring in this patch is possible ...
3 years, 9 months ago (2017-02-27 21:40:05 UTC) #12
bokan
I'll leave the finer points to Ali but the cleanup in general lgtm
3 years, 9 months ago (2017-02-27 22:38:15 UTC) #15
ajuma
Generally looks great! Just have a couple questions: https://codereview.chromium.org/2718833002/diff/20001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/2718833002/diff/20001/cc/trees/layer_tree_host_impl.cc#newcode2737 cc/trees/layer_tree_host_impl.cc:2737: first_scrolling_layer_or_drawn_scrollbar ...
3 years, 9 months ago (2017-02-28 00:38:58 UTC) #16
pdr.
https://codereview.chromium.org/2718833002/diff/20001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/2718833002/diff/20001/cc/trees/layer_tree_host_impl.cc#newcode2737 cc/trees/layer_tree_host_impl.cc:2737: first_scrolling_layer_or_drawn_scrollbar == layer_impl) On 2017/02/28 at 00:38:58, ajuma wrote: ...
3 years, 9 months ago (2017-02-28 01:01:36 UTC) #17
ajuma
Thanks! lgtm
3 years, 9 months ago (2017-02-28 01:05:10 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2718833002/40001
3 years, 9 months ago (2017-02-28 01:06:56 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/47fcc62bde25cb7275e56c3b256c0d0dc75aefaa
3 years, 9 months ago (2017-02-28 02:23:04 UTC) #24
findit-for-me
FYI: Findit identified this CL at revision 453462 as the culprit for failures in the ...
3 years, 9 months ago (2017-02-28 05:38:13 UTC) #25
pdr.
On 2017/02/28 at 05:38:13, findit-for-me wrote: > FYI: Findit identified this CL at revision 453462 ...
3 years, 9 months ago (2017-02-28 05:59:53 UTC) #26
pdr.
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/2723553003/ by pdr@chromium.org. ...
3 years, 9 months ago (2017-02-28 06:00:20 UTC) #27
pdr.
3 years, 9 months ago (2017-02-28 19:14:58 UTC) #28
Message was sent while issue was closed.
On 2017/02/28 at 06:00:20, pdr. wrote:
> A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/2723553003/ by pdr@chromium.org.
> 
> The reason for reverting is: May have caused
RenderWidgetHostViewChildFrameTest.SwapCompositorFrame to fail on windows..

Turned out to be unrelated to this patch. Relanding in
https://codereview.chromium.org/2720713004

Powered by Google App Engine
This is Rietveld 408576698