Bug 46319 - REGRESSION: Lots of fast canvas updates fail to completely render
Summary: REGRESSION: Lots of fast canvas updates fail to completely render
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Nobody
URL: http://kanaka.github.com/noVNC/webkit...
Keywords: InRadar, Regression
Depends on:
Reported: 2010-09-22 16:32 PDT by Joel Martin
Modified: 2010-11-09 11:38 PST (History)
9 users (show)

See Also:

Picture of canvas failure to render (68.49 KB, image/png)
2010-09-22 16:34 PDT, Joel Martin
no flags Details
Patch (7.34 KB, patch)
2010-09-28 16:44 PDT, Vincent Scheib
no flags Details | Formatted Diff | Diff
Patch (7.30 KB, patch)
2010-09-30 19:51 PDT, Vincent Scheib
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Martin 2010-09-22 16:32:14 PDT
This page demonstrates the problem: http://kanaka.github.com/noVNC/webkit_canvas_bug.html

When you press the Start button, the noVNC engine will playback the beginning of a VNC/RFB session. You should see a complete 1024x768 Ubuntu desktop rendered below. However, only the first few rows of pixels will render.

Note that the canvas operations have succeeded, but they are simply not rendering correctly; if you resize the browser slightly, the entire desktop will immediately render. Also, if part of the canvas is out of view, when you scroll it into view, those parts show correct rendering.

I bifurcated using Chromium nightly builds on Linux to determine that the problem was introduced after WebKit revision 66240 and before (or in) WebKit revision 66396.

I have also verified that the problem still exists in WebKit-r67643 on Linux and also in the r67637 WebKit nightly build on Windows XP.
Comment 1 Joel Martin 2010-09-22 16:34:34 PDT
Created attachment 68471 [details]
Picture of canvas failure to render

Here is a picture of the state where the canvas commands have completed, but the canvas is not showing all the data (i.e. the image should continue well past the bottom of the window.
Comment 2 Antoine Mercadal 2010-09-23 09:10:09 PDT
I confirm.
Comment 3 Alexey Proskuryakov 2010-09-23 13:09:14 PDT
Confirmed with a local debug build of r68167 on Mac OS X.
Comment 4 Matthew Delaney 2010-09-23 13:54:16 PDT
I believe this was caused by this change: https://bugs.webkit.org/show_bug.cgi?id=44741 http://trac.webkit.org/changeset/66295

CC-ing Vincent.
Comment 5 Simon Fraser (smfr) 2010-09-23 13:56:55 PDT
Comment 6 Vincent Scheib 2010-09-23 16:27:05 PDT
I have it reproduced, and will investigate.
Comment 7 Vincent Scheib 2010-09-27 16:53:48 PDT
This was caused by http://trac.webkit.org/changeset/66295, logic error in CanvasRenderingContext2D::putImageData (sourceRect incorrect).

I have a fix in hand and am looking for tests that should have caught this or will write one.
Comment 8 Vincent Scheib 2010-09-28 16:44:24 PDT
Created attachment 69133 [details]
Comment 9 WebKit Commit Bot 2010-09-30 00:48:31 PDT
Comment on attachment 69133 [details]

Rejecting patch 69133 from commit-queue.

Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', 'build-and-test', '--no-clean', '--no-update', '--test', '--quiet', '--non-interactive']" exit_code: 2
Last 500 characters of output:
Files=14, Tests=304,  1 wallclock secs ( 0.65 cusr +  0.14 csys =  0.79 CPU)
Running build-dumprendertree
Compiling Java tests
make: Nothing to be done for `default'.
Running tests from /Users/abarth/git/webkit-queue/LayoutTests
Testing 21409 test cases.
fast/repaint/canvas-putImageData.html -> failed

Exiting early after 1 failures. 15031 tests run.
201.57s total testing time

15030 test cases (99%) succeeded
1 test case (<1%) had incorrect layout
3 test cases (<1%) had stderr output

Full output: http://queues.webkit.org/results/4157029
Comment 10 Vincent Scheib 2010-09-30 19:51:58 PDT
Created attachment 69415 [details]
Comment 11 Vincent Scheib 2010-09-30 19:53:42 PDT
Comment on attachment 69415 [details]

Previous commit queue failed - caught an error with the test. The expected results had carriage returns in them.
Comment 12 WebKit Commit Bot 2010-10-01 00:29:12 PDT
Comment on attachment 69415 [details]

Clearing flags on attachment: 69415

Committed r68868: <http://trac.webkit.org/changeset/68868>
Comment 13 WebKit Commit Bot 2010-10-01 00:29:18 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Joel Martin 2010-10-01 14:24:10 PDT
Awesome! I pulled the nightly and tested with noVNC. Looks good. Thanks.
Comment 15 Suresh Voruganti 2010-11-04 13:04:51 PDT
Top list error for Services, so please cherry pick the fix for Qtwebkit 2.1