Open Bug 301638 Opened 19 years ago Updated 2 years ago

Removing src attribute of an <img> should hide the image

Categories

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

x86
Windows 2000
defect

Tracking

()

People

(Reporter: Biesinger, Unassigned)

References

Details

Attachments

(1 file)

See the attached testcase. Removing the src attribute seems to have no effect,
not even if the image is removed from & reinserted into the document.

win2k, 1.7.8
winxp, seamonkey nightly 2005070205
Attached file testcase
See
http://lxr.mozilla.org/seamonkey/source/content/html/content/src/nsHTMLImageElement.cpp#141
-- changing that should probably be enough...

Also see
http://lxr.mozilla.org/seamonkey/source/content/html/content/src/nsHTMLInputElement.cpp#451
 for the equivalent <input type="image"> thing.
And the problem, of course, is that we can't just call ImageURIChanged there
since we're not looking at a null URI.  We probably want to call
CancelImageRequests and then trigger a reframe or something...
Depends on: moz-broken
triggering the reframe should now be done automatically, via the state change
notifications.
Right.  So just CancelImageRequests might work.
Ian, does HTML5 define this?
Assignee: general → nobody
QA Contact: ian → general
"A user agent that obtains images immediately must also synchronously update the image data of an img element whenever that element ... has its src, ... attribute set, changed, or removed,"

http://www.whatwg.org/specs/web-apps/current-work/multipage/edits.html#the-img-element
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: