<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>26971</bug_id>
          
          <creation_ts>2014-10-04 15:59:37 +0000</creation_ts>
          <short_desc>Under the https://html.spec.whatwg.org/#title-on-style:  &quot;...the user agent must queue a task to inv [...]</short_desc>
          <delta_ts>2014-10-14 21:54:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://html.spec.whatwg.org/#title-on-style</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>112700</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-10-04 15:59:37 +0000</bug_when>
    <thetext>Specification: https://html.spec.whatwg.org/
Multipage: https://html.spec.whatwg.org/multipage/#title-on-style
Complete: https://html.spec.whatwg.org/#title-on-style
Referrer: 

Comment:
Under the https://html.spec.whatwg.org/#title-on-style:  &quot;...the user agent
must queue a task to invoke the update a style block algorithm&quot;  for the case
when one of the child nodes of the STYLE element is modified by a script, and
this script then attempts to access modified style data - it will not be
available  to the script because the &quot;update a style block&quot; algorithm has not
been run at this point (it has been queued)  It appears that the browsers
don&apos;t queue &quot;update a style block&quot; algorithm, but run it immediately after any
change has been made to the contents of the STYLE element (see
WebKit/Source/WebCore/html/HTMLStyleElement::childrenChanged)  Example: 
&lt;style id=&quot;s&quot;&gt;&lt;/style&gt; &lt;div id=&quot;d&quot;&gt;&lt;/div&gt; &lt;script type=&quot;text/javascript&quot;&gt;   
var s=document.getElementById(&quot;s&quot;);    s.textContent=&quot;#d
{background-color:rgb(1, 2, 3);}&quot;;    var d=document.getElementById(&quot;d&quot;);   
var c=getComputedStyle(d).backgroundColor;    // in IE, XulRunner, WebKit at
this point &quot;c&quot; will be equal to &quot;rgb(1, 2, 3)&quot;, which makes sense.    //
however, if implemented according to the spec, &quot;c&quot; will be &quot;transparent&quot; - the
default value,	   // because the changes to the contents of the style element
will be applied only	 // after the current script has completed &lt;/script&gt; 
Solution:  change the phrase to: &quot;...the user agent must run a task to invoke
the update a style block algorithm&quot; 

Posted from: 94.75.209.155
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113154</commentid>
    <comment_count>1</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-10-14 21:54:11 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8838.
Check-in comment: Changes to a CSS style sheet take effect immediately
https://html5.org/tools/web-apps-tracker?from=8837&amp;to=8838</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>