mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 812107 - Don't attempt to do scroll compensation in FrameLayerBuilder for transformed containers. r=roc
This commit is contained in:
parent
78ebf85f3c
commit
d11b7e4dd0
@ -2669,19 +2669,29 @@ ChooseScaleAndSetTransform(FrameLayerBuilder* aLayerBuilder,
|
||||
// in the checks below.
|
||||
transform.NudgeToIntegers();
|
||||
}
|
||||
if (aContainerFrame && aState == LAYER_INACTIVE) {
|
||||
gfxMatrix transform2d;
|
||||
if (aContainerFrame &&
|
||||
aState == LAYER_INACTIVE &&
|
||||
(!aTransform || (aTransform->Is2D(&transform2d) &&
|
||||
!transform2d.HasNonTranslation()))) {
|
||||
// When we have an inactive ContainerLayer, translate the container by the offset to the
|
||||
// reference frame (and offset all child layers by the reverse) so that the coordinate
|
||||
// space of the child layers isn't affected by scrolling.
|
||||
// This gets confusing for complicated transform (since we'd have to compute the scale
|
||||
// factors for the matrix), so we don't bother. Any frames that are building an nsDisplayTransform
|
||||
// for a css transform would have 0,0 as their offset to the reference frame, so this doesn't
|
||||
// matter.
|
||||
nsPoint appUnitOffset = aDisplayListBuilder->ToReferenceFrame(aContainerFrame);
|
||||
nscoord appUnitsPerDevPixel = aContainerFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
offset = nsIntPoint(
|
||||
int32_t(NSAppUnitsToDoublePixels(appUnitOffset.x, appUnitsPerDevPixel)*aIncomingScale.mXScale),
|
||||
int32_t(NSAppUnitsToDoublePixels(appUnitOffset.y, appUnitsPerDevPixel)*aIncomingScale.mYScale));
|
||||
}
|
||||
transform = transform * gfx3DMatrix::Translation(offset.x + aIncomingScale.mOffset.x, offset.y + aIncomingScale.mOffset.y, 0);
|
||||
transform = gfx3DMatrix::Translation(aIncomingScale.mOffset.x, aIncomingScale.mOffset.y, 0) *
|
||||
transform *
|
||||
gfx3DMatrix::Translation(offset.x, offset.y, 0);
|
||||
|
||||
|
||||
gfxMatrix transform2d;
|
||||
bool canDraw2D = transform.CanDraw2D(&transform2d);
|
||||
gfxSize scale;
|
||||
bool isRetained = aLayer->Manager()->IsWidgetLayerManager();
|
||||
|
Loading…
Reference in New Issue
Block a user