This ensures we don't scale the underlying size of the layer beyond what
is close to the current display size. When box shadows get much larger
than this, they start taking so much time to render that successive
frames grow in scale too fast for any inter-frame reuse to be possible.
With this, we avoid that and no longer get crushed by re-rendering
gigantic box shadows every single frame.
See BZ 1383825
Changing to vector makes manipulating display list items more risky.
This is to make sure we don't inadvertently end up with duplicates in
the list of display items avoiding double-free scenarios.
UXP has:
MOZ_RELEASE_ASSERT(sAliveDisplayItemDatas && sAliveDisplayItemDatas >Contains(this));
sAliveDisplayItemDatas->RemoveEntry(this);
and this gets hit during frame destruction.
Combine these checks.