Closed
Bug 903912
Opened 11 years ago
Closed 11 years ago
Rip out most of the old parser
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: mrbkap, Assigned: mrbkap)
References
Details
Attachments
(4 files)
181.64 KB,
patch
|
hsivonen
:
review+
|
Details | Diff | Splinter Review |
172.59 KB,
patch
|
hsivonen
:
review+
|
Details | Diff | Splinter Review |
5.85 KB,
patch
|
hsivonen
:
review+
|
Details | Diff | Splinter Review |
108.01 KB,
patch
|
hsivonen
:
review+
|
Details | Diff | Splinter Review |
The old parser code is unused except for about:blank and yet it sits in the tree, hurting the eyes of passers-by, taking time to compile, and using otherwise-useful space on b2g (about 40-50kb by my measurements). It is much easier to generate blank documents than what we do now. It would be ideal to switch things over to use the new HTML parser for about:blank, but while we wait, this makes life a little nicer for everybody. I couldn't figure out a nice way to make small patches out of this. Hopefully it should be pretty easy, though, as the majority of it is simply removing never-reached code.
Assignee | ||
Comment 1•11 years ago
|
||
This patch also removes some code from nsElementTable.{h,cpp} in order to make the DTD utils possible. Note that this won't compile alone because I forgot to change nsHTMLContentSink here (I ended up doing that in the tokenizer removal patch). Henry, let me know if you don't want to review this and I'll find someone else to.
Attachment #788756 -
Flags: review?(hsivonen)
Assignee | ||
Comment 2•11 years ago
|
||
This allowed me to get rid of the DTD utils entirely (which involved moving some stuff to nsElementTable temporarily). Unlike the DTD patch, the tokenizer literally does nothing now.
Assignee | ||
Comment 3•11 years ago
|
||
Note the one bug that tryserver found in my patches: If we are given a content sink that isn't an nsIHTMLContentSink, we need to return NS_ERROR_HTMLPARSER_STOPPARSING from CNavDTD::BuildModel. This happens due to (I think) XBL files that don't exist. I haven't tracked down why yet, but I'll file a followup on fixing that.
Attachment #788758 -
Flags: review?(hsivonen)
Assignee | ||
Comment 4•11 years ago
|
||
There's only one user of nsElementTable: the HTML editor. We should fix that, but in the meantime, this strips the element table down to answer only the questions on nsIParserService. I generated most of this diff (the actual table changes) with a python script that I'm happy to attach here if wanted.
Attachment #788759 -
Flags: review?(hsivonen)
Assignee | ||
Updated•11 years ago
|
Attachment #788757 -
Flags: review?(hsivonen)
Assignee | ||
Comment 5•11 years ago
|
||
And for the record: $ git diff master | diffstat 28 files changed, 650 insertions(+), 12023 deletions(-)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → mrbkap
Comment 6•11 years ago
|
||
Comment on attachment 788756 [details] [diff] [review] Gut CNavDTD and the DTD utils. I assume that you tested that about:blank still gets a body element generated with this patch applied.
Attachment #788756 -
Flags: review?(hsivonen) → review+
Updated•11 years ago
|
Attachment #788757 -
Flags: review?(hsivonen) → review+
Comment 7•11 years ago
|
||
Comment on attachment 788758 [details] [diff] [review] A small cleanup patch to make the DTD even simpler. Never mind. I see that this patch takes care of what I was wondering about in my previous comment.
Attachment #788758 -
Flags: review?(hsivonen) → review+
Updated•11 years ago
|
Attachment #788759 -
Flags: review?(hsivonen) → review+
Comment 8•11 years ago
|
||
Further editor dependencies are handled in bug 729046. Thank you!
Assignee | ||
Comment 9•11 years ago
|
||
Landed in one squashed patch: https://hg.mozilla.org/integration/mozilla-inbound/rev/0bcfd14b61e8
Comment 10•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0bcfd14b61e8
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•