Qt implementation of GraphicsContext::clipToImageBuffer calls internally ImageBuffer::clip.
ImageBuffer::clip creates a alphaMask and push it in TransparencyLayer. However if GraphicsContext does a scale
transformation the alphaMask is not scaled.
Created attachment 98963 [details]
Comment on attachment 98963 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=98963&action=review
> + No new tests. (OOPS!)
Oops indeed! The commit-queue will choke on this line, replace it with one of these three:
1) Tests: list of tests that exercise this change...
2) No new tests because...
3) Awkward silence.
> + QRectF deviceClip = context->platformContext()->transform().mapRect(floatRect);
> + if (alphaMask.width() != deviceClip.width() || alphaMask.height() != deviceClip.height())
> + alphaMask = alphaMask.scaled(deviceClip.width(), deviceClip.height());
We should do this in GraphicsContext::pushTransparencyLayerInternal() instead, then we avoid doing mapRect() twice, and ImageBuffer doesn't need to know about any painter transforms.
Created attachment 99082 [details]
Proposed patch. Update ChangeLog and move scale complexity to GraphicsContext::pushTransparencyLayerInternal.
The commit-queue encountered the following flaky tests while processing attachment 99082 [details]:
http/tests/media/video-cancel-load.html bug 56797 (authors: firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, and email@example.com)
The commit-queue is continuing to process your patch.
Comment on attachment 99082 [details]
Clearing flags on attachment: 99082
Committed r90020: <http://trac.webkit.org/changeset/90020>
All reviewed patches have been landed. Closing bug.