<?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>73645</bug_id>
          
          <creation_ts>2011-12-02 04:21:50 -0800</creation_ts>
          <short_desc>Philip canvas tests fail with non unity device scale factor</short_desc>
          <delta_ts>2012-04-03 14:48:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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>
          <dependson>83072</dependson>
          <blocked>68075</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="John Knottenbelt">jknotten</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>efidler</cc>
    
    <cc>eoconnor</cc>
    
    <cc>fsamuel</cc>
    
    <cc>mdelaney7</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>513671</commentid>
    <comment_count>0</comment_count>
    <who name="John Knottenbelt">jknotten</who>
    <bug_when>2011-12-02 04:21:50 -0800</bug_when>
    <thetext>I&apos;ve tested this on Chromium&apos;s DRT, but I should think that this will apply to all ports that set the page&apos;s deviceScaleFactor to a value other than 1.0

To reproduce in Chromium DRT, add a call to view-&gt;setDeviceScaleFactor(2.0); in TestShell::createNewWindow()

Expected to fail, but passed: (5)
  canvas/philip/tests/2d.line.width.basic.html
  canvas/philip/tests/2d.line.width.transformed.html
  canvas/philip/tests/2d.path.arcTo.shape.curve1.html
  canvas/philip/tests/2d.transformation.setTransform.skewed.html
  canvas/philip/tests/2d.transformation.transform.skewed.html

Regressions: Unexpected text diff mismatch : (41)
  canvas/philip/tests/2d.fillRect.shadow.html = TEXT
  canvas/philip/tests/2d.imageData.get.unaffected.html = TEXT
  canvas/philip/tests/2d.imageData.put.dirty.negative.html = TEXT
  canvas/philip/tests/2d.imageData.put.dirty.rect1.html = TEXT
  canvas/philip/tests/2d.imageData.put.dirty.rect2.html = TEXT
  canvas/philip/tests/2d.imageData.put.modified.html = TEXT
  canvas/philip/tests/2d.line.cap.round.html = TEXT
  canvas/philip/tests/2d.line.join.bevel.html = TEXT
  canvas/philip/tests/2d.line.join.round.html = TEXT
  canvas/philip/tests/2d.pattern.paint.orientation.canvas.html = TEXT
  canvas/philip/tests/2d.shadow.alpha.2.html = TEXT
  canvas/philip/tests/2d.shadow.alpha.3.html = TEXT
  canvas/philip/tests/2d.shadow.alpha.4.html = TEXT
  canvas/philip/tests/2d.shadow.alpha.5.html = TEXT
  canvas/philip/tests/2d.shadow.canvas.alpha.html = TEXT
  canvas/philip/tests/2d.shadow.canvas.basic.html = TEXT
  canvas/philip/tests/2d.shadow.canvas.transparent.2.html = TEXT
  canvas/philip/tests/2d.shadow.clip.1.html = TEXT
  canvas/philip/tests/2d.shadow.clip.3.html = TEXT
  canvas/philip/tests/2d.shadow.gradient.alpha.html = TEXT
  canvas/philip/tests/2d.shadow.gradient.basic.html = TEXT
  canvas/philip/tests/2d.shadow.gradient.transparent.2.html = TEXT
  canvas/philip/tests/2d.shadow.image.alpha.html = TEXT
  canvas/philip/tests/2d.shadow.image.basic.html = TEXT
  canvas/philip/tests/2d.shadow.image.scale.html = TEXT
  canvas/philip/tests/2d.shadow.image.transparent.2.html = TEXT
  canvas/philip/tests/2d.shadow.offset.negativeY.html = TEXT
  canvas/philip/tests/2d.shadow.offset.positiveX.html = TEXT
  canvas/philip/tests/2d.shadow.outside.html = TEXT
  canvas/philip/tests/2d.shadow.pattern.alpha.html = TEXT
  canvas/philip/tests/2d.shadow.pattern.basic.html = TEXT
  canvas/philip/tests/2d.shadow.pattern.transparent.2.html = TEXT
  canvas/philip/tests/2d.shadow.stroke.basic.html = TEXT
  canvas/philip/tests/2d.shadow.stroke.cap.2.html = TEXT
  canvas/philip/tests/2d.shadow.stroke.join.2.html = TEXT
  canvas/philip/tests/2d.shadow.transform.1.html = TEXT
  canvas/philip/tests/2d.shadow.transform.2.html = TEXT
  canvas/philip/tests/2d.strokeRect.shadow.html = TEXT
  canvas/philip/tests/toDataURL.jpeg.primarycolours.html = TEXT
  canvas/philip/tests/toDataURL.png.complexcolours.html = TEXT
  canvas/philip/tests/toDataURL.png.primarycolours.html = TEXT</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513672</commentid>
    <comment_count>1</comment_count>
    <who name="John Knottenbelt">jknotten</who>
    <bug_when>2011-12-02 04:25:10 -0800</bug_when>
    <thetext>One problem is that I think that the tests were written with an assumption of a 1:1 correspondence between canvas dimensions and the backing image data dimensions. 

Related bugs:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15041 and
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15042

However, this won&apos;t account for all the failures.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>562113</commentid>
    <comment_count>2</comment_count>
    <who name="Matthew Delaney">mdelaney7</who>
    <bug_when>2012-02-22 10:27:05 -0800</bug_when>
    <thetext>You&apos;re correct, just about every one of our canvas layout tests (including philip&apos;s) wasn&apos;t written with this behavior in mind. By this behavior, I mean specifically the decision to automatically scale up the backing store and then give all those bits via getImageData and friends. On the same note, this behavior breaks a lot of webpages that use get/putImageData and toDataURL without accounting for the increased backing store.

Even if the way the tests sample the canvas took this behavior into account, there would still be additional side effects from this behavior that our layout tests don&apos;t account for such as rounding differences due to the increased scale.

A large number of tests currently pass largely due to the fact that the pixels that they&apos;re actually checking happen to have the same values (e.g. a whole section of the canvas is green, so sampling the device pixel at x or 2x will likely hit green in both cases).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>