Closed Bug 311785 Opened 19 years ago Closed 19 years ago

Simplify nsIHTMLContentSink

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sicking, Assigned: sicking)

References

Details

Attachments

(2 files)

Patch comming up that simplifies the nsIHTMLContentSink interface by getting rid
of all the OpenXXX/CloseXXX methods.

This should allow us to simplify things both on the sink side and the parser
side. I've done some cleanup, but there should hopefully be even more to come.
Attached patch patch to fixSplinter Review
Attachment #198998 - Flags: superreview?(peterv)
Attachment #198998 - Flags: review?(mrbkap)
Attached patch patch -wSplinter Review
Mostly makes CNavDTD::CloseContainer easier to review.
Comment on attachment 198998 [details] [diff] [review]
patch to fix

>Index: content/html/document/src/nsHTMLContentSink.cpp
> // XXX MAYBE add code to place close form tag into the content model
> // for navigator layout compatability.

Is this comment still valid?

>Index: parser/htmlparser/src/nsViewSourceHTML.cpp
>       CEndToken endHeadToken(eHTMLTag_head);
>       nsCParserNode endHeadNode(&endHeadToken, 0/*stack token*/);
>-      result = mSink->CloseHead();
>+      result = mSink->CloseContainer(eHTMLTag_head);

The end parser nodes created here are never used, right? They can just go.

r=mrbkap
Attachment #198998 - Flags: review?(mrbkap) → review+
> > // XXX MAYBE add code to place close form tag into the content model
> > // for navigator layout compatability.
> 
> Is this comment still valid?

That is one old comment. Seems like when that was written forms weren't real
elements. So no, it doesn't seem to apply any more, i'll remove it. :)
Comment on attachment 198998 [details] [diff] [review]
patch to fix

>@@ -1252,19 +1225,30 @@ SinkContext::OpenContainer(const nsIPars

>     case eHTMLTag_map:
>-      mSink->ProcessMAPTag(content);
>+      mSink->mCurrentMap = content;

Copy the comment from ProcessMAPTag in here?
Attachment #198998 - Flags: superreview?(peterv) → superreview+
Checked in with petervs comment (although that code is going to die compleatly
in bug 312592). I had to bring back the OpenFrameset method in the sink due to
the checkin from bug 312942. Hopefully we can get rid of that crap both on the
body and the frameset eventually.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
This regressed bug 312097; I suspect that bug 315369 is pretty much the same thing as that regression...
Depends on: 312097, 315369
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: