зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1552608 - Propagate the fixed-position sides to the hit testing tree. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D48375 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a3395bb518
Коммит
4268dbf031
|
@ -406,6 +406,12 @@ class MOZ_STACK_CLASS LayerMetricsWrapper final {
|
|||
return mLayer->GetFixedPositionScrollContainerId();
|
||||
}
|
||||
|
||||
SideBits GetFixedPositionSides() const {
|
||||
MOZ_ASSERT(IsValid());
|
||||
|
||||
return mLayer->GetFixedPositionSides();
|
||||
}
|
||||
|
||||
Maybe<uint64_t> GetZoomAnimationId() const {
|
||||
MOZ_ASSERT(IsValid());
|
||||
// This function is only really needed for template-compatibility with
|
||||
|
|
|
@ -992,7 +992,8 @@ HitTestingTreeNode* APZCTreeManager::PrepareNodeForLayer(
|
|||
: Nothing());
|
||||
node->SetScrollbarData(aLayer.GetScrollbarAnimationId(),
|
||||
aLayer.GetScrollbarData());
|
||||
node->SetFixedPosData(aLayer.GetFixedPositionScrollContainerId());
|
||||
node->SetFixedPosData(aLayer.GetFixedPositionScrollContainerId(),
|
||||
aLayer.GetFixedPositionSides());
|
||||
return node;
|
||||
}
|
||||
|
||||
|
@ -1216,7 +1217,8 @@ HitTestingTreeNode* APZCTreeManager::PrepareNodeForLayer(
|
|||
// when those properties change.
|
||||
node->SetScrollbarData(aLayer.GetScrollbarAnimationId(),
|
||||
aLayer.GetScrollbarData());
|
||||
node->SetFixedPosData(aLayer.GetFixedPositionScrollContainerId());
|
||||
node->SetFixedPosData(aLayer.GetFixedPositionScrollContainerId(),
|
||||
aLayer.GetFixedPositionSides());
|
||||
return node;
|
||||
}
|
||||
|
||||
|
|
|
@ -133,14 +133,17 @@ const ScrollbarData& HitTestingTreeNode::GetScrollbarData() const {
|
|||
}
|
||||
|
||||
void HitTestingTreeNode::SetFixedPosData(
|
||||
ScrollableLayerGuid::ViewID aFixedPosTarget) {
|
||||
ScrollableLayerGuid::ViewID aFixedPosTarget, SideBits aFixedPosSides) {
|
||||
mFixedPosTarget = aFixedPosTarget;
|
||||
mFixedPosSides = aFixedPosSides;
|
||||
}
|
||||
|
||||
ScrollableLayerGuid::ViewID HitTestingTreeNode::GetFixedPosTarget() const {
|
||||
return mFixedPosTarget;
|
||||
}
|
||||
|
||||
SideBits HitTestingTreeNode::GetFixedPosSides() const { return mFixedPosSides; }
|
||||
|
||||
void HitTestingTreeNode::SetPrevSibling(HitTestingTreeNode* aSibling) {
|
||||
mPrevSibling = aSibling;
|
||||
if (aSibling) {
|
||||
|
|
|
@ -125,8 +125,10 @@ class HitTestingTreeNode {
|
|||
|
||||
/* Fixed pos info */
|
||||
|
||||
void SetFixedPosData(ScrollableLayerGuid::ViewID aFixedPosTarget);
|
||||
void SetFixedPosData(ScrollableLayerGuid::ViewID aFixedPosTarget,
|
||||
SideBits aFixedPosSides);
|
||||
ScrollableLayerGuid::ViewID GetFixedPosTarget() const;
|
||||
SideBits GetFixedPosSides() const;
|
||||
|
||||
/* Convert |aPoint| into the LayerPixel space for the layer corresponding to
|
||||
* this node. |aTransform| is the complete (content + async) transform for
|
||||
|
@ -183,6 +185,7 @@ class HitTestingTreeNode {
|
|||
ScrollbarData mScrollbarData;
|
||||
|
||||
ScrollableLayerGuid::ViewID mFixedPosTarget;
|
||||
SideBits mFixedPosSides;
|
||||
|
||||
/* Let {L,M} be the {layer, scrollable metrics} pair that this node
|
||||
* corresponds to in the layer tree. mEventRegions contains the event regions
|
||||
|
|
|
@ -364,6 +364,13 @@ class MOZ_STACK_CLASS WebRenderScrollDataWrapper final {
|
|||
return mLayer->GetFixedPositionScrollContainerId();
|
||||
}
|
||||
|
||||
SideBits GetFixedPositionSides() const {
|
||||
MOZ_ASSERT(IsValid());
|
||||
|
||||
// TODO: Implement for WebRender.
|
||||
return eSideBitsNone;
|
||||
}
|
||||
|
||||
Maybe<uint64_t> GetZoomAnimationId() const {
|
||||
MOZ_ASSERT(IsValid());
|
||||
return mLayer->GetZoomAnimationId();
|
||||
|
|
Загрузка…
Ссылка в новой задаче