Closed Bug 878509 Opened 6 years ago Closed 6 years ago

Restore the HTMLImageElement.lowsrc, x, y attributes that were unintentionally removed

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla24
Tracking Status
firefox21 + wontfix
firefox22 + verified
firefox23 + fixed
firefox24 + fixed
firefox-esr17 --- unaffected
b2g18 --- unaffected
b2g18-v1.0.0 --- unaffected
b2g18-v1.0.1 --- unaffected
b2g-v1.1hd --- unaffected

People

(Reporter: rhsdesign, Assigned: Ms2ger)

References

(Depends on 1 open bug, )

Details

(Keywords: regression, site-compat)

Attachments

(7 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release)
Build ID: 20130511120803

Steps to reproduce:

I upgraded Firefox browser to latest version 21.0.


Actual results:

All web sites created with DHTML rollover swap image effect now display a broken image.


Expected results:

Mouse overs should produce a different linked image. The DHTML effect still visible in IE10 and other browsers
Do you have an example link where it isn't working?
Flags: needinfo?(rhsdesign)
Attached is a copy of the javascript file with the following error when the page loads:
Error: TypeError: doc_els is undefined
Line: 105
bug 864367 mentions this started in Firefox 20. Changing product to match that one.
Assignee: nobody → english-us
Component: Untriaged → English US
Product: Firefox → Tech Evangelism
Target Milestone: --- → Jun
Version: 21 Branch → Trunk
The deprecated lowsrc attribute has been dropped by Bug 825527. Same as Bug 864367.
Attached file Reduced Testcase
Blocks: 825527
Confirming that the image rollover code works by changing:

document['fpAnimswapImgFP6'].src=document['fpAnimswapImgFP6'].lowsrc

to

document['fpAnimswapImgFP6'].src=document['fpAnimswapImgFP6'].getAttribute('lowsrc');

Bob, let us know when you've updated all the code on your sites replacing every instance of .lowsrc with .getAttribute('lowsrc')

Please visit https://bugzilla.mozilla.org/show_bug.cgi?id=878509#c8 and reply there instead of directly to my email address.
Flags: needinfo?(rhsdesign)
Flags: needinfo?(rhsdesign)
Summary: DHTML rollover swap image effect no longer visible in version 21, version 18 OK → DHTML rollover swap image effect no longer visible in Firefox 20 onwards
Status: UNCONFIRMED → NEW
Ever confirmed: true
Duplicate of this bug: 864367
Assignee: english-us → nobody
Component: English US → DOM
Product: Tech Evangelism → Core
Target Milestone: Jun → ---
Assignee: nobody → Ms2ger
Attached patch Patch v1Splinter Review
Attachment #757086 - Flags: review?(bugs)
Flags: needinfo?(rhsdesign)
OS: Windows 7 → All
Hardware: x86_64 → All
Summary: DHTML rollover swap image effect no longer visible in Firefox 20 onwards → Restore the HTMLImageElement.lowsrc, x, y attributes that were unintentionally removed
Wait.  If sites depend on these, don't we need a spec bug to have them in the spec?
Flags: needinfo?(Ms2ger)
And since you're around and smaug doesn't seem to be, feel free to r+ :)
Comment on attachment 757086 [details] [diff] [review]
Patch v1

A test would be nice.
Attachment #757086 - Flags: review?(bugs) → review+
Hi Everyone,

First let me say thank you for the attention and the workaround. I really would have hated to go to another browser as I have been using Firefox quite awhile now and really like it.  Absolutely dislike all other browsers. IE10 destroys the drop menu graphics and button character used in my shopping carts! I'm impressed with your community of code debuggers and your jump to fix attitude. Thank you.

FrontPage 2000 uses shared borders and the code search and replace had to be done in the separate border HTML file, it does not show in the main page HTML view on all but one site listed. These (below) are the web sites I manage which have the DHTML rollovers I created using the code found within FP2000 itself and your fix was right on target...

http://www.wps.org/

http://www.catskillmtncrystal.com/

http://www.stonerivergear.com/

http://www.stonerivergearpromos.com/

http://www.stonerivertradingcompany.com/

http://www.stormphotoinc.com/

I realize FP 2000 is an EOL product, but when you have websites with huge shopping carts designed in that environment and clients who are unwilling to pay me to change the interface because of outdated software, one has a major problem! I'm stuck using the software until the client decides otherwise. Like I said earlier about the software, I'm the master of it and it's not the master of me, thankfully!

Not to sound ungrateful, but this fix is on my side and if I read correctly in the bug fix CC's the error is in Firefox's domain. I would like to be using the software as is and not having to do a search and replace each time I decide to use a rollover. Is that possible?

Thanks again for your help. My clients also thank you I'm sure!

Bob Sickler
Comment on attachment 757086 [details] [diff] [review]
Patch v1

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 825527
User impact if declined: broken sites (and quite a few, it seems)
Testing completed (on m-c, etc.): on inbound
Risk to taking this patch (and alternatives if risky): low risk
String or IDL/UUID changes made by this patch: none
Attachment #757086 - Flags: approval-mozilla-beta?
Attachment #757086 - Flags: approval-mozilla-aurora?
(In reply to rhsdesign from comment #14)
> this fix is on my side and if I read correctly
> in the bug fix CC's the error is in Firefox's domain.
It looks like support for the original .lowsrc will land in Firefox 22 onwards, although...
> I would like to be
> using the software as is and not having to do a search and replace each time
> I decide to use a rollover. Is that possible?
Continuing to create new webpages with such deprecated code in them is guaranteed to bite you like this more and more frequently into the future.

You will greatly benefit from switching your clients to a free modern webpage editor like the one at http://bluegriffon.org that will allow you to do rollovers *without the need for javascript*, using Cascading Style Sheets (CSS) which you'll need time to learn of course. The Firefox developers just gave you that time, please use it wisely.

I've attached a homepage example of the first site you linked to that has the following CSS :hover code on those links without needing images for them:
    <style type="text/css">
.topbar {  
  color: #031e61;  
  text-decoration: none;  
  font-family: Impact, sans-serif;  
  font-size: 15px;  
  letter-spacing: 0.8px;  
  padding-left: 0.8px;
}

.topbar:hover {  
  color: #fef9ff;  
  background-color: #031e61;
}
    </style>

To change the rollover colour in Bluegriffon, copy the attachment link from this bug page into File -> Open, then click to place the caret on any one of the links, then do Panels -> Style Properties, in that dialog from the "Apply styles to" dropdown choose "All elements of class.." and pick "topbar" from the adjacent dropdown. Clicking the dot next to "Foreground" and "Background" brings up a colour picker and after picking one and clicking "OK" in that dialog you can immediately mouseover the links to see the new :hover colours.
To get the equivalent of FP "border" files you can save styles to an external .css file so other webpages can use it. More at http://en.flossmanuals.net/bluegriffon/using-external-cascading-style-sheets-to-control-the-appearance-of-a-set-of-pages/
> Thanks again for your help. My clients also thank you I'm sure!
> 
> Bob Sickler
You're welcome! Please don't mistake my long post as anything but enthusiasm to see you update your web authoring skills, sorry about the length. Also apologies to the devs patching Firefox for having to scroll past this as the wrong place for a tutorial!
Oops, I forgot the most important step(In reply to Mardeg from comment #17)
> then do Panels -> Style Properties, in that dialog from the
> "Apply styles to" dropdown choose "All elements of class.." and pick
> "topbar" from the adjacent dropdown.
You need to tick the box (below those dropdowns) for "when the pointer hovers over the element" to choose rollover colours!
https://hg.mozilla.org/mozilla-central/rev/2d5a92daf4f1
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
I'm looking at writing a test as well.
Flags: in-testsuite?
Comment on attachment 757086 [details] [diff] [review]
Patch v1

Low risk fix for recent regression with web regressions that will make it into b4. Approving.
Attachment #757086 - Flags: approval-mozilla-beta?
Attachment #757086 - Flags: approval-mozilla-beta+
Attachment #757086 - Flags: approval-mozilla-aurora?
Attachment #757086 - Flags: approval-mozilla-aurora+
(In reply to :Ms2ger from comment #20)
> I'm looking at writing a test as well.

Over in bug 878950.
Hi Folks.. Bug Finder here... If you implement a patch fix, how will that affect the change in code I made to my web sites to make it work currently? Bob Sickler
In the patched builds, both the old code (.lowsrc) and the new code (.getAttibute("lowsrc")) will work.
This needs ba+ due to it touching a .webidl file.
What's ba+?
Flags: needinfo?(ryanvm)
Oh, "binary approval"?

webidl is not xpidl.  It's JS-only; changing it does not affect binary anything.
I filed bug 879086 for fixing the commit hook.
Flags: needinfo?(ryanvm)
Verified fixed with Firefox 22 beta 4 (build ID: 20130605070403), using the testcase from comment 7 and the link:  http://www.catskillmtncrystal.com/, on both Ubuntu 12.10 32bit and Mac OSX 10.8.3
QA Contact: manuela.muntean
Depends on: 887660
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.