Bug 1588955. Handle overflow more gracefully in GenerateFallbackData. r=aosmond

It turns out intersecting a rect with an empty rect doesn't
guarantee that the result is empty if overflow happens.

We work around this by checking dtRect for empty as well.

See 1622126 for more details.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jeff Muizelaar 2020-03-13 00:35:18 +00:00
parent 6521fbdd1e
commit a3f3aaddc9

View File

@ -2236,7 +2236,9 @@ WebRenderCommandBuilder::GenerateFallbackData(
}
auto visibleSize = visibleRect.Size();
if (visibleSize.IsEmpty()) {
// these rectangles can overflow from scaling so try to
// catch that with IsEmpty() checks. See bug 1622126.
if (visibleSize.IsEmpty() || dtRect.IsEmpty()) {
return nullptr;
}