no background picture at this web page

VERIFIED WORKSFORME

Status

()

Core
DOM: Core & HTML
VERIFIED WORKSFORME
17 years ago
16 years ago

People

(Reporter: Knut J, Assigned: jst)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011220
BuildID:    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011220

Background picture is not displayed right. Opera, IE, Mozilla composer and
Netscape 4.78 does in fact show this page correct. HOwever html code is made for
netscape 4.78.

Reproducible: Always
Steps to Reproduce:
1.load page in browser
2.
3.

Actual Results:  page not displayed right

Expected Results:  background picture should cover entire page

Comment 1

17 years ago
The problem does not lie in the html but rather in the fade javascript function.
 After commenting out fade the background displayed.

This is the relevant portion of code:

function fade(sr, sg, sb, er, eg, eb, step) {
	for(var i = 0; i <= step; i++) {
		setbgColor(
			Math.floor(sr * ((step-i)/step) + er * (i/step)),
			Math.floor(sg * ((step-i)/step) + eg * (i/step)),
		Math.floor(sb * ((step-i)/step) + eb * (i/step)));
	}
}

/* Usage:
*   fade(inr,ing,inb, outr,outg,outb, step);
* example.
*   fade(0,0,0, 255,255,255, 255);
* fade from black to white with very slow speed.
*   fade(255,0,0, 0,0,255, 50);
*   fade(0xff,0x00,0x00, 0x00,0x00,0xff, 50); // same as above
* fade from red to blue with fast speed.
* step 2 is very fast and step 255 is very slow.
*/
function fadein() {
	fade(0xff,0x00,0x00, 0x00,0x00,0xff, 120);
}
function fadeout() {
	fade(255,0,0, 255,255,255, 90);
}
/* do fadein */
fadeout();
Assignee: attinasi → rogerl
Component: Layout → Javascript Engine
Keywords: 4xp
QA Contact: petersen → pschwartau

Comment 2

17 years ago
Confirming bug with Mozilla trunk 20011219xx. OS: Linux ---> All.
Reassigning to DOM Level 0. I will attach a reduced testcase with all
the JavaScript in-line. I have no idea what's going wrong here.

Note this key function, which seems to have no effect in Mozilla: 

function setbgColor(r, g, b)
{
  var hr = hex(r);
  var hg = hex(g);
  var hb = hex(b);
  
  document.bgColor = "#" + hr + hg + hb;
}
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: Javascript Engine → DOM Level 0
Ever confirmed: true
OS: Linux → All
QA Contact: pschwartau → desale

Comment 3

17 years ago
Created attachment 62690 [details]
Reduced testcase

Comment 4

17 years ago
NOTE: the author of the "fadein" script has a demo site at

                     http://eto.com/JavaScript/

If you go there and try his links, hit the "Back" button and so forth,
you get a nice fade effect in IE6; you get a bad fade in NN4.7, but you 
get no fade at all in Mozilla, as far as I can see...

Comment 5

17 years ago
Phil, this bug had OS=Linux, which you changed to OS=All after confirming on
Linux.. ???  Did you mean you tested on Windows?

Comment 6

17 years ago
Oops, yes, I forgot to say I confirmed the bug on WinNT; hence OS : ---> All.

I guess this bug boils down to the following issue: what should happen
if the HTML author tries to change document.bgColor when there is a 
background image? I don't know this stuff at all, but when I open 
Mozilla and go to about:blank to get a blank page, I can change the
background color to whatever I want, e.g. by keying this in the URL bar: 

             javascript:void(document.bgColor=167772)

But if I do this after a page with content has loaded, this doesn't work -

Comment 7

17 years ago
Note: the background image at the given site and the testcase above is

     http://members.tripod.com/knutjorgen/images/sky.jpg

It should look like sky. For some reason, sometimes I get a 
generic image from tripod.com instead...

Comment 8

16 years ago
Works fine with Linux 2002021208, marking WORKSFORME.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 9

16 years ago
It works for me too with Mozilla 0.98.

Comment 10

16 years ago
Knut, as the reporter you should then mark this bug VERIFIED and close it off
for good.  I am doing this right now.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.