Closed Bug 5264 Opened 26 years ago Closed 22 years ago

CantRenderReplacedElement and <input type=image ...>s

Categories

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

x86
Windows NT
defect

Tracking

()

VERIFIED WORKSFORME
Future

People

(Reporter: rickg, Assigned: alexsavulov)

Details

Seems that any page with an <input type=image..> tag crashes. Here's the snippit: <html><body> <form> <input type="image" src="/shared/find_it.gif"> </form> </body></html>
http://marmot.net/work/input_image.html contains a simplified test case for this. It didn't crash on the April 16 build, and the April 19 build is not launching on my NT box at the moment...
Assignee: karnaze → kipp
Kipp, do you have any ideas what might have changed (possibly in nsImageFrame). If in Rick's example the src= can be found it works, but when it can't be found, I get the following stack on my 4/19 debug WinNT build. NTDLL! 77f76148() nsDebug::Assertion(char * 0x006f5860, char * 0x006f5854, char * 0x006f5818, int 4809) line 140 + 13 bytes nsCSSFrameConstructor::CantRenderReplacedElement(nsCSSFrameConstructor * const 0x017a2370, nsIPresContext * 0x01768c60, nsIFrame * 0x01718de0) line 4809 + 35 bytes StyleSetImpl::CantRenderReplacedElement(StyleSetImpl * const 0x017a22e0, nsIPresContext * 0x01768c60, nsIFrame * 0x01718de0) line 828 PresShell::HandleCantRenderReplacedElementEvent(nsIFrame * 0x01718de0) line 1363 HandlePLEvent(CantRenderReplacedElementEvent * 0x0172a200) line 1379 PL_HandleEvent(PLEvent * 0x0172a200) line 476 + 10 bytes PL_ProcessPendingEvents(PLEventQueue * 0x016b5b90) line 437 + 9 bytes _md_EventReceiverProc(void * 0x00390418, unsigned int 49334, unsigned int 0, long 23813008) line 799 + 9 bytes USE
Assignee: kipp → troy
Your CantRender code doesn't handle failed image loads on INPUT elements...should be easy to fix
Assignee: troy → karnaze
I changed CantRenderReplacedElement() to not assert for INPUT elements, but that isn't a complete solution. The approach we use for IMG elements of replacing the image frame with the alternate text won't work for image control frames because they have lots of code for focus and event handling. Ideally, image control frame wouldn't exist at all, and you would just use a regular old image. Chris, assigning to you so you or Eric can determine best how you want to handle this.
Severity: critical → normal
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → LATER
I'm not sure what to do with this. nsImageControlFrame derives from nsImageFrame and needs to add the extra behavior. I don't think we can just use nsImageFrame without changing it. I'm changing the summary (since Troy fixed the crash), marking it LATER, and bumping down the severity.
Status: RESOLVED → VERIFIED
Summary: crash using <input type=image ...> → CantRenderReplacedElement and <input type=image ...>s
LATER is deprecated.
Status: VERIFIED → REOPENED
Component: Form Submission → HTML Form Controls
Resolution: LATER → ---
->alex. jkeiser said you were just in the process of fixing it, so you can probably resolve this.
Assignee: karnaze → alexsavulov
Status: REOPENED → NEW
Component: HTML Form Controls → Form Submission
QA Contact: cpratt → vladimire
i'm not usre but we might have fixed this one already. need verification.
WFM on WinXP trunk build 2002081409. Even if the image is there or not. Tested it locally.
Bulk moving P1-P5 un-milestoned bugs to future.
Target Milestone: --- → Future
this wfm for 2 years :)
Status: NEW → RESOLVED
Closed: 26 years ago22 years ago
Resolution: --- → WORKSFORME
verifying build 2002-10-18-08-trunk
Status: RESOLVED → VERIFIED
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.