<?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>77541</bug_id>
          
          <creation_ts>2012-02-01 03:50:00 -0800</creation_ts>
          <short_desc>SVG pixel tests can&apos;t catch regressions anymore</short_desc>
          <delta_ts>2012-02-15 02:53:35 -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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>77736</dependson>
    
    <dependson>78115</dependson>
    
    <dependson>78219</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nikolas Zimmermann">zimmermann</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric.carlson</cc>
    
    <cc>jamesr</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>546986</commentid>
    <comment_count>0</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2012-02-01 03:50:00 -0800</bug_when>
    <thetext>From the recent webkit-dev discussion: the initial painting time changed for testing with DRT.
Comment out eg. the repaint() in RenderSVGImage::imageChanged(), and see that all pixel tests still pass with tolerance 0 on a vanilla Lion iMac (like I own).
Running eg svg/repaint/image-href-change.svg in Safari, it&apos;s clearly not repainting anymore - you have to zoom in/out to see the href change.

See the thread at https://lists.webkit.org/pipermail/webkit-dev/2012-January/019265.html.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>548616</commentid>
    <comment_count>1</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2012-02-03 03:37:23 -0800</bug_when>
    <thetext>I went back until Oct 15, where its still broken. Can&apos;t go back much further, as Safari depends on a symbol thats not present in older WebKit2 libraries.
Anyhow, I&apos;ve compared DRT, the WebKit2-testrunner to Safari, and can only reproduce the &quot;old behavior&quot; with crude hacks forcing repaints inside DRT. Still this is not reliable.

I&apos;ve decided to stop wasting my time and instead fix the SVG tests. I&apos;ll grep for all occurrences of setTimeout and/or layoutTestController.waitUntilDone(), and will have to fix all testcases that don&apos;t use dumpAsText, to correctly enforce repainting through layoutTestController.display() and forcing a layout before, by eg. document.rootElement.offsetLeft.

As I initially said, I share James opinion that the tests have to be fixed, but I was confident it was a recent change that changed the timing. What recently changed on my side is that I got a new fast machine now. It turns out the repainting trouble I ran into happens _much_ less frequently on my older MBP from 2006 that I used as main machine until December. Now with my shiny iMac, it&apos;s easy to see that there are obvious races between dumping &amp; painting, that I won&apos;t be able to fix using any setTimeout tricks.

/me goes fixing the SVG tests once for all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>548864</commentid>
    <comment_count>2</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2012-02-03 11:05:19 -0800</bug_when>
    <thetext>Could you describe what exactly you are trying to test with these? The pixel tests I&apos;m familiar with in WebKit do one of two things:

1.) Test that we render a given document correctly. This is done by setting up the document and then letting the test end. The -expected.png is just the final rendering of the page

2.) Test that after rendering a given document A, we correctly repaint + render the document B which is A with some mutations applied. This is done by setting up document A, calling layoutTestController.display(), then mutating the document to state B and letting the test end.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>549014</commentid>
    <comment_count>3</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2012-02-03 13:32:57 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Could you describe what exactly you are trying to test with these? The pixel tests I&apos;m familiar with in WebKit do one of two things:
&gt; 
&gt; 1.) Test that we render a given document correctly. This is done by setting up the document and then letting the test end. The -expected.png is just the final rendering of the page
&gt; 
&gt; 2.) Test that after rendering a given document A, we correctly repaint + render the document B which is A with some mutations applied. This is done by setting up document A, calling layoutTestController.display(), then mutating the document to state B and letting the test end.

It&apos;s all about (2). I&apos;m fixing the first set of svg tests in bug 77736. We tried to fake (2) by using setTimeout(runTest, 0) hoping that painting would happen in-between. I changed that to call layoutTestController.display() to guarantee we&apos;re painting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>549439</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-02-04 09:49:41 -0800</bug_when>
    <thetext>Note that display() is very poorly named. It&apos;s really &quot;start tracking repaint rects&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>549642</commentid>
    <comment_count>5</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2012-02-05 17:05:16 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; Note that display() is very poorly named. It&apos;s really &quot;start tracking repaint rects&quot;.
Yes, but it also explicitly calls [WebView display] for Mac DRT, thus forcing a paint, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>549784</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-02-06 00:18:05 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; Note that display() is very poorly named. It&apos;s really &quot;start tracking repaint rects&quot;.
&gt; Yes, but it also explicitly calls [WebView display] for Mac DRT, thus forcing a paint, right?

Yes. It also causes DRT/WTR to paint a gray overlay with holes for the repaint rects.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>553173</commentid>
    <comment_count>7</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2012-02-09 07:57:06 -0800</bug_when>
    <thetext>Phew, what a boring week, bug 78219 has the last patch, fixing svg/dynamic-updates -- once that landed, all tests that don&apos;t use dumpAsText() are converted to the repaint.js harness, giving us reliable pixel results.

The SVGLoad event timing is also fixed in trunk - the vanilla repaint.js can be used together with SVG files like &lt;svg onload=&quot;runRepaintTest()&quot; w/o problems.

Once bug 78219, we can close this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>557091</commentid>
    <comment_count>8</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2012-02-15 02:53:35 -0800</bug_when>
    <thetext>Closing the master bug, all SVG pixel tests are converted to the new repaint.js scheme, finally.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>