<?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>17351</bug_id>
          
          <creation_ts>2008-02-13 15:12:05 -0800</creation_ts>
          <short_desc>Rendering differs depending on the order that files are fetched</short_desc>
          <delta_ts>2008-02-19 08:28:53 -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>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>http://www.macosforge.org/files/offset_test/linked.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="William Siegrist">wsiegrist</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hyatt</cc>
    
    <cc>mitz</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>70575</commentid>
    <comment_count>0</comment_count>
    <who name="William Siegrist">wsiegrist</who>
    <bug_when>2008-02-13 15:12:05 -0800</bug_when>
    <thetext>A page with a link to a stylesheet and a link to a javascript file that changes some styles, will actually render differently based on which of those 2 links is fetched first. 

Firefox seems to treat them &quot;top down&quot; in the ultimate HTML but nightly webkit can be made to change its rendering with enough pushing of the refresh button. 

An &quot;inlined&quot; version that does not exhibit this behavior is here:
http://www.macosforge.org/files/offset_test/inline.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70673</commentid>
    <comment_count>1</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-02-14 09:52:29 -0800</bug_when>
    <thetext>When the script asks for contdiv.offsetHeight, if the style sheet has not loaded yet, then the result will be 0. Script execution does not block on pending style sheets.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70675</commentid>
    <comment_count>2</comment_count>
    <who name="William Siegrist">wsiegrist</who>
    <bug_when>2008-02-14 10:23:42 -0800</bug_when>
    <thetext>So document.onload fires before the stylesheets are processed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70960</commentid>
    <comment_count>3</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-02-17 09:53:18 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; So document.onload fires before the stylesheets are processed?

This statement:

document.onload = resize_content();

calls resize_content() *immediately* (and sets document.onload to null). You probably meant to do

window.onload = resize_content;

(setting the property to the function, not its return value). Note that if you do that, then the document.write statement in resize_content() will replace the document&apos;s contents, so I suggest that you remove it as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70962</commentid>
    <comment_count>4</comment_count>
    <who name="William Siegrist">wsiegrist</who>
    <bug_when>2008-02-17 10:53:57 -0800</bug_when>
    <thetext>Thanks, I should have caught the () being there at least.  So should this be resolved &quot;Invalid&quot; now? </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71137</commentid>
    <comment_count>5</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-02-19 08:28:53 -0800</bug_when>
    <thetext>I think there is a separate bug requesting that scripts block on style sheets when accessing layout properties, which would be possible if JavaScriptCore was made interruptible.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>