[webkit-reviews] review requested: [Bug 3905] Missing </title> makes page blank : [Attachment 6873] Patch v7

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Sun Mar 5 11:03:34 PST 2006

David Kilzer (ddkilzer) <ddkilzer at kilzer.net> has asked Darin Adler
<darin at apple.com> for review:
Bug 3905: Missing </title> makes page blank

Attachment 6873: Patch v7

------- Additional Comments from David Kilzer (ddkilzer) <ddkilzer at kilzer.net>
Updates from Patch v6:

- Added fast/js/exception-linenums-in-html-1.html and
fast/js/exception-linenums-in-html-2.html tests to verify correct line numbers
in HTML per Comment #25.
- Added fast/js/missing-title-end-tag-js.html to cover issue found in Comment
#29 (Attachment #6820).
- Moved SegmentedString copy constructor to .cpp file from .h file per Comment
- In HTMLTokenizer::parseTag() when </title> is missing:
  * Save and restore the whole State (not just the TagState).
  * Save and restore "lineno", not "lineno + src.lineCount()", per Comment #25.

  * Reset scriptCodeSize to zero when resetting state (due to code in an
unconditional else clause at the end of the while loop of parseSpecial() which
accumulates every character in the document in QChar* scriptCode while looking
for "</title").  This fixes the issue in Comment #29 (Attachment #6820).


- I tried fixing the issue in Comment #29 (Attachment #6820) by adding
conditions to the unconditional else clause near the end of the while loop in
parseSpecial(), but everything I tried caused Safari to simply hang when
tokenizing/parsing a document.	("Everything" was "if (!state.inTitle())" and
"if (state.inScript())".)  It seems like a waste to me to update scriptCode
unnecessarily if it's never used later (since it grows automatically), but I'm
not sure how to fix it.

More information about the webkit-reviews mailing list