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]
Created attachment 413909 [details]
Created attachment 413910 [details]
Created attachment 413915 [details]
Committed r269724: <https://trac.webkit.org/changeset/269724>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 413915 [details].