Closed Bug 12152 Opened 26 years ago Closed 25 years ago

setting image.src doesn't work first time

Categories

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

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: dbaron, Assigned: nisheeth_mozilla)

References

Details

(Keywords: testcase, Whiteboard: [nsbeta2+])

Attachments

(4 files)

DESCRIPTION: Setting HTMLImageElement::src should change the image. It doesn't happen the first time, but does happen later times. This makes me think it only works when the image is in the memory cache. STEPS TO REPRODUCE: Load attachment (to be attached) in apprunner. ACTUAL RESULTS: First time loaded, you see HTML image. Later tries, you see CSS image. EXPECTED RESULTS: You should see the CSS image, although the first time you might see the HTML image first for a short time. BUILDS TESTED: * Linux, apprunner, 1999-08-16-08-M9 ADDITIONAL INFORMATION: This is a spinoff of bug 11518.
Whiteboard: [TESTCASE]
Is this Linux specific?
OS: Linux → All
Hardware: PC → All
ALSO DOES NOT WORK CORRECTLY ON: * Windows, apprunner, 1999-08-24-09-M10 Marking All/All.
In an attempt to get my bug list in order again, marking all the bugs I have currently as ASSIGNED.
Bulk moving [testcase] code to new testcase keyword. Sorry for the spam!
Keywords: testcase
This one works for me now. It's rather old, so I'm not surprised.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → WORKSFORME
Reopening this one because I could still see this happening. First time you can see only HTML image, when you reload, then you can see CSS image. Tested with 2000-04-10-09 with win-95.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Nominating nsbeta2. We have to start drawing a line on DOM0 backward compatibility; these bugs are supposed to be a high priority for nsbeta2 per the beta2 criteria.
Keywords: nsbeta2
I still see this with 5/15 build on WinNT 4.0 SP4. In fact, I never see the CSS image no matter how many times I reload the page. Setting image SRC is one of most widely used JS commands (e.g. the ubiquitous image rollovers). Setting to [nsbeta2+].
Whiteboard: [TESTCASE] → [nsbeta2+]
Taking this bug off Vidurs list.
Assignee: vidur → jst
Status: REOPENED → NEW
Taking this from jst as discussed in the XML/DOM bug distribution meeting.
Assignee: jst → nisheeth
When the page contains a strict doctype declaration, the image tag in the document never makes it through the parser to the content sink. That is why you don't see any image. I've filed bug 44028 on that problem and assigned it to harishd. When I remove the strict doctype declaration, then the original behavior described in this bug shows itself - the HTML 4.0 image gets displayed but does not get replaced with the CSS image. I am going to explore that problem further.
Status: NEW → ASSIGNED
Target Milestone: --- → M17
Whiteboard: [nsbeta2+] → [nsbeta2+] Fix in hand. Awaiting review.
Fix in hand. Awaiting code review by vidur.
Attached patch Attempted FixSplinter Review
Attached patch Updated fixSplinter Review
The fix is checked in. <IMG> and <INPUT type="image"> both behave correctly now. Thanks to Eric and Vidur for helping review my code and provide testing strategies.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago25 years ago
Resolution: --- → FIXED
Whiteboard: [nsbeta2+] Fix in hand. Awaiting review. → [nsbeta2+]
Verified with 2000-07-05-09.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: