Closed Bug 84000 Opened 24 years ago Closed 24 years ago

NOFRAMES childs returned without attributes

Categories

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

x86
Linux
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.4

People

(Reporter: scoda, Assigned: harishd)

Details

(Whiteboard: [fix in hand])

If I parse this file, with my own content sink, I can't obtain SRC attribute of IMG inside NOFRAMES. NOFRAMES return simply '<img>' text instead of '<img src="mozilla.gif">' text. I have got the patch (need same behaviour of NOSCRIPT inside nsHTMLTokens.cpp). <html> <head> <title>IMG without attribute</title> </head> <frameset> <frame name="TESTTHIS"> <frame name="SCODA"> <noframes> <img src="mozila.gif"> </noframes> </frameset> </html>
THE PATCH (worked on CVS checkout on 4th Jun 2001): I changed nsHTMLTokenizer.cpp to obtain the desired behaviour: In function nsresult nsHTMLTokenizer::ConsumeEndTag I added a test for noframes like existing one for NOSCRIPT: if(NS_SUCCEEDED(result)) { eHTMLTags theTag=(eHTMLTags)aToken->GetTypeID(); if(((theTag==eHTMLTag_textarea) || (theTag==eHTMLTag_xmp) || (theTag==eHTMLTag_plaintext) || (theTag==eHTMLTag_noframes) || (theTag==eHTMLTag_noscript)) && mRecordTrailingContent) { mRecordTrailingContent=PR_FALSE; } } In function: nsresult nsHTMLTokenizer::ConsumeStartTag I added a test for noframes like existing one for NOSCRIPT: //XXX - Find a better soution to record content //Added _plaintext to fix bug 46054. if((eHTMLTag_textarea==theTag || eHTMLTag_xmp==theTag || eHTMLTag_plaintext==theTag || eHTMLTag_noscript==theTag || eHTMLTag_noframes==theTag) && !mRecordTrailingContent) { mRecordTrailingContent=PR_TRUE; }
Summary: NOFRAMES childs returned without attributes → NOFRAMES childs returned without attributes
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.3
Priority: -- → P2
Enrico: Could you tell me why you need the noframes children? When framesets are disabled noframes content will be available. Note: Adding tags to record trailing content would cost performance & memory. In fact noscript tag should be removed from the list for this reason.
Forgot to mention: r=harishd.
Whiteboard: [fix in hand]
sr=jst
Moving to more realistic target - m0.9.4!
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Priority: P2 → P3
Fix landed on 08/07/01. Marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Verified on 2001-08-08-Trunk build on WinNT. When loading the testcase, the image is not displayed.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Bindu: The image is within NOFRAMES!!!!!! NOFRAMES content would get displayed only when frames are disabled. Marking bug FIXED again. Scoda, could you please mark the bug verified? Thanx.
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Ok, it works fine, thank you. Enrico Scoda scoda@usablenet.com
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.