Bug 1556421. Fix DrawTargetOffset::GetRect. r=mstange

We want to ensure that we include the underlying DrawTarget's origin.

Differential Revision: https://phabricator.services.mozilla.com/D33518

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jeff Muizelaar 2019-06-06 14:11:10 +00:00
parent 5826a9c1f4
commit 620457f85d

View File

@ -64,7 +64,7 @@ class DrawTargetOffset : public DrawTarget {
virtual void DetachAllSnapshots() override;
virtual IntSize GetSize() const override { return mDrawTarget->GetSize(); }
virtual IntRect GetRect() const override {
return IntRect(mOrigin, GetSize());
return mDrawTarget->GetRect() + mOrigin;
}
virtual void Flush() override;