<?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>64779</bug_id>
          
          <creation_ts>2011-07-18 20:29:05 -0700</creation_ts>
          <short_desc>Yielding the parser for first paint causes problems with &lt;svg&gt;&lt;use&gt;&lt;script&gt;</short_desc>
          <delta_ts>2012-02-25 02:46:18 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>78902</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>64419</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="James Simonsen">simonjam</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>inferno</cc>
    
    <cc>schenney</cc>
    
    <cc>tonyg</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>438948</commentid>
    <comment_count>0</comment_count>
    <who name="James Simonsen">simonjam</who>
    <bug_when>2011-07-18 20:29:05 -0700</bug_when>
    <thetext>If bug 64419 is fixed, svg/dom/use-style-recalc-script-execute-crash.html will start crashing.

The problem is that the parser yields after parsing the second &lt;/script&gt;, but before executing it. The parser is yielding to allow the first paint to occur. When the parser yields, recalcStyle() will process the &lt;svg use&gt; tag and build a shadow DOM for it. The shadow DOM clones the elements from the main DOM. This includes the parsed, but un-executed, second script. The cloned script will execute, because its m_alreadyStarted is false, when it&apos;s inserted in the shadow DOM. When control returns to the parser, it will execute the original script. So, we&apos;ll have executed the same block of script twice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>564926</commentid>
    <comment_count>1</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2012-02-25 02:46:18 -0800</bug_when>
    <thetext>Bug 78902 fixes this problem as well. The shadow tree is no more constructed on recalcStyle() time.

*** This bug has been marked as a duplicate of bug 78902 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>