Although I haven't been able to reproduce the reporter's OOM crash here, I hope this will avoid the issue; it certainly improves performance characteristics in my local build. On the example here, my laptop happily scrolls the text field at 60fps when nothing is selected; but if the text is selected it can only manage around 40fps, because we lose the clipping optimization here. With this change, it maintains 60fps regardless of whether the text is selected (or text-shadow is present), and memory footprint is substantially reduced. Differential Revision: https://phabricator.services.mozilla.com/D171318