<?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>83189</bug_id>
          
          <creation_ts>2012-04-04 12:07:58 -0700</creation_ts>
          <short_desc>Canvas inside SVG(foreignObject) positioning error</short_desc>
          <delta_ts>2022-06-01 19:37:25 -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>SVG</component>
          <version>420+</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.6</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>23113</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="olamothe">olivier_lamothe</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>dmitrijs.balcers</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>595775</commentid>
    <comment_count>0</comment_count>
    <who name="olamothe">olivier_lamothe</who>
    <bug_when>2012-04-04 12:07:58 -0700</bug_when>
    <thetext>Overview 
A positioning error occur when a canvas is placed inside a foreignObject tag. If the canvas is drawn with hardware acceleration , the transform attribute is not applied correctly.
Probably related in some way to : https://bugs.webkit.org/show_bug.cgi?id=71819

Step to reproduce :

Go to  : http://jsfiddle.net/olamothe/QZRf3/ 
Change the canvas width between 256&lt;--&gt;257

Actual results :

The transform attribute is not applied correctly when the canvas size is over 257. Canvas is moved to (0,0)

Expected results :

Canvas should always be at (100,100) I.E : the transform-translate attribute


Additional information :

Chrome 18.0.1025.142
Mac OS X 10.6.8

The underlying problem is not really the canvas size, it&apos;s actually when the canvas is being rendered with the aid of the hardware. It just so happen that in chrome 18 , canvas over 256 pixel in width or height are rendered with the aid of the GPU. The same effect can be achieved with safari 5.1.5 if you force it to render with hardware ( eg : -webkit-transform : translateZ(0) )
It is also not only linked to the canvas tag. For example if you replace the canvas with a div in the jsfiddle , and apply a CSS 3d transform, the same thing happen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1861416</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitrijs Balcers">dmitrijs.balcers</who>
    <bug_when>2022-04-14 01:24:33 -0700</bug_when>
    <thetext>I have reproduced the same issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1873424</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-06-01 16:24:53 -0700</bug_when>
    <thetext>I am still able to reproduce this using attached test case in Safari 15.5 and Safari Technical Preview 146 on macOS 12.4. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1873465</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-06-01 18:36:35 -0700</bug_when>
    <thetext>&lt;rdar://problem/94259941&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1873499</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-06-01 19:37:25 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 23113 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>