Closed Bug 309076 Opened 19 years ago Closed 19 years ago

Image ALT text shows instead of image until mouseover when Adblock is installed

Categories

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

defect
Not set
critical

Tracking

()

RESOLVED WONTFIX

People

(Reporter: RyanVM, Assigned: bzbarsky)

References

()

Details

(Keywords: regression)

Attachments

(2 files)

This is most likely a regression from the checkin on bug 11011. Images with alt tags have the text shown instead of the actual image. If you mouseover the text, it switches to the image instead. I've found the most reliable way to reproduce the problem is to reload the page. The images tend to show upon the first rendering of it and alt text on subsequent reloads. The URL given above is a site run by myself. If I open that exact same page locally, I can't reproduce the error. I've also seen this issue when replying to a message on a vBulletin3 forum, so it's not something isolated to my website.
The top of the image show the image on the first loading of the page. The bottom shows what happens after it's reloaded.
The top of the image show the image on the first loading of the page. The bottom shows what happens after it's reloaded.
Attachment #196590 - Attachment description: Screenshot of problem #1 → Screenshot #1 of problem
I can't seem to reproduce this, but my build has the Tp regression fix attempts in it, and the second one could very well help here...
Blocks: moz-broken
No longer depends on: moz-broken
Still reproducing even with Tp patch #2 included in the build
The problem here is that under BindToTree we call ImageURIChanged, which calls ShouldLoad(). The adblock ShouldLoad() impl accesses document.defaultView on an "unsafe" document, which calls ResolveName() on the doc, which flushes content notifications and hence frame construction. Hence we get a frame constructed while halfway through ImageURIChanged(). Since we're coming from BindToTree, aNotify is false, so we don't notify at the end of ImageURIChanged(). Frankly, I think the right fix here is for adblock to use an XPCNativeWrapper for the document. That would prevent the ResolveName call and would be a better idea in general. I suppose could add some hacks to nsImageLoadingContent to catch this case and deal, but they would all cause performance degradation in various cases, so I would really rather not.
Assignee: bzbarsky → general
Component: General → DOM
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → ian
Hardware: PC → All
So to make this clear, I'm suggesting we WONTFIX this bug and get adblock fixed. Any objections?
Assignee: general → bzbarsky
Summary: Image ALT information shows instead of image until mouseover → Image ALT text shows instead of image until mouseover when Adblock is installed
(In reply to comment #6) > So to make this clear, I'm suggesting we WONTFIX this bug and get adblock fixed. > Any objections? No. :) Fix Extension > Add hacks to code that cause perf degradation
Quite frankly, I was asking for the opinion of the layout and DOM peers I cced on the bug when I asked that question.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WONTFIX
*** Bug 309465 has been marked as a duplicate of this bug. ***
*** Bug 311062 has been marked as a duplicate of this bug. ***
What the hell does Adblock have to do with this?
Thanks for asking so politely, but you should really try reading the bug. It was explained in quite some detail in comment 5.
Matt, I've been maintaining a fixed version of Adblock here: http://aasted.org/adblock/viewtopic.php?t=2264 Boris is there a better way of accessing arrays that Adblock creates on nodes extensively without using wrappedJSObject?
Michael, not really.
Oh crud, I'm sorry, I didn't see that comment. >_< I've notified the maintainer of Adblock Plus about the problem including a link to the bug and the way to fix it. Fixing the bug in Adblock Plus wouldn't cause it to stop working with 1.0.x, would it?
Adblock Plus has already been updated (in the development version, at least). http://p2.forumforfree.com/development-builds-vt5-adblockplus.html
*** Bug 315280 has been marked as a duplicate of this bug. ***
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: