Closed Bug 204386 Opened 21 years ago Closed 21 years ago

Allow setting Image.src to empty

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla1.5alpha

People

(Reporter: Biesinger, Assigned: Biesinger)

References

()

Details

Attachments

(1 file)

this should simply consist of removing a few lines from ImageLoadingContent
http://lxr.mozilla.org/seamonkey/source/content/base/src/nsImageLoadingContent.cpp#361

note, both NS4 and MSIE 6 show a broken image when src is set to empty.
See http://web.mit.edu/bzbarsky/www/testcases/image-loading/setAttrToEmpty.html
for a testcase of setting .src to "".
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla1.5alpha
Comment on attachment 122789 [details] [diff] [review]
patch

Add { } around the body of the else (since the "if" has them) and add a short
comment explaining why you have to reset the intrinsic size (so that we will
recalculate it in GetDesiredSize).

r+sr=me with those changes.
Attachment #122789 - Flags: superreview+
Attachment #122789 - Flags: review+
Checking in content/base/src/nsImageLoadingContent.cpp;
/cvsroot/mozilla/content/base/src/nsImageLoadingContent.cpp,v  <-- 
nsImageLoadingContent.cpp
new revision: 1.12; previous revision: 1.11
done
Checking in layout/html/base/src/nsImageFrame.cpp;
/cvsroot/mozilla/layout/html/base/src/nsImageFrame.cpp,v  <--  nsImageFrame.cpp
new revision: 1.282; previous revision: 1.281
done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
urg, I just realized that I didn't address bz's comments when checking in :/ I
am _really_ sorry about that.

I'll fix that tomorrow.
ok, comments addressed:
Checking in nsImageFrame.cpp;
/cvsroot/mozilla/layout/html/base/src/nsImageFrame.cpp,v  <--  nsImageFrame.cpp
new revision: 1.283; previous revision: 1.282
done
For the record, due to other issues this caused some slowness with mozillazine
pages -- see bug 209242 
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: