mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 945634. The fixed-pos anchor point should be in the layer's coordinate system, whose 0,0 is the top-left of the fixed-pos frame. r=mattwoodrow
This commit is contained in:
parent
c6e1a46c08
commit
ef28de860d
@ -1276,7 +1276,8 @@ Layer::PrintInfo(nsACString& aTo, const char* aPrefix)
|
||||
}
|
||||
}
|
||||
if (GetIsFixedPosition()) {
|
||||
aTo.AppendPrintf(" [isFixedPosition anchor=%f,%f]", mAnchor.x, mAnchor.y);
|
||||
aTo.AppendPrintf(" [isFixedPosition anchor=%f,%f margin=%f,%f,%f,%f]", mAnchor.x, mAnchor.y,
|
||||
mMargins.top, mMargins.right, mMargins.bottom, mMargins.left);
|
||||
}
|
||||
if (GetIsStickyPosition()) {
|
||||
aTo.AppendPrintf(" [isStickyPosition scrollId=%d outer=%f,%f %fx%f "
|
||||
|
@ -1674,8 +1674,7 @@ ContainerState::SetFixedPositionLayerData(Layer* aLayer,
|
||||
}
|
||||
|
||||
nsLayoutUtils::SetFixedPositionLayerData(aLayer,
|
||||
viewportFrame, viewportSize, aFixedPosFrame, mContainerReferenceFrame,
|
||||
presContext, mParameters);
|
||||
viewportFrame, viewportSize, aFixedPosFrame, presContext, mParameters);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3363,9 +3363,8 @@ nsDisplayStickyPosition::BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
}
|
||||
|
||||
nsLayoutUtils::SetFixedPositionLayerData(layer, scrollFrame, scrollFrameSize,
|
||||
mStickyPosFrame, ReferenceFrame(),
|
||||
presContext,
|
||||
aContainerParameters);
|
||||
mStickyPosFrame,
|
||||
presContext, aContainerParameters);
|
||||
|
||||
ViewID scrollId = nsLayoutUtils::FindOrCreateIDFor(
|
||||
stickyScrollContainer->ScrollFrame()->GetScrolledFrame()->GetContent());
|
||||
|
@ -1204,14 +1204,13 @@ nsLayoutUtils::SetFixedPositionLayerData(Layer* aLayer,
|
||||
const nsIFrame* aViewportFrame,
|
||||
nsSize aViewportSize,
|
||||
const nsIFrame* aFixedPosFrame,
|
||||
const nsIFrame* aReferenceFrame,
|
||||
nsPresContext* aPresContext,
|
||||
const ContainerLayerParameters& aContainerParameters) {
|
||||
// Find out the rect of the viewport frame relative to the reference frame.
|
||||
// This, in conjunction with the container scale, will correspond to the
|
||||
// coordinate-space of the built layer.
|
||||
float factor = aPresContext->AppUnitsPerDevPixel();
|
||||
nsPoint origin = aViewportFrame->GetOffsetToCrossDoc(aReferenceFrame);
|
||||
nsPoint origin = aViewportFrame->GetOffsetToCrossDoc(aFixedPosFrame);
|
||||
LayerRect anchorRect(NSAppUnitsToFloatPixels(origin.x, factor) *
|
||||
aContainerParameters.mXScale,
|
||||
NSAppUnitsToFloatPixels(origin.y, factor) *
|
||||
|
@ -378,7 +378,6 @@ public:
|
||||
static void SetFixedPositionLayerData(Layer* aLayer, const nsIFrame* aViewportFrame,
|
||||
nsSize aViewportSize,
|
||||
const nsIFrame* aFixedPosFrame,
|
||||
const nsIFrame* aReferenceFrame,
|
||||
nsPresContext* aPresContext,
|
||||
const ContainerLayerParameters& aContainerParameters);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user