mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 579663. Part 1. Remove unused offset param from GetActiveScrolledRootFor. r=roc
This commit is contained in:
parent
495b7af67e
commit
bbc6dff559
@ -978,12 +978,8 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
||||
}
|
||||
|
||||
nsIFrame* f = item->GetUnderlyingFrame();
|
||||
nsPoint offsetToActiveScrolledRoot;
|
||||
nsIFrame* activeScrolledRoot =
|
||||
nsLayoutUtils::GetActiveScrolledRootFor(f, mBuilder->ReferenceFrame(),
|
||||
&offsetToActiveScrolledRoot);
|
||||
NS_ASSERTION(offsetToActiveScrolledRoot == f->GetOffsetToCrossDoc(activeScrolledRoot),
|
||||
"Wrong offset");
|
||||
nsLayoutUtils::GetActiveScrolledRootFor(f, mBuilder->ReferenceFrame());
|
||||
if (item->IsFixedAndCoveringViewport(mBuilder)) {
|
||||
// Make its active scrolled root be the active scrolled root of
|
||||
// the enclosing viewport, since it shouldn't be scrolled by scrolled
|
||||
@ -993,8 +989,7 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
||||
nsLayoutUtils::GetClosestFrameOfType(f, nsGkAtoms::viewportFrame);
|
||||
NS_ASSERTION(viewportFrame, "no viewport???");
|
||||
activeScrolledRoot =
|
||||
nsLayoutUtils::GetActiveScrolledRootFor(viewportFrame, mBuilder->ReferenceFrame(),
|
||||
&offsetToActiveScrolledRoot);
|
||||
nsLayoutUtils::GetActiveScrolledRootFor(viewportFrame, mBuilder->ReferenceFrame());
|
||||
}
|
||||
|
||||
nscolor uniformColor;
|
||||
|
@ -1124,7 +1124,7 @@ PRBool nsDisplayWrapList::ChildrenCanBeInactive(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* f = i->GetUnderlyingFrame();
|
||||
if (f) {
|
||||
nsIFrame* activeScrolledRoot =
|
||||
nsLayoutUtils::GetActiveScrolledRootFor(f, nsnull, nsnull);
|
||||
nsLayoutUtils::GetActiveScrolledRootFor(f, nsnull);
|
||||
if (activeScrolledRoot != aActiveScrolledRoot)
|
||||
return PR_FALSE;
|
||||
}
|
||||
@ -1248,7 +1248,7 @@ nsDisplayOpacity::GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
if (mFrame->AreLayersMarkedActive())
|
||||
return LAYER_ACTIVE;
|
||||
nsIFrame* activeScrolledRoot =
|
||||
nsLayoutUtils::GetActiveScrolledRootFor(mFrame, nsnull, nsnull);
|
||||
nsLayoutUtils::GetActiveScrolledRootFor(mFrame, nsnull);
|
||||
return !ChildrenCanBeInactive(aBuilder, aManager, mList, activeScrolledRoot)
|
||||
? LAYER_ACTIVE : LAYER_INACTIVE;
|
||||
}
|
||||
@ -1618,7 +1618,7 @@ nsDisplayTransform::GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
if (mFrame->AreLayersMarkedActive())
|
||||
return LAYER_ACTIVE;
|
||||
nsIFrame* activeScrolledRoot =
|
||||
nsLayoutUtils::GetActiveScrolledRootFor(mFrame, nsnull, nsnull);
|
||||
nsLayoutUtils::GetActiveScrolledRootFor(mFrame, nsnull);
|
||||
return !mStoredList.ChildrenCanBeInactive(aBuilder,
|
||||
aManager,
|
||||
*mStoredList.GetList(),
|
||||
|
@ -680,26 +680,19 @@ nsLayoutUtils::GetScrollableFrameFor(nsIFrame *aScrolledFrame)
|
||||
|
||||
nsIFrame*
|
||||
nsLayoutUtils::GetActiveScrolledRootFor(nsIFrame* aFrame,
|
||||
nsIFrame* aStopAtAncestor,
|
||||
nsPoint* aOffset)
|
||||
nsIFrame* aStopAtAncestor)
|
||||
{
|
||||
nsPoint offset(0,0);
|
||||
nsIFrame* f = aFrame;
|
||||
while (f != aStopAtAncestor) {
|
||||
NS_ASSERTION(!IsPopup(f), "Should have stopped before popup");
|
||||
nsPoint extraOffset(0,0);
|
||||
nsIFrame* parent = GetCrossDocParentFrame(f, &extraOffset);
|
||||
nsIFrame* parent = GetCrossDocParentFrame(f);
|
||||
if (!parent)
|
||||
break;
|
||||
nsIScrollableFrame* sf = do_QueryFrame(parent);
|
||||
if (sf && sf->IsScrollingActive() && sf->GetScrolledFrame() == f)
|
||||
break;
|
||||
offset += f->GetPosition() + extraOffset;
|
||||
f = parent;
|
||||
}
|
||||
if (aOffset) {
|
||||
*aOffset = offset;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
||||
|
@ -296,12 +296,9 @@ public:
|
||||
* such ancestor before we reach aStopAtAncestor in the ancestor chain.
|
||||
* We expect frames with the same "active scrolled root" to be
|
||||
* scrolled together, so we'll place them in the same ThebesLayer.
|
||||
* @param aOffset the offset from aFrame to the returned frame is stored
|
||||
* here, if non-null
|
||||
*/
|
||||
static nsIFrame* GetActiveScrolledRootFor(nsIFrame* aFrame,
|
||||
nsIFrame* aStopAtAncestor,
|
||||
nsPoint* aOffset);
|
||||
nsIFrame* aStopAtAncestor);
|
||||
|
||||
/**
|
||||
* GetFrameFor returns the root frame for a view
|
||||
|
Loading…
Reference in New Issue
Block a user