WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
17351
Rendering differs depending on the order that files are fetched
https://bugs.webkit.org/show_bug.cgi?id=17351
Summary
Rendering differs depending on the order that files are fetched
William Siegrist
Reported
2008-02-13 15:12:05 PST
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 "top down" in the ultimate HTML but nightly webkit can be made to change its rendering with enough pushing of the refresh button. An "inlined" version that does not exhibit this behavior is here:
http://www.macosforge.org/files/offset_test/inline.html
Attachments
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2008-02-14 09:52:29 PST
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.
William Siegrist
Comment 2
2008-02-14 10:23:42 PST
So document.onload fires before the stylesheets are processed?
mitz
Comment 3
2008-02-17 09:53:18 PST
(In reply to
comment #2
)
> 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's contents, so I suggest that you remove it as well.
William Siegrist
Comment 4
2008-02-17 10:53:57 PST
Thanks, I should have caught the () being there at least. So should this be resolved "Invalid" now?
mitz
Comment 5
2008-02-19 08:28:53 PST
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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug