<?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>135616</bug_id>
          
          <creation_ts>2014-08-05 12:02:45 -0700</creation_ts>
          <short_desc>SVGRenderingContext::createImageBuffer is not retina (2x) compatible (affects &lt;mask&gt;)</short_desc>
          <delta_ts>2017-01-05 18:22:32 -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>SVG</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=166750</see_also>
          <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>
          
          <blocked>151737</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Timothy Hatcher">timothy</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thaddee.tyl</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1026911</commentid>
    <comment_count>0</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-08-05 12:02:45 -0700</bug_when>
    <thetext>SVGRenderingContext::createImageBuffer always makes a 1x buffer. This makes &lt;mask&gt; and maybe other things always use 1x on 2x devices.

We really need to audit all places that call ImageBuffer::create with a hardcoded 1!

(This was going to affect Web Inspector but I was able to use &lt;clipPath&gt; instead.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1084406</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-04-10 16:45:32 -0700</bug_when>
    <thetext>&lt;rdar://problem/20506912&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1259917</commentid>
    <comment_count>2</comment_count>
      <attachid>297130</attachid>
    <who name="Thaddee Tyl">thaddee.tyl</who>
    <bug_when>2016-12-14 14:53:03 -0800</bug_when>
    <thetext>Created attachment 297130
Test case: the two circles should look identical.

I would like to point out that this is not just an issue for Retina screens; it also affects zoomed in pages (either manually or through CSS).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264305</commentid>
    <comment_count>3</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2017-01-05 18:05:49 -0800</bug_when>
    <thetext>I do not think we currently have a problem in SVGRenderingContext::createImageBuffer() when calling ImageBuffer::create(). Yes, we are still sending resolutionScale = 1 to ImageBuffer::create() but this is correct. We send absoluteTransform = zooming_factor * device_scaling to SVGRenderingContext::createImageBuffer() which uses it to scale the ImageBuffer bitmap and to transform its context accordingly. So the caller (RenderSVGResourceMasker::applyResource() in this case) can still draw using logical units on the ImageBuffer.

Regarding the new test case, I think it is unrelated to this bug. It is related to displaying an &lt;img&gt; element whose src is an SVG data uri. In this case, we do not respect the zooming_factor because the SVG root element belongs to an SVGDocument which does not inherit the deviceScaleFactor of the containing HTMLDocument.

I am going to close this bug and open a new one for the data uri case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264317</commentid>
    <comment_count>4</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2017-01-05 18:22:32 -0800</bug_when>
    <thetext>See https://bugs.webkit.org/show_bug.cgi?id=166750</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>297130</attachid>
            <date>2016-12-14 14:53:03 -0800</date>
            <delta_ts>2017-01-05 16:58:01 -0800</delta_ts>
            <desc>Test case: the two circles should look identical.</desc>
            <filename>file_135616.html</filename>
            <type>text/html</type>
            <size>664</size>
            <attacher name="Thaddee Tyl">thaddee.tyl</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+DQo8bWV0YSBjaGFyc2V0PSJ1dGYtOCI+DQo8dGl0bGU+U2FmYXJpIGJ1
ZzogU1ZHIG1hc2sgYXBwZWFycyBibHVycnkgd2hlbiB6b29tZWQgb3Igb24gUmV0aW5hIGRpc3Bs
YXlzPC90aXRsZT4NCjxzdHlsZT5ib2R5e3pvb206NH08L3N0eWxlPg0KPHA+VGhlIHR3byBjaXJj
bGVzIHNob3VsZCBsb29rIGlkZW50aWNhbC48L3A+DQo8aW1nIHNyYz0iZGF0YTppbWFnZS9zdmcr
eG1sLDxzdmcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB3aWR0aD0nMTAwJyBo
ZWlnaHQ9JzEwMCc+PG1hc2sgaWQ9J2EnPjxjaXJjbGUgY3g9JzUwJyBjeT0nNTAnIHI9JzUwJyBm
aWxsPScjZmZmJy8+PC9tYXNrPjxnIG1hc2s9J3VybCgjYSknPjxyZWN0IHg9JzAnIHk9JzAnIHdp
ZHRoPScxMDAnIGhlaWdodD0nMTAwJy8+PC9nPjwvc3ZnPiIgYWx0PSJCbHVycnkgYmxhY2sgY2ly
Y2xlIj4NCjxzdmcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB3aWR0aD0nMTAw
JyBoZWlnaHQ9JzEwMCc+PG1hc2sgaWQ9J2EnPjxjaXJjbGUgY3g9JzUwJyBjeT0nNTAnIHI9JzUw
JyBmaWxsPScjZmZmJy8+PC9tYXNrPjxnIG1hc2s9J3VybCgjYSknPjxyZWN0IHg9JzAnIHk9JzAn
IHdpZHRoPScxMDAnIGhlaWdodD0nMTAwJy8+PC9nPjwvc3ZnPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>