Bug 1522714 - Propagate the 'is async zoom container' flag to HitTestingTreeNode. r=kats

Differential Revision: https://phabricator.services.mozilla.com/D18111

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Botond Ballo 2019-02-06 22:05:24 +00:00
Родитель ad3740ae59
Коммит 03553a5195
4 изменённых файлов: 26 добавлений и 5 удалений

Просмотреть файл

@ -877,7 +877,8 @@ HitTestingTreeNode* APZCTreeManager::PrepareNodeForLayer(
? Some(ParentLayerIntRegion(*aLayer.GetClipRect()))
: Nothing(),
GetEventRegionsOverride(aParent, aLayer),
aLayer.IsBackfaceHidden());
aLayer.IsBackfaceHidden(),
!!aLayer.IsAsyncZoomContainer());
node->SetScrollbarData(aLayer.GetScrollbarAnimationId(),
aLayer.GetScrollbarData());
node->SetFixedPosData(aLayer.GetFixedPositionScrollContainerId());
@ -998,7 +999,8 @@ HitTestingTreeNode* APZCTreeManager::PrepareNodeForLayer(
node->SetHitTestData(GetEventRegions(aLayer), aLayer.GetVisibleRegion(),
aLayer.GetTransformTyped(), clipRegion,
GetEventRegionsOverride(aParent, aLayer),
aLayer.IsBackfaceHidden());
aLayer.IsBackfaceHidden(),
!!aLayer.IsAsyncZoomContainer());
apzc->SetAncestorTransform(aAncestorTransform);
PrintAPZCInfo(aLayer, apzc);
@ -1101,7 +1103,8 @@ HitTestingTreeNode* APZCTreeManager::PrepareNodeForLayer(
node->SetHitTestData(GetEventRegions(aLayer), aLayer.GetVisibleRegion(),
aLayer.GetTransformTyped(), clipRegion,
GetEventRegionsOverride(aParent, aLayer),
aLayer.IsBackfaceHidden());
aLayer.IsBackfaceHidden(),
!!aLayer.IsAsyncZoomContainer());
}
// Note: if layer properties must be propagated to nodes, RecvUpdate in

Просмотреть файл

@ -31,6 +31,7 @@ HitTestingTreeNode::HitTestingTreeNode(AsyncPanZoomController* aApzc,
mLayersId(aLayersId),
mFixedPosTarget(ScrollableLayerGuid::NULL_SCROLL_ID),
mIsBackfaceHidden(false),
mIsAsyncZoomContainer(false),
mOverride(EventRegionsOverride::NoOverride) {
if (mIsPrimaryApzcHolder) {
MOZ_ASSERT(mApzc);
@ -209,13 +210,15 @@ void HitTestingTreeNode::SetHitTestData(
const EventRegions& aRegions, const LayerIntRegion& aVisibleRegion,
const CSSTransformMatrix& aTransform,
const Maybe<ParentLayerIntRegion>& aClipRegion,
const EventRegionsOverride& aOverride, bool aIsBackfaceHidden) {
const EventRegionsOverride& aOverride, bool aIsBackfaceHidden,
bool aIsAsyncZoomContainer) {
mEventRegions = aRegions;
mVisibleRegion = aVisibleRegion;
mTransform = aTransform;
mClipRegion = aClipRegion;
mOverride = aOverride;
mIsBackfaceHidden = aIsBackfaceHidden;
mIsAsyncZoomContainer = aIsAsyncZoomContainer;
}
bool HitTestingTreeNode::IsOutsideClip(const ParentLayerPoint& aPoint) const {
@ -311,6 +314,10 @@ const LayerIntRegion& HitTestingTreeNode::GetVisibleRegion() const {
return mVisibleRegion;
}
bool HitTestingTreeNode::IsAsyncZoomContainer() const {
return mIsAsyncZoomContainer;
}
void HitTestingTreeNode::Dump(const char* aPrefix) const {
if (mPrevSibling) {
mPrevSibling->Dump(aPrefix);

Просмотреть файл

@ -106,7 +106,7 @@ class HitTestingTreeNode {
const CSSTransformMatrix& aTransform,
const Maybe<ParentLayerIntRegion>& aClipRegion,
const EventRegionsOverride& aOverride,
bool aIsBackfaceHidden);
bool aIsBackfaceHidden, bool aIsAsyncZoomContainer);
bool IsOutsideClip(const ParentLayerPoint& aPoint) const;
/* Scrollbar info */
@ -141,6 +141,8 @@ class HitTestingTreeNode {
const CSSTransformMatrix& GetTransform() const;
const LayerIntRegion& GetVisibleRegion() const;
bool IsAsyncZoomContainer() const;
/* Debug helpers */
void Dump(const char* aPrefix = "") const;
@ -195,6 +197,9 @@ class HitTestingTreeNode {
* building time. */
bool mIsBackfaceHidden;
/* Whether layer L is the async zoom container layer. */
bool mIsAsyncZoomContainer;
/* This is clip rect for L that we wish to use for hit-testing purposes. Note
* that this may not be exactly the same as the clip rect on layer L because
* of the touch-sensitive region provided by the GeckoContentController, or

Просмотреть файл

@ -299,6 +299,12 @@ class MOZ_STACK_CLASS WebRenderScrollDataWrapper {
return false;
}
bool IsAsyncZoomContainer() const {
// Similar to IsBackfaceHidden, this is only used by APZCTM hit testing,
// so there is no need to implement it.
return false;
}
const void* GetLayer() const {
MOZ_ASSERT(IsValid());
return mLayer;