Add test function to expose if in UI-side compositing mode
<rdar://problem/107078044>
Pull request: https://github.com/WebKit/WebKit/pull/11825
Committed 262130@main (e0dffb1d363a): <https://commits.webkit.org/262130@main> Reviewed commits have been landed. Closing PR #11825 and removing active labels.