WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 43341
Canvas is not reset when setting canvas.width
https://bugs.webkit.org/show_bug.cgi?id=43341
Summary
Canvas is not reset when setting canvas.width
lvanbass+webkitbugzilla
Reported
2010-08-02 05:56:23 PDT
1) Open this page :
http://codingwithattitude.net/gml/gml-drawer.html
and draw lines on the black canvas (this uses regular mousedown, mousemove and mouseup events) 2) Click on the "clear" action. Expected result: The canvas should be reset by setting its width to the original width Observed result: Nothing. Subsequently drawing on the surface adds a black square covering the old drawing under the new drawing. Platform: WebKit-
r64451
nightly on Windows XP
Attachments
Patch
(1.45 KB, patch)
2010-08-03 21:11 PDT
,
Matthew Delaney
no flags
Details
Formatted Diff
Diff
Patch
(42.96 KB, patch)
2010-08-04 19:26 PDT
,
Matthew Delaney
no flags
Details
Formatted Diff
Diff
Patch
(43.44 KB, patch)
2010-08-05 11:48 PDT
,
Matthew Delaney
no flags
Details
Formatted Diff
Diff
Patch
(43.42 KB, patch)
2010-08-10 11:49 PDT
,
Matthew Delaney
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Matthew Delaney
Comment 1
2010-08-03 21:11:53 PDT
Created
attachment 63409
[details]
Patch
Darin Adler
Comment 2
2010-08-03 22:53:20 PDT
Comment on
attachment 63409
[details]
Patch Bug fixes need a test case. Could you make a test for this one please?
Darin Adler
Comment 3
2010-08-03 22:54:02 PDT
Comment on
attachment 63409
[details]
Patch review- due to lack of regression test Fix itself looks good, although I might move the initialization of hadImageBuffer up even higher.
Matthew Delaney
Comment 4
2010-08-04 19:26:36 PDT
Created
attachment 63534
[details]
Patch
Darin Adler
Comment 5
2010-08-05 07:35:10 PDT
Comment on
attachment 63534
[details]
Patch
> - bool ok; > + bool ok, hadImageBuffer = hasCreatedImageBuffer();
The two booleans should be defined on separate lines. We don't do two on one line like this in WebKit.
> Index: LayoutTests/fast/repaint/setWidthResetAfterForcedRender.html
While this does involve "repainting", I think this is a canvas test and should be in "fast/canvas". Patch is OK as is, so review+ but I'm not setting commit-queue on this so you have a chance to decide whether to make some additional refinements before landing this.
Matthew Delaney
Comment 6
2010-08-05 11:48:32 PDT
Created
attachment 63611
[details]
Patch
WebKit Commit Bot
Comment 7
2010-08-06 02:32:23 PDT
Comment on
attachment 63611
[details]
Patch Rejecting patch 63611 from commit-queue. Failed to run "[u'git', u'svn', u'dcommit']" exit_code: 1 Last 500 characters of output: e/ChangeLog M WebCore/html/HTMLCanvasElement.cpp A repository hook failed: MERGE request failed on '/repository/webkit/trunk': Commit blocked by pre-commit hook (exit code 1) with output: The following files contain tab characters: trunk/LayoutTests/fast/canvas/setWidthResetAfterForcedRender.html Please use spaces instead to indent. If you must commit a file with tabs, use svn propset to set the "allow-tabs" property. at /usr/local/git/libexec/git-core/git-svn line 572 Full output:
http://queues.webkit.org/results/3576985
Matthew Delaney
Comment 8
2010-08-10 11:49:01 PDT
Created
attachment 64035
[details]
Patch
Matthew Delaney
Comment 9
2010-08-10 12:18:52 PDT
Hopefully this one makes the commit bot happy :-)
Kenneth Rohde Christiansen
Comment 10
2010-08-14 08:05:41 PDT
Comment on
attachment 64035
[details]
Patch WebCore/ChangeLog:10 + hasCreatedImageBuffer up *before* the call to setSurface since setSurface I guess this comment would be nice in the code as well.
WebKit Commit Bot
Comment 11
2010-08-14 08:37:06 PDT
Comment on
attachment 64035
[details]
Patch Clearing flags on attachment: 64035 Committed
r65367
: <
http://trac.webkit.org/changeset/65367
>
WebKit Commit Bot
Comment 12
2010-08-14 08:37:11 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.
Top of Page
Format For Printing
XML
Clone This Bug