Closed Bug 176926 Opened 22 years ago Closed 22 years ago

document.image.src= fails (rollovers)

Categories

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

x86
All
defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla1.2final

People

(Reporter: rrkramer, Assigned: bryner)

References

()

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

The page has a form that contains and image and a button that calls a javascript
function that should replace the image with another.

The function is called, but the image is not replaced. This worked with 20021016
and all the earlier releases I had tried.
->DOM HTML
Assignee: rogerl → jst
Component: JavaScript Engine → DOM HTML
QA Contact: pschwartau → stummala
regression between linux trunk builds 2002102322 and 2002102508
debug build says:
###!!! ASSERTION: failed to find attribute: 'attr', file nsHTMLAttributes.cpp,
line 1187

marking NEW
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
OS: Windows 2000 → All
Depends on: 22820
This is a regression from bug 22820.  if the hint is content, the attr is not
mapped; otherwise it is.  nsHTMLAttributes can't deal and gets confused.... (we
really need to fix how that's determined!).
Assignee: jst → bryner
I talked to hyatt about this, and he said that using a framechange hint here is
incorrect since it makes 'src' into a style-mapped attribute.  I have an
alternate approach that uses PresShell's ReconstructFramesFor() and seems to fix
the original bug without causing this regression.  Patch coming up.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2final
Attached patch patch (obsolete) — Splinter Review
typo in above comment: I meant to say "RecreateFramesFor", not
"ReconstructFramesFor".
I'd make that 

} else if (mDocument) {
  // reconstruct frame
}

and not bother with the nodeinfo... right no the only way you get into the else
is if mDocument is non-null or if SetAttr failed (and in the latter case do we
really want to reconstruct?).

sr=bzbarsky with that change.
Comment on attachment 104310 [details] [diff] [review]
patch

Well, I really don't like the idea of RecreateFramesFor in the first place, but
I guess it's better than the altenative.

In the longer term, this would probably be fixed by implementing the CSS3
'content' property.  I also have a bug on removing / reducing the uses of the
rule-based hints.

Regarding bz's comment, I'd prefer:

NS_ENSURE_SUCCESS(rv, rv);

if (!mDocument) {
  /* current code */
} else {
  /* your new code */
}
*** Bug 176957 has been marked as a duplicate of this bug. ***
Attachment #104310 - Attachment is obsolete: true
Comment on attachment 104332 [details] [diff] [review]
address dbaron and bz's comments

sr=bzbarsky
Attachment #104332 - Flags: superreview+
Comment on attachment 104332 [details] [diff] [review]
address dbaron and bz's comments

r=hyatt
Attachment #104332 - Flags: review+
*** Bug 177043 has been marked as a duplicate of this bug. ***
Blocks: 177042
*** Bug 177096 has been marked as a duplicate of this bug. ***
Blocks: 177084
Blocks: 177140
*** Bug 177172 has been marked as a duplicate of this bug. ***
Summary: document.image.src =' ... fails → document.image.src= fails (rollovers)
*** Bug 177304 has been marked as a duplicate of this bug. ***
*** Bug 177058 has been marked as a duplicate of this bug. ***
*** Bug 177375 has been marked as a duplicate of this bug. ***
*** Bug 177381 has been marked as a duplicate of this bug. ***
*** Bug 177042 has been marked as a duplicate of this bug. ***
Comment on attachment 104332 [details] [diff] [review]
address dbaron and bz's comments

a=brendan@mozilla.org for 1.2final.

/be
Attachment #104332 - Flags: approval+
checked in.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 177443 has been marked as a duplicate of this bug. ***
*** Bug 177444 has been marked as a duplicate of this bug. ***
*** Bug 177552 has been marked as a duplicate of this bug. ***
*** Bug 177084 has been marked as a duplicate of this bug. ***
*** Bug 177559 has been marked as a duplicate of this bug. ***
*** Bug 86343 has been marked as a duplicate of this bug. ***
*** Bug 177957 has been marked as a duplicate of this bug. ***
*** Bug 178618 has been marked as a duplicate of this bug. ***
*** Bug 179469 has been marked as a duplicate of this bug. ***
*** Bug 179899 has been marked as a duplicate of this bug. ***
*** Bug 180488 has been marked as a duplicate of this bug. ***
*** Bug 180820 has been marked as a duplicate of this bug. ***
*** Bug 177140 has been marked as a duplicate of this bug. ***
works with a recent trunk nightly on win2k. verified.
Status: RESOLVED → VERIFIED
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: