Skip to content

Commit

Permalink
Bug 1421384 - Inherit touch-action flags down in the compositor hit-t…
Browse files Browse the repository at this point in the history
…est infos. r=miko

Per the touch-action spec, the effective touch-action on an element includes
touch-action restrictions from ancestor elements up to and including the
element that has the "default action". This patch implements that behaviour
so that WebRender gets correct touch-action values on its display items.

MozReview-Commit-ID: Cw5uqAsE9qm

UltraBlame original commit: 6659f392f4af0cef3cb4a5e19eef7e0e1b045f37
  • Loading branch information
marco-c committed Oct 3, 2019
1 parent 62617b1 commit 25b39cb
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 6 deletions.
6 changes: 0 additions & 6 deletions gfx/layers/apz/test/mochitest/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,6 @@ skip
-
if
=
webrender
|
|
(
verify
&
Expand All @@ -380,9 +377,6 @@ win
'
)
)
#
bug
1424752
[
test_group_wheelevents
.
Expand Down
63 changes: 63 additions & 0 deletions layout/generic/nsFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52962,6 +52962,45 @@ eDispatchToContent
;
}
}
CompositorHitTestInfo
inheritedTouchAction
=
CompositorHitTestInfo
:
:
eInvisibleToHitTest
;
if
(
nsDisplayCompositorHitTestInfo
*
parentInfo
=
aBuilder
-
>
GetCompositorHitTestInfo
(
)
)
{
inheritedTouchAction
=
(
parentInfo
-
>
HitTestInfo
(
)
&
CompositorHitTestInfo
:
:
eTouchActionMask
)
;
}
nsIFrame
*
touchActionFrame
Expand Down Expand Up @@ -52990,7 +53029,31 @@ do_QueryFrame
scrollFrame
)
;
CompositorHitTestInfo
panMask
=
CompositorHitTestInfo
:
:
eTouchActionPanXDisabled
|
CompositorHitTestInfo
:
:
eTouchActionPanYDisabled
;
inheritedTouchAction
&
=
~
panMask
;
}
result
|
=
inheritedTouchAction
;
const
uint32_t
touchAction
Expand Down
11 changes: 11 additions & 0 deletions layout/painting/nsDisplayList.h
Original file line number Diff line number Diff line change
Expand Up @@ -2397,6 +2397,17 @@ mCompositorHitTestInfo
aHitTestInfo
;
}
nsDisplayCompositorHitTestInfo
*
GetCompositorHitTestInfo
(
)
const
{
return
mCompositorHitTestInfo
;
}
void
BuildCompositorHitTestInfoIfNeeded
(
Expand Down

0 comments on commit 25b39cb

Please sign in to comment.