Closed Bug 366993 Opened 18 years ago Closed 18 years ago

HTML doctype should always be capitalized

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: sayrer, Assigned: sayrer)

References

()

Details

Attachments

(1 file, 1 obsolete file)

bug 366936 contains a test suite from html5lib/WHATWG, and we fail lots of tests because we pass through <!DOCTYPE hTmL> and the like.
Attached patch normalize "hTmL" doctypes (obsolete) (deleted) — Splinter Review
makes 21 more tests pass in bug 366936
Attachment #251478 - Flags: superreview?(jst)
Attachment #251478 - Flags: review?(jst)
Attached patch normalize "hTmL" doctypes (deleted) — Splinter Review
Attachment #251478 - Attachment is obsolete: true
Attachment #251479 - Flags: superreview?(jst)
Attachment #251479 - Flags: review?(jst)
Attachment #251478 - Flags: superreview?(jst)
Attachment #251478 - Flags: review?(jst)
Comment on attachment 251479 [details] [diff] [review] normalize "hTmL" doctypes + if (name.IsEmpty() || (name.Length() == 4 && + name.LowerCaseEqualsLiteral("html"))) { The string code already does the length check optimization, so no need to do that here too. r+sr=jst
Attachment #251479 - Flags: superreview?(jst)
Attachment #251479 - Flags: superreview+
Attachment #251479 - Flags: review?(jst)
Attachment #251479 - Flags: review+
Equals does, but the EqualsLiteral methods don't. http://lxr.mozilla.org/seamonkey/source/xpcom/glue/nsStringAPI.cpp#320
I thought we'd end up in http://lxr.mozilla.org/mozilla/source/xpcom/string/src/nsTSubstring.cpp#704 when calling LowerCaseEqualsLiteral() from our code, and that does the optimization. Either way, I don't think we should be spreading out this kind of optimization in our code, we should make the method calls more efficient instead...
OK.
Checking in nsHTMLContentSink.cpp; /cvsroot/mozilla/content/html/document/src/nsHTMLContentSink.cpp,v <-- nsHTMLContentSink.cpp new revision: 3.776; previous revision: 3.775 done
Status: NEW → RESOLVED
Closed: 18 years ago
OS: Linux → All
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9alpha
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: