Closed Bug 241328 Opened 20 years ago Closed 20 years ago

Make the HTML parser more 64-bit friendly, and clean up some code.

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jst, Assigned: jst)

Details

(Keywords: 64bit)

Attachments

(2 files)

I was looking for classes where we mix 32-bit members with pointer members w/o
grouping them together (which causes the class to be larger than necessary on
some 64-bit platforms due to pointer size and alignment etc) and I found that we
do that in nsParserNode, so I decided to fix that, and in doing so, I found some
other silly stuff I decided to cleanup, and some unused code (and members) I
could remove.

Patch coming up.
Attached patch CleanupSplinter Review
This does all that, and also initializes mRefCnt in nsCParserNode's default
ctor where it was left undefined before. Sigh.
Attachment #146779 - Flags: superreview?(bzbarsky)
Attachment #146779 - Flags: review?(bzbarsky)
Comment on attachment 146779 [details] [diff] [review]
diff -w for review

>Index: htmlparser/public/nsHTMLTokens.h

>+  virtual PRBool IsWellFormed(void) const {
>+    return PRBool(eWellFormed == mContainerInfo);
>+  }

Ditch the "PRBool()" part.

> class CEntityToken : public CHTMLToken {
>+  static nsresult ConsumeEntity(PRUnichar aChar, nsString& aString,
>+                                nsScanner& aScanner);
>     static  PRInt32     TranslateToUnicodeStr(PRInt32 aValue,nsString& aString);

Fix your weird indent?

> class CTextToken: public CHTMLToken {
>+  nsresult ConsumeUntil(PRUnichar aChar, PRBool aIgnoreComments,
>+                        nsScanner& aScanner, nsString& aEndTagName,
>+                        PRInt32 aFlag, PRBool& aFlushTokens);
>     virtual PRInt32     GetTokenType(void);

Again.

>+  virtual void Bind(nsScanner* aScanner, nsScannerIterator& aStart,
>+                    nsScannerIterator& aEnd);
>     virtual void        Bind(const nsAString& aStr);

Again.

> class CAttributeToken: public CHTMLToken {
>+  virtual void BindKey(nsScanner* aScanner, nsScannerIterator& aStart,
>+                       nsScannerIterator& aEnd);
>     virtual const nsAString&     GetValue(void) {return mTextValue;}

Again.

r+sr=bzbarsky with those nits.
Attachment #146779 - Flags: superreview?(bzbarsky)
Attachment #146779 - Flags: superreview+
Attachment #146779 - Flags: review?(bzbarsky)
Attachment #146779 - Flags: review+
You were looking at a diff -w, all those indentation issues were fixed already.
Thanks for the review!
Ah, damn.  Shoulda checked the normal diff.   ;)
Fix checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Keywords: 64bit
the file:
mozilla/parser/htmlparser/src/win32.order

seems to have been checked into the branch:
:pserver:peterv%propagandism.org@cvs.mozilla.org:/cvsroot 

according to bonsai.mozilla.org
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: