Bug 21061

Summary: REGRESSION; background-image javascript rotation fails after initial load
Product: WebKit Reporter: nemo <bugs>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Major    
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: All   
URL: http://epss.ahrq.gov

Description nemo 2008-09-24 09:10:16 PDT
In the windows nightly webkit from the 22nd, opened this page.  Clicked on Home in  top nav (navigating back to the page).
The background image vanished.

Clicked on Home about 50 times with no reappearance of even the original image.  Given the rotation sequence is
three images, that seems unlikely.

However, if I hit reload repeatedly, the images scrolled normally, and once all 3 were loaded, I could click on Home just fine.
Comment 1 nemo 2008-09-24 09:19:14 PDT
Oh. And althought the images worked normally after the mentioned hitting of reload, even after restarting browser, if 
I cleared cache, the bug reproduced itself repeatedly.
Comment 2 Eric Seidel (no email) 2008-09-26 15:08:17 PDT
  <script type="text/ecmascript"> 
        window.onload = function()
        {
            var i = Math.ceil(Math.random()*3);
            var m = document.getElementById("main");
            m.style.backgroundImage = "url(images/front_background"+i+".jpeg)";
            // can tweak size as needed. images are mismatched 
            /*if (i==1) m.style.height = "360px";*/
        }
    </script>

is what loads the background images.  Works fine for me on the mac.  I even cleared my cache to verify.  I guess someone could check on windows, but I expect this is not a bug.
Comment 3 nemo 2008-09-26 16:40:30 PDT
Well. Let me retest on windows with latest build.
I know what was causing the background to load, the odd thing was that it would stop working.
That was the bug bit, and was only reproducible in the windows nightly I was using, not in Safari,
Firefox nightly or Internet Explorer.

Soo, it might be "fixed"
But at least in r36766 it was definitely a bug :-p
Comment 4 nemo 2008-09-27 08:36:54 PDT
Still able to reproduce, in a completely different windows XP (virtualbox this time) using the nightly build from the 25th, r36882.

Will test under OSX to see if I can expand the platform - it might be Eric wasn't following my test instructions. :)
Comment 5 nemo 2008-09-29 07:19:07 PDT
Reproduced in nightly for the 29th, r37056 under OSX so I'm expanding platform.
I'm at a loss as to comment #2 from Eric.  The behaviour in WebKit is definitely buggy.
Safari, Firefox, Chrome, and even IE all have no trouble displaying all 3 of the background
 images when you click on Home repeatedly.
Comment 6 nemo 2008-11-26 08:59:33 PST
After testing latest windows nightly (clearing cache, restarting) I was unable to reproduce this behaviour after several attempts.
I suppose some other change made in last couple of months fixed it.