The call to invalidate() was removed on non-macOS in bug 251559 due to causing memory regressions on iOS. We should understand why this is, because invalidate() should be clearing more memory. Maybe it's somehow causing more memory to be used in the GPU process, when GPU process DOM rendering is enabled? (And that's why it didn't show as a regression on macOS?)
<rdar://problem/105197603>
Pull request: https://github.com/WebKit/WebKit/pull/10117