Closed Bug 198435 Opened 21 years ago Closed 21 years ago

[FIX]Setting src on broken image broke in standards mode

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.4beta

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

()

Details

(Keywords: regression)

Attachments

(1 file)

The old code used to check for an image frame and reframe if there wasn't one...
I guess we need to try to do that here too.  Of course it's not clear how this
affects <object>....

Perhaps a better way is to reframe if the CURRENT_REQUEST has an error status. 
But what happens if the CURRENT_REQUEST is simply null?  That's covered by
http://web.mit.edu/bzbarsky/www/testcases/image-loading/appendNoSrcAndSetSource-standards.html
Blocks: 83774
bug 198989 seems related to this one. u dupe maybe?
Blocks: 198989
Blocks: 192237
No longer blocks: 198989
Priority: -- → P1
Target Milestone: --- → mozilla1.4beta
Blocks: 50213
Attached patch Proposed patchSplinter Review
Comment on attachment 120545 [details] [diff] [review]
Proposed patch

Reviews?  The basic idea here is that if we CantRenderReplacedElement no one is
watching the notifications from the content object anymore, so the image never
gets shown if the src is changed...

I don't like this patch very much, but the real fix of rewriting the way
CantRenderReplacedElement works is not something I can pull off for 1.4...
(because I'm not sure how it _should_ work, truth to tell).
Attachment #120545 - Flags: superreview?(jst)
Attachment #120545 - Flags: review?(roc+moz)
Status: NEW → ASSIGNED
Summary: Setting src on broken image broke in standards mode → [FIX]Setting src on broken image broke in standards mode
can't we just always reframe when the SRC changes? It's only one frame so we
probably won't notice the cost. And that would be pretty easy to do, right? The
same thing would work for OBJECT.
> can't we just always reframe when the SRC changes?

That would make image rollovers suck like no tomorrow (I did try this before
posting this patch).  Also, a lot of "dhtml" sites reset src in tight loops for
the fun of it..
Comment on attachment 120545 [details] [diff] [review]
Proposed patch

OK. There must be a better way to do this though. I wonder if we could handle
broken loads by setting something on the content which triggers XBL with the
"broken image".
Attachment #120545 - Flags: review?(roc+moz) → review+
Maybe..  Like I said, our way of handling of broken loads in general needs a
nice thwacking.  
Comment on attachment 120545 [details] [diff] [review]
Proposed patch

sr=jst, I guess that's about as good as this'll get for now...
Attachment #120545 - Flags: superreview?(jst) → superreview+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 202289 has been marked as a duplicate of this bug. ***
Verified FIXED using the testcase at
http://web.mit.edu/bzbarsky/www/testcases/image-loading/appendNoSrcAndSetSource-standards.html
on Windows XP with build 2004-11-12-04
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: