Bug 1399050 - Apply inherited scale on 3d transform as well. r=kats

MozReview-Commit-ID: 8F1d4NzVcam
This commit is contained in:
Morris Tseng 2017-09-13 17:07:17 +08:00
parent afa14cd3bb
commit b15936e47c

View File

@ -92,16 +92,16 @@ StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParen
mTransform = *aTransformPtr;
}
// Apply the inherited scale from parent
mTransform.PostScale(aParentSC.mXScale, aParentSC.mYScale, 1.0);
mTransform.NudgeToIntegersFixedEpsilon();
bool is2d = !aTransformPtr || (aTransformPtr->Is2D() && !aPerspectivePtr);
if (is2d) {
nsRect itemBounds = aDisplayList->GetClippedBoundsWithRespectToASR(aDisplayListBuilder, aItem->GetActiveScrolledRoot());
nsRect childrenVisible = aItem->GetVisibleRectForChildren();
visibleRect = itemBounds.Intersect(childrenVisible);
// Apply the inherited scale from parent
mTransform.PostScale(aParentSC.mXScale, aParentSC.mYScale, 1.0);
mTransform.NudgeToIntegersFixedEpsilon();
gfx::Size scale = mTransform.As2D().ScaleFactors(true);
// Restore the scale to default if the scale is too small