[Webkit-unassigned] [Bug 15137] New: onload event fire to soon causing setting incorrect iframe height.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 3 06:32:00 PDT 2007


           Summary: onload event fire to soon causing setting incorrect
                    iframe height.
           Product: WebKit
           Version: 522+ (nightly)
          Platform: PC
               URL: http://www.men.gov.pl/component/option,com_wrapper/Itemi
        OS/Version: Windows XP
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: listy at blaut.biz

1. Go to a page: http://www.men.gov.pl/component/option,com_wrapper/Itemid,17/
2. Notice short iframe. Height of this iframe is controlled by widely
distributed on several pages script: 

<script language="javascript" type="text/javascript">
                function iFrameHeight() {
                        var h = 0;
                        if ( !document.all ) {
                                h =
document.getElementById('blockrandom').style.height = h + 60 + 'px';
                        } else if( document.all ) {
                                h =
                                document.all.blockrandom.style.height = h + 20
+ 'px';
Initial height of a contentDocument is incorrectly reported by Safari as 0.
3. Let's go to an experiment. Try right click on a content of this frame and
choose Reload.
4. Notice increasing height of iframe.
5. Repeat step 3 several times and notice increasing height of iframe.

This is strange. I suspect after reading this article:
http://www.howtocreate.co.uk/safaribenchmarks.html that onload event is fired
before src of iframe finishes loading. This state causes incorrect rendering of
above mentioned page.

"Safari does not fire onload at the same time as other browsers. With most
browsers, they will wait until the page is loaded, all images and stylesheets
and scripts have run, and the page has been displayed before they fire onload.
Safari does not.

In Safari, it seems onload fires before the page has been displayed, before
layout has been calculated, before any costly reflows have taken place. It
fires before images have completed decoding (...), meaning that a substantial
part of the load time is not included"

Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list