Closed
Bug 559303
Opened 14 years ago
Closed 9 years ago
[HTML5] Consolidate strBuf and longStrBuf use in the tokenizer
Categories
(Core :: DOM: HTML Parser, defect, P4)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: hsivonen, Assigned: hsivonen)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 2 obsolete files)
110.82 KB,
patch
|
hsivonen
:
review+
|
Details | Diff | Splinter Review |
179.91 KB,
patch
|
hsivonen
:
review+
|
Details | Diff | Splinter Review |
It is unnecessary to have two growable buffers in the HTML5 tokenizer. There should be only one growable buffer and a fixed-size buffer for dealing with the case of avoiding losing the data following an unterminated named character reference that is also a prefix of another named character reference when tokenizing an attribute value. (e.g. foo="¬iX")
Summary: [HTML5] Consolidate strBuf and langStrBuf use in the tokenizer → [HTML5] Consolidate strBuf and longStrBuf use in the tokenizer
Assignee | ||
Comment 1•9 years ago
|
||
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•9 years ago
|
||
Assignee | ||
Comment 3•9 years ago
|
||
The javadocs that this patch leaves out-of-date are fixed in the last part of bug 489820.
Assignee | ||
Updated•9 years ago
|
Attachment #8625698 -
Flags: review?(wchen)
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8625699 [details] [diff] [review] m-c patch See bug 1029671 comment 36 for the big picture of the whole queue and about landing.
Attachment #8625699 -
Flags: review?(wchen)
Comment 5•9 years ago
|
||
Comment on attachment 8625698 [details] [diff] [review] htmlparser repo patch Review of attachment 8625698 [details] [diff] [review]: ----------------------------------------------------------------- ::: src/nu/validator/htmlparser/impl/Tokenizer.java @@ +816,5 @@ > + charRefBuf = newBuf; > + } > + charRefBuf[charRefBufLen++] = c; > + } > + Trailing whitespace here @@ +831,5 @@ > + tokenHandler.characters(charRefBuf, 0, charRefBufLen); > + } > + } > + } > + and here. @@ +3185,3 @@ > if ((returnState & DATA_AND_RCDATA_MASK) != 0) { > + for (int i = charRefBufMark; i < charRefBufLen; i++) { > + appendStrBuf(charRefBuf[i]); Slightly unrelated, but it looks like we can replace the for loop with the alternate appendStrBuf that takes buffer/offset/length. @@ +6415,3 @@ > if ((returnState & DATA_AND_RCDATA_MASK) != 0) { > + for (int i = charRefBufMark; i < charRefBufLen; i++) { > + appendStrBuf(charRefBuf[i]); Same for this for loop.
Attachment #8625698 -
Flags: review?(wchen) → review+
Comment 6•9 years ago
|
||
Comment on attachment 8625699 [details] [diff] [review] m-c patch This stuff should be regenerated after making the changes to the java file.
Attachment #8625699 -
Flags: review?(wchen) → review+
Assignee | ||
Comment 7•9 years ago
|
||
Thanks. Attaching revised patches for the record.
Attachment #8625698 -
Attachment is obsolete: true
Attachment #8644157 -
Flags: review+
Assignee | ||
Comment 8•9 years ago
|
||
Attachment #8625699 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8644158 -
Flags: review+
Comment 10•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7b3c5dd7ad30
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•