<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>30073</bug_id>
          
          <creation_ts>2009-10-05 07:14:27 -0700</creation_ts>
          <short_desc>Need to scale the canvas, not resize it on CSS width/height change</short_desc>
          <delta_ts>2010-01-18 15:09:47 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebGL</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Marrin">cmarrin</reporter>
          <assigned_to name="Chris Marrin">cmarrin</assigned_to>
          <cc>mrowe</cc>
    
    <cc>oliver</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>152287</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Marrin">cmarrin</who>
    <bug_when>2009-10-05 07:14:27 -0700</bug_when>
    <thetext>Canvas should only resize when canvas width and height attributes are changed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156045</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Marrin">cmarrin</who>
    <bug_when>2009-10-19 20:44:46 -0700</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181983</commentid>
    <comment_count>2</comment_count>
      <attachid>46844</attachid>
    <who name="Chris Marrin">cmarrin</who>
    <bug_when>2010-01-18 13:56:59 -0800</bug_when>
    <thetext>Created attachment 46844
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181984</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-01-18 13:59:01 -0800</bug_when>
    <thetext>Attachment 46844 did not pass style-queue:

Failed to run &quot;WebKitTools/Scripts/check-webkit-style&quot; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>182015</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Marrin">cmarrin</who>
    <bug_when>2010-01-18 15:09:47 -0800</bug_when>
    <thetext>Landed in http://trac.webkit.org/changeset/53434</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>46844</attachid>
            <date>2010-01-18 13:56:59 -0800</date>
            <delta_ts>2010-01-18 14:09:12 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>30073.patch</filename>
            <type>text/plain</type>
            <size>1801</size>
            <attacher name="Chris Marrin">cmarrin</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09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+cmVzaGFwZShyLndpZHRoKCksIHIu
aGVpZ2h0KCkpOworICAgIGlmIChjb250ZXh0M0QgIT0gTlVMTCkKICAgICAgICAgY29udGV4dDNE
LT5lbmRQYWludCgpOwotICAgIH0KICNlbmRpZgogfQogCg==
</data>
<flag name="review"
          id="29173"
          type_id="1"
          status="+"
          setter="oliver"
    />
          </attachment>
      

    </bug>

</bugzilla>