This is very similar to the DisplayList::DrawImageBuffer item. All we need is to record the renderingResourceIdentifier of the ImageBuffer. At replaying time, the renderingResourceIdentifier of the ClipToImageBuffer will be resolved to an ImageBuffer. The actual clipping will be moved to an new function named ImageBuffer::clipToMask().
Created attachment 413908 [details] Patch
Created attachment 413909 [details] Patch
Created attachment 413910 [details] Patch
Created attachment 413915 [details] Patch
Committed r269724: <https://trac.webkit.org/changeset/269724> All reviewed patches have been landed. Closing bug and clearing flags on attachment 413915 [details].
<rdar://problem/71318029>