Bug 1422403. Avoid float->integer->float conversion in ToRelativeLayoutRect. r=kats
RoundedToInt converts to ints but we want floats.
MozReview-Commit-ID: 76DtPRc8hnp
--- a/gfx/layers/wr/StackingContextHelper.cpp
+++ b/gfx/layers/wr/StackingContextHelper.cpp
@@ -59,13 +59,15 @@ StackingContextHelper::~StackingContextH
if (mBuilder) {
mBuilder->PopStackingContext();
}
}
wr::LayoutRect
StackingContextHelper::ToRelativeLayoutRect(const LayoutDeviceRect& aRect) const
{
- return wr::ToLayoutRect(RoundedToInt(aRect - mOrigin));
+ auto rect = aRect - mOrigin;
+ rect.Round();
+ return wr::ToLayoutRect(rect);
}
} // namespace layers
} // namespace mozilla