<?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>21968</bug_id>
          
          <creation_ts>2008-10-30 05:50:09 -0700</creation_ts>
          <short_desc>SVG hover incorrect on a scrolled div</short_desc>
          <delta_ts>2009-04-17 10:28:48 -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>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>25268</dup_id>
          
          <bug_file_loc>http://dean.googlepages.com/svgscrollbug.xml</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>23881</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dean McNamee">deanm</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>97111</commentid>
    <comment_count>0</comment_count>
    <who name="Dean McNamee">deanm</who>
    <bug_when>2008-10-30 05:50:09 -0700</bug_when>
    <thetext>This demonstrates what looks to be a hit testing / coordinate bug in SVG.  The test puts an SVG element inside of a fixed size div, along with an overflow for the scroll bar.  There is a css hover attribute to color the line on mouseover.  When the div is not scrolled, everything looks fine. However, try scrolling the scroll bar to the middle, and now mouse over the line.  You can see that only half of the line is painted the hover color.

I have tested this on Chromium and Safari w/ TOT Webkit, both only tested on Windows, so it might be a Windows specific platform bug.

The mime types aren&apos;t right on the above url, so just save it and open it locally.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97113</commentid>
    <comment_count>1</comment_count>
    <who name="Gavin Sherlock">gsherloc</who>
    <bug_when>2008-10-30 06:40:50 -0700</bug_when>
    <thetext>On the Mac (r37990) I see no line at all at the bug url.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97374</commentid>
    <comment_count>2</comment_count>
    <who name="Dean McNamee">deanm</who>
    <bug_when>2008-11-01 10:51:46 -0700</bug_when>
    <thetext>Cleaned up the example a little.  Please download and view it, since Google Pages doesn&apos;t serve it with the correct mime type.  I reproduced the problem on OSX.

http://dean.googlepages.com/svgscrollbug2.xml
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97731</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-11-05 13:36:49 -0800</bug_when>
    <thetext>Thanks dean, that&apos;s a nice reduction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97732</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-11-05 13:38:23 -0800</bug_when>
    <thetext>Should be simple to fix.  The invalidation rect is not taking the scroll-offset into account.  This is due to SVG having a different drawing model from HTML/CSS (SVG uses full transforms, html/css in webcore until recently only used integer offsets).  We&apos;re still working on making the SVG render tree fully HTML-aware (and vice versa).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97959</commentid>
    <comment_count>5</comment_count>
      <attachid>24971</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-11-07 12:52:27 -0800</bug_when>
    <thetext>Created attachment 24971
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97960</commentid>
    <comment_count>6</comment_count>
      <attachid>24971</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-11-07 12:52:47 -0800</bug_when>
    <thetext>Comment on attachment 24971
test case

autofill got a bit over-zealous there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97961</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-11-07 13:07:56 -0800</bug_when>
    <thetext>I traced through the same code but using divs.  This code:

        // FIXME: We ignore the lightweight clipping rect that controls use, since if |o| is in mid-layout,
        // its controlClipRect will be wrong. For overflow clip we use the values cached by the layer.
        if (o-&gt;hasOverflowClip()) {
            // o-&gt;height() is inaccurate if we&apos;re in the middle of a layout of |o|, so use the
            // layer&apos;s size instead.  Even if the layer&apos;s size is wrong, the layer itself will repaint
            // anyway if its size does change.
            IntRect boxRect(0, 0, o-&gt;layer()-&gt;width(), o-&gt;layer()-&gt;height());
            int x = 0, y = 0;
            o-&gt;layer()-&gt;subtractScrolledContentOffset(x, y); // For overflow:auto/scroll/hidden.
            topLeft.move(x, y);
            IntRect repaintRect(topLeft, rect.size());
            rect = intersection(repaintRect, boxRect);
            if (rect.isEmpty())
                return;
        } else
            rect.setLocation(topLeft);

Is executed in RenderBox::computeAbsoluteRepaintRect (called from RenderBox ::absoluteClippedOverflowRect as part of the repaint), and is the code which does the translation of the repaint rect to account for layer scrolling.

Now the question is why does this same code not get hit from RenderSVGRoot (which is a RenderBlock, and thus a RenderBox).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97965</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-11-07 13:45:59 -0800</bug_when>
    <thetext>Ok, I think it might be getting confused by the fact that RenderPath has a 0, 0 border box.  I&apos;m not sure if SVG components really should return valid width/height for border box or not.  I&apos;ll try fixing that first.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117934</commentid>
    <comment_count>9</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-04-17 10:28:12 -0700</bug_when>
    <thetext>This is fixed by the patch attached to bug 25268.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117935</commentid>
    <comment_count>10</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-04-17 10:28:43 -0700</bug_when>
    <thetext>Mean to mark it as a dupe. 25268</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117936</commentid>
    <comment_count>11</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-04-17 10:28:48 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 25268 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>24971</attachid>
            <date>2008-11-07 12:52:27 -0800</date>
            <delta_ts>2008-11-07 12:52:47 -0800</delta_ts>
            <desc>test case</desc>
            <filename>svgscrollbug.xml</filename>
            <type>application/xml</type>
            <size>1134</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">PGh0bWwgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiIHhtbDpsYW5nPSJlbiIg
bGFuZz0iZW4iPiAKPGhlYWQ+IAogIDx0aXRsZT5TVkcgc2Nyb2xsIGhvdmVyIGJ1ZzwvdGl0bGU+
IAoKICA8c3R5bGU+CiAgICBAbmFtZXNwYWNlIHVybChodHRwOi8vd3d3LnczLm9yZy8xOTk5L3ho
dG1sKTsKICAgIEBuYW1lc3BhY2Ugc3ZnIHVybChodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyk7
CiAgICBzdmd8bGluZSB7CiAgICAgIHN0cm9rZTogcmVkOwogICAgICBzdHJva2Utd2lkdGg6IDJw
eDsKICAgIH0KCiAgICBzdmd8bGluZTpob3ZlciB7CiAgICAgIHN0cm9rZTogeWVsbG93OwogICAg
fQogICAgZGl2LnN2Z2RpdiB7CiAgICAgIHdpZHRoOiA2MDBweDsKICAgICAgb3ZlcmZsb3c6IGF1
dG87CiAgICB9CiAgPC9zdHlsZT4KCjwvaGVhZD4gCgo8Ym9keT4KCjxwPgogIFRoaXMgZGVtb25z
dHJhdGVzIHdoYXQgbG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