Similar to paint.
Created attachment 376161 [details]
Comment on attachment 376161 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=376161&action=review
> + m_clipStack.removeLast();
If we have mismatched push/pop, this will do shrink(size() - 1); which will underflow and create a huge vector and probably crash. I think we should be defensive here and check for m_clipStack not being empty.
This is especially true since we don't have save/restore, so you're doing manual push/pop.
> + if (paintInfo.phase == PaintPhase::EventRegion)
> + paintInfo.eventRegionContext->popClip();
This is a manual pop, but the painting code is doing a save/restore. Maybe in future it would be better to implement save/restore for the event region context.
If I'm changing painting code in future, it's going to be really hard to know how to change the event region code.
Also, there may be other code paths that save/clip/restore that need to also do something with the event region.
Created attachment 376185 [details]
Comment on attachment 376185 [details]
Clearing flags on attachment: 376185
Committed r248604: <https://trac.webkit.org/changeset/248604>
All reviewed patches have been landed. Closing bug.