gecko-dev/layout
Jamie Nicol 3b6922b0b9 Bug 1594446 - Clamp scale at 32k to avoid excessively large visible regions r=mattwoodrow
The size of the visible region, for either a painted layer or a webrender blob
image, is calculated from the building rects of the contained display items, in
local-space. This should be restricted to the display port, to prevent the
visible regions growing too large leading to excessive memory usage.

For items within large scale transforms, the local-space visible region should
be very small. However, as we do not allow fractional sizes, the size of the
visible region will be rounded up to at least 1. This means that when we convert
the region back to screen-space, we are multiplying the extremely large scale by
at least one, rather than by a much smaller fraction. This can result in
incredibly large visible regions, and was causing OOM crashes.

To avoid this, we clamp the maximum chosen scale for these layers/blob images to
32k. Layers affected by this problem should have a visible region with
dimensions of 1 or 2, so this limits the resulting screen-space size for
those to an acceptable value. Layers with visible regions sized greater than
that should not have scales anywhere near this large, so will not be affected.

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

--HG--
extra : moz-landing-system : lando
2019-12-05 11:39:01 +00:00
..
base Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky 2019-12-05 04:44:32 +00:00
build Bug 1599843 - nsJSProtocolHandler construction should be simpler. r=bzbarsky 2019-11-27 20:05:02 +00:00
doc
forms Bug 1600202 - Make test_bug717878_input_scroll.html cope with native themes that has a large padding better, and extend the test to also check non-themed controls. r=dbaron 2019-12-02 16:41:02 +00:00
generic Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky 2019-12-05 04:44:32 +00:00
inspector Bug 1590280 - Allow to use the sheet cache to avoid parsing as long as CSSOM hasn't mutated the stylesheet. r=heycam 2019-12-03 11:04:03 +00:00
ipc
mathml Bug 1455716 - Followup to fix review comments. r=bzbarsky 2019-12-05 10:36:12 +00:00
media
painting Bug 1594446 - Clamp scale at 32k to avoid excessively large visible regions r=mattwoodrow 2019-12-05 11:39:01 +00:00
printing Bug 1599161 - Rename nsLayoutStylesheetCache to GlobalStyleSheetCache. r=boris 2019-11-25 22:08:43 +00:00
reftests Bug 1600998 - Remove layout.css.xul-box-display-values.survive-blockification.enabled. r=dholbert 2019-12-05 06:12:47 +00:00
style Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky 2019-12-05 04:44:32 +00:00
svg Bug 1600855 - Avoid SVG text calling gfxTextRun::GetAdvanceWidth for ranges that cross text frame boundaries. r=longsonr 2019-12-03 21:22:46 +00:00
tables Bug 1017137 - Don't report Complete status in table-row-group fragmentation if it still has more rows to flow after filling the availble size. r=TYLin 2019-12-02 16:40:47 +00:00
tools Bug 1599662 - Add process switching to the reftest harness so that we can get better coverage for fission. r=kmag 2019-12-04 08:57:11 +00:00
xul Bug 1600998 - Remove layout.css.xul-box-display-values.survive-blockification.enabled. r=dholbert 2019-12-05 06:12:47 +00:00
moz.build