Closed Bug 879807 Opened 11 years ago Closed 11 years ago

Since release 21 FireFox does not show DHTML-Menu

Categories

(Tech Evangelism Graveyard :: German, defect)

defect
Not set
normal

Tracking

(firefox21 affected, firefox22-, firefox23-, firefox24-, firefox-esr17 unaffected)

RESOLVED FIXED
Tracking Status
firefox21 --- affected
firefox22 - ---
firefox23 - ---
firefox24 - ---
firefox-esr17 --- unaffected

People

(Reporter: Frank.Weichert, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file)

Attached file FireFox21-SHTML.html
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:20.0) Gecko/20100101 Firefox/20.0 (Beta/Release)
Build ID: 20130409194949

Steps to reproduce:

Update to release 21


Actual results:

DHTML-Menu is not shown. All older releases working fine.
Example-HTML-File is attacht.


Expected results:

it should work again
Attachment #758611 - Attachment mime type: text/plain → text/html
Web console:
[18:34:38,999] TypeError: this[i] is undefined @ https://bug879807.bugzilla.mozilla.org/attachment.cgi?id=758611:260

Maybe a dupe.
Assignee: nobody → general
Component: General → JavaScript Engine
Regression window(m-c)
Good:
http://hg.mozilla.org/mozilla-central/rev/e9f39220b8e7
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130123 Firefox/21.0 ID:20130123031657
Bad:
http://hg.mozilla.org/mozilla-central/rev/35e0c12f4332
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130123 Firefox/21.0 ID:20130123081412
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=e9f39220b8e7&tochange=35e0c12f4332


Regression window(m-i)
Good:
http://hg.mozilla.org/integration/mozilla-inbound/rev/4d567ebd2624
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130122 Firefox/21.0 ID:20130122115532
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/059c7e8541e2
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130122 Firefox/21.0 ID:20130122123031
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=4d567ebd2624&tochange=059c7e8541e2

Regressed by:
059c7e8541e2	Boris Zbarsky — Bug 828787. Stop allowing indexed expandos on windows. r=peterv
Assignee: general → nobody
Blocks: 828787
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM
Ever confirmed: true
The new behavior is following the spec, so unless this is happening on a site that can't get changed and is widely used I think the right solution is to fix the site to follow the spec too...
Assignee: nobody → german
Component: DOM → German
OS: Windows XP → All
Product: Core → Tech Evangelism
Hardware: x86 → All
Version: 21 Branch → unspecified
A small tip would be to use strict mode [1], which would have cought this bug.
1: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/Strict_mode
(In reply to Boris Zbarsky (:bz) from comment #3)
> The new behavior is following the spec, so unless this is happening on a
> site that can't get changed and is widely used I think the right solution is
> to fix the site to follow the spec too...

Sounds good - not tracking until we know of major web properties being impacted.
Ok, I can change the code of my page. But which line is unsupported now?
The Error-Box (german: Fehlerkonsole) does not show any error.
What has been changed in the spec?
I have no idea how to fix it.
Replace

> this[i]=new Image()
> this[i].src=arguments[i]

with 

> (new Image()).src=arguments[i]
This change has been described in the compatibility document.
https://developer.mozilla.org/en-US/docs/Site_Compatibility_for_Firefox_21

You cannot the "this" keyword in the preLoadBackgrounds() because it's the window object. You can use another variable name instead:

> function preLoadBackgrounds(){
>   var img
>   for(i=0;i<arguments.length;i++){
>     img[i]=new Image()
>     img[i].src=arguments[i]
>   }
>   return img
> }
You'd need |var img = []| or something.

But yes, the upshot is that setting window[0] is now ignored (or throws, in strict mode) and in preLoadBackgrounds "this" is "window" because the function is not in strict mode.
Now my page works again with FireFox release 21.

function preLoadBackgrounds(){
   var img = [];
   for(i=0;i<arguments.length;i++){
     img[i]=new Image();
     img[i].src=arguments[i];
   }
   return img
}

Many Thanks to all.
According to Comment 10 this bug can be resolved as fixed.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: