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 30073
Need to scale the canvas, not resize it on CSS width/height change
https://bugs.webkit.org/show_bug.cgi?id=30073
Summary
Need to scale the canvas, not resize it on CSS width/height change
Chris Marrin
Reported
2009-10-05 07:14:27 PDT
Canvas should only resize when canvas width and height attributes are changed
Attachments
Patch
(1.76 KB, patch)
2010-01-18 13:56 PST
,
Chris Marrin
oliver
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Marrin
Comment 1
2009-10-19 20:44:46 PDT
Another odd characteristic of this bug happens if you open (for instance):
http://webkit.org/blog-files/webgl/ManyPlanetsDeep.html
and then hit cmd-+. The planets get smaller. This is happening because I am looking at the CSS size to set the canvas, but at the canvas width and height to set the viewport. The canvas size doesn't change but the css size gets bigger, so the viewport is small relative to the canvas size. This is all fixed by not changing the canvas based on the CSS size, which is what fixing this bug will do.
Chris Marrin
Comment 2
2010-01-18 13:56:59 PST
Created
attachment 46844
[details]
Patch
WebKit Review Bot
Comment 3
2010-01-18 13:59:01 PST
Attachment 46844
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/html/HTMLCanvasElement.cpp:277: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] WebCore/html/HTMLCanvasElement.cpp:277: Use 0 instead of NULL. [readability/null] [5] Total errors found: 2 If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Marrin
Comment 4
2010-01-18 15:09:47 PST
Landed in
http://trac.webkit.org/changeset/53434
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