RESOLVED FIXED 113343
border-radius clipping a canvas does not always clip
https://bugs.webkit.org/show_bug.cgi?id=113343
Summary border-radius clipping a canvas does not always clip
Rafael Brandao
Reported 2013-03-26 14:41:50 PDT
Created attachment 195167 [details] test case, second render done after a timeout does not clip. When we paint the canvas area, if there's an element as parent that overflows and clips using a border-radius, then the clip does not respect the radius on following render calls. I have a test case that shows this issue on Chrome, Qt and Nix. It may be an issue in other ports.
Attachments
test case, second render done after a timeout does not clip. (552 bytes, text/html)
2013-03-26 14:41 PDT, Rafael Brandao
no flags
patch proposal (5.15 KB, patch)
2013-05-01 17:28 PDT, arno.
no flags
Simon Fraser (smfr)
Comment 1 2013-03-26 14:47:40 PDT
Possibly related to the fact that composited elements don't respect border-radius clipping.
Rafael Brandao
Comment 2 2013-03-26 16:42:14 PDT
If I change the test to do the following, then the second render clips as expected: render = function() { ctx.fillStyle = "#ff0000"; ctx.fillRect(0, 0, 400, 300); } render2 = function() { render(); document.getElementById("box").style.overflow = "hidden"; } render(); setTimeout("render2()", 2000);
Rafael Brandao
Comment 3 2013-03-26 16:43:38 PDT
A small correction: it only properly clips on the second render if the box initially not set "overflow: hidden". It looks like the clip only happens in the first render after "overflow: hidden" is set.
arno.
Comment 4 2013-05-01 17:28:49 PDT
Created attachment 200260 [details] patch proposal
WebKit Commit Bot
Comment 5 2013-05-02 16:32:20 PDT
Comment on attachment 200260 [details] patch proposal Clearing flags on attachment: 200260 Committed r149504: <http://trac.webkit.org/changeset/149504>
WebKit Commit Bot
Comment 6 2013-05-02 16:32:22 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.