<?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>42944</bug_id>
          
          <creation_ts>2010-07-25 03:35:43 -0700</creation_ts>
          <short_desc>SVG background doesn&apos;t resize properly when dimensions are changed</short_desc>
          <delta_ts>2011-10-31 08:32:27 -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>528+ (Nightly build)</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.6</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>
          <dependson>47156</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Radek Pietruszewski">radexpl</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>adele</cc>
    
    <cc>krit</cc>
    
    <cc>mitz</cc>
    
    <cc>radexpl</cc>
    
    <cc>thorton</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>255810</commentid>
    <comment_count>0</comment_count>
      <attachid>62522</attachid>
    <who name="Radek Pietruszewski">radexpl</who>
    <bug_when>2010-07-25 03:35:43 -0700</bug_when>
    <thetext>Created attachment 62522
Bug test

Overview:

Given a div with SVG background and border, div&apos;s background doesn&apos;t resize when div&apos;s dimensions are changed (no matter if using JS animation, CSS transition, or just :hover)

Steps to reproduce:

1. Make a &lt;div&gt; with SVG background
2. Add a border or an outline to this &lt;div&gt; (bug won&apos;t appear without this)
3. Change its dimensions in some way (easiest way is to use :hover)

Actual results:

Border changes its dimensions, but background stays in the same position

Expected results:

Background changes its dimensions accordingly to div

Build Date &amp; Platform:

Safari 5.0 (6533.16) - which is WebKit 533, right?

Additional Builds and Platforms:

Works just fine on Opera 10.60

Additional Information:

Sorry for my English ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>256409</commentid>
    <comment_count>1</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2010-07-26 23:48:03 -0700</bug_when>
    <thetext>I can&apos;t reproduce it locally with trunk. Have you tested it with a nightly?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>256416</commentid>
    <comment_count>2</comment_count>
    <who name="Radek Pietruszewski">radexpl</who>
    <bug_when>2010-07-27 00:08:02 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; I can&apos;t reproduce it locally with trunk. Have you tested it with a nightly?

No until now (sorry for that - I&apos;m the new one), but I can reproduce it on nightly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>258080</commentid>
    <comment_count>3</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2010-07-30 00:13:51 -0700</bug_when>
    <thetext>CC&apos;in Dan Bernstein.
Dan, do you know off-hand what might be the difference that the SVG background image doesn&apos;t resize anymore when a border is applied to the &lt;div&gt;? I&apos;d be thankful for any hints.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>424580</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2011-06-21 11:14:56 -0700</bug_when>
    <thetext>As far as I can tell, this is a regression in r62922, which added RenderSVGRoot ::clippedOverflowRectForRepaint, which redirects the call to SVGRenderSupport instead of the superclass, RenderBox.

SVGRenderSupport&apos;s implementation uses the m_repaintBoundingBox on the RenderSVGRoot, which is calculated using computeContainerBoundingBoxes, which only takes into account the bounding boxes of the children of the container! (that is to say, ignores the bounding box of the RenderSVGRoot, which includes the background!)

We could fix this by making RenderSVGRoot::updateCachedBoundaries include the RenderSVGRoot&apos;s bounding box *in the case where it has a background*, but I&apos;m not sure if that would break anything. Alternatively, we could just remove RenderSVGRoot::clippedOverflowRectForRepaint, leaving it to be forwarded to RenderBox, but I have a feeling it&apos;s done the way it is right now for performance reasons, so we should be careful with it.

Any ideas?

&lt;rdar://problem/9474533&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>424892</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2011-06-21 17:23:38 -0700</bug_when>
    <thetext>Nevermind! This is actually separate from the r62922 regression, which I&apos;ll file a separate bug for tomorrow because it needs some discussion. Sorry!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>441367</commentid>
    <comment_count>6</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2011-07-23 05:01:39 -0700</bug_when>
    <thetext>47156 fixes this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493324</commentid>
    <comment_count>7</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2011-10-31 08:32:27 -0700</bug_when>
    <thetext>Fixed in r98852. Thanks for the testcase!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>62522</attachid>
            <date>2010-07-25 03:35:43 -0700</date>
            <delta_ts>2010-07-25 03:35:43 -0700</delta_ts>
            <desc>Bug test</desc>
            <filename>animated-svg-background-bug.zip</filename>
            <type>application/zip</type>
            <size>2441</size>
            <attacher name="Radek Pietruszewski">radexpl</attacher>
            
              <data encoding="base64">UEsDBAoAAAAAAPJj+TwAAAAAAAAAAAAAAAAcABAAYW5pbWF0ZWQtc3ZnLWJhY2tncm91bmQtYnVn
L1VYDACsB0xMhxJMTPUBFABQSwMEFAAIAAgA8mP5PAAAAAAAAAAAAAAAACUAEABhbmltYXRlZC1z
dmctYmFja2dyb3VuZC1idWcvLkRTX1N0b3JlVV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