<?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>140303</bug_id>
          
          <creation_ts>2015-01-09 11:56:19 -0800</creation_ts>
          <short_desc>[Win] Layout Test fast/canvas/canvas-path-addPath.html is failing</short_desc>
          <delta_ts>2015-01-09 17:31:16 -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>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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>
          <dependson>130461</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brent Fulgham">bfulgham</reporter>
          <assigned_to name="Brent Fulgham">bfulgham</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1060214</commentid>
    <comment_count>0</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2015-01-09 11:56:19 -0800</bug_when>
    <thetext>The following layout test is failing on Windows.

fast/canvas/canvas-path-addPath.html

Probable cause:

This is crashing because we are attempting to add a path to itself in Path::addPath. The bug is here:

void Path::addPath(const Path&amp; path, const AffineTransform&amp; transform)
{
    if (!path.platformPath())
        return;

    if (!transform.isInvertible())
        return;

    CGAffineTransform transformCG = transform;
    // CG doesn&apos;t allow adding a path to itself. Optimize for the common case
    // and copy the path for the self referencing case.
    if (ensurePlatformPath() != path.platformPath()) {
        CGPathAddPath(ensurePlatformPath(), &amp;transformCG, path.platformPath());
        return;
    }
    CGPathRef pathCopy = CGPathCreateCopy(path.platformPath());
    CGPathAddPath(ensurePlatformPath(), &amp;transformCG, path.platformPath());
    CGPathRelease(pathCopy);
}

Note that even though we are creating the pathCopy, we are not using it. Instead, we use the original path (violating the contract of the CG API).

I&apos;m not sure why this code seems to work on Mac, but it crashes on Windows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1060215</commentid>
    <comment_count>1</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2015-01-09 11:59:08 -0800</bug_when>
    <thetext>&lt;rdar://problem/19428865&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1060216</commentid>
    <comment_count>2</comment_count>
      <attachid>244359</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2015-01-09 12:03:21 -0800</bug_when>
    <thetext>Created attachment 244359
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1060234</commentid>
    <comment_count>3</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2015-01-09 12:17:38 -0800</bug_when>
    <thetext>Committed r178186: &lt;http://trac.webkit.org/changeset/178186&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1060327</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2015-01-09 16:18:01 -0800</bug_when>
    <thetext>May have caused 1 test failure on the bots (may be a simple rebaseline):
https://build.webkit.org/results/Apple%20MountainLion%20Debug%20WK2%20(Tests)/r178186%20(20724)/results.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1060355</commentid>
    <comment_count>5</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2015-01-09 17:29:45 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; May have caused 1 test failure on the bots (may be a simple rebaseline):
&gt; https://build.webkit.org/results/
&gt; Apple%20MountainLion%20Debug%20WK2%20(Tests)/r178186%20(20724)/results.html

Interesting. Looking at the history for this test on our platform (&lt;http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&amp;tests=css3%2Fbackground%2Fbackground-repeat-space-content.html&gt;), it looks as if a change between r178181 and r178183 introduced the slight image difference. (See http://trac.webkit.org/log/?verbose=on&amp;rev=178183&amp;stop_rev=178181&gt;)

Looking at the whole set of bots, it looks like r178183 is the change that triggered the image difference.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1060358</commentid>
    <comment_count>6</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2015-01-09 17:31:16 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; May have caused 1 test failure on the bots (may be a simple rebaseline):
&gt; https://build.webkit.org/results/
&gt; Apple%20MountainLion%20Debug%20WK2%20(Tests)/r178186%20(20724)/results.html

I think it was Bug 140298 that introduced that small image difference. I&apos;ve updated the bug with some notes.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>244359</attachid>
            <date>2015-01-09 12:03:21 -0800</date>
            <delta_ts>2015-01-09 12:07:23 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-140303-20150109121024.patch</filename>
            <type>text/plain</type>
            <size>1609</size>
            <attacher name="Brent Fulgham">bfulgham</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE3ODE4MikKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDIxIEBAC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bWF0aW9uCklu
ZGV4OiBTb3VyY2UvV2ViQ29yZS9wbGF0Zm9ybS9ncmFwaGljcy9jZy9QYXRoQ0cuY3BwCj09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT0KLS0tIFNvdXJjZS9XZWJDb3JlL3BsYXRmb3JtL2dyYXBoaWNzL2NnL1BhdGhDRy5jcHAJ
KHJldmlzaW9uIDE3ODE3MSkKKysrIFNvdXJjZS9XZWJDb3JlL3BsYXRmb3JtL2dyYXBoaWNzL2Nn
L1BhdGhDRy5jcHAJKHdvcmtpbmcgY29weSkKQEAgLTMyNSw3ICszMjUsNyBAQCB2b2lkIFBhdGg6
OmFkZFBhdGgoY29uc3QgUGF0aCYgcGF0aCwgY29uCiAgICAgICAgIHJldHVybjsKICAgICB9CiAg
ICAgQ0dQYXRoUmVmIHBhdGhDb3B5ID0gQ0dQYXRoQ3JlYXRlQ29weShwYXRoLnBsYXRmb3JtUGF0
aCgpKTsKLSAgICBDR1BhdGhBZGRQYXRoKGVuc3VyZVBsYXRmb3JtUGF0aCgpLCAmdHJhbnNmb3Jt
Q0csIHBhdGgucGxhdGZvcm1QYXRoKCkpOworICAgIENHUGF0aEFkZFBhdGgoZW5zdXJlUGxhdGZv
cm1QYXRoKCksICZ0cmFuc2Zvcm1DRywgcGF0aENvcHkpOwogICAgIENHUGF0aFJlbGVhc2UocGF0
aENvcHkpOwogfQogCg==
</data>
<flag name="review"
          id="269285"
          type_id="1"
          status="+"
          setter="simon.fraser"
    />
          </attachment>
      

    </bug>

</bugzilla>