Closed
Bug 612839
Opened 14 years ago
Closed 13 years ago
Remove nsAHtml5FragmentParser
Categories
(Core :: DOM: HTML Parser, defect)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: hsivonen, Assigned: marco)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 6 obsolete files)
14.22 KB,
patch
|
Details | Diff | Splinter Review |
Remove nsAHtml5FragmentParser and cast to nsHtml5Parser where casts to nsAHtml5FragmentParser currently occur.
Blocks: deCOM
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #549104 -
Flags: review?(hsivonen)
Updated•13 years ago
|
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Reporter | ||
Comment 2•13 years ago
|
||
Comment on attachment 549104 [details] [diff] [review] Removed nsAHtml5FragmentParser >- asFragmentParser->ParseHtml5Fragment(aFragment, >+ asParser->ParseHtml5Fragment(aFragment, > fragment, > contextAsContent->Tag(), > contextAsContent->GetNameSpaceID(), > (document->GetCompatibilityMode() == > eCompatibility_NavQuirks), > PR_FALSE); > } else { >- asFragmentParser->ParseHtml5Fragment(aFragment, >+ asParser->ParseHtml5Fragment(aFragment, > fragment, > nsGkAtoms::body, > kNameSpaceID_XHTML, > (document->GetCompatibilityMode() == > eCompatibility_NavQuirks), > PR_FALSE); Please realign the lines under the ones you change so that all the arguments start on the same column. >+ asParser->ParseHtml5Fragment(aInnerHTML, > this, > Tag(), > GetNameSpaceID(), > doc->GetCompatibilityMode() == > eCompatibility_NavQuirks, > PR_TRUE); Same here. > NS_IMETHOD ParseHtml5Fragment(const nsAString& aSourceBuffer, > nsIContent* aTargetNode, > nsIAtom* aContextLocalName, > PRInt32 aContextNamespace, > PRBool aQuirks, > PRBool aPreventScriptExecution); This could now be made non-virtual, right? r=me with those nits addressed. However, chances are that this patch doesn't apply as-is anymore. :-(
Attachment #549104 -
Flags: review?(hsivonen) → review+
Reporter | ||
Comment 3•13 years ago
|
||
bmo@edmorley.co.uk, why was this assigned to me when another person has posted a patch?
Assignee: hsivonen → mar.castelluccio
Comment 4•13 years ago
|
||
Apologies, must have accidentally used copy email context menu on comment 0 rather than comment 1; meant to set to Marco.
Comment 5•13 years ago
|
||
I think we should move this to nsIParser for now and to mozilla::parser::AParser eventually. Exporting all of the parser seems sub-optimal.
Reporter | ||
Comment 6•13 years ago
|
||
(In reply to comment #5) > I think we should move this to nsIParser for now and to > mozilla::parser::AParser eventually. I'd like to put only the real commonality in mozilla::parser::AParser. The fragment parsing entry points need different arguments for HTML and XML, so I think they don't belong on mozilla::parser::AParser. > Exporting all of the parser seems sub-optimal. sicking disagreed in bug 599588 comment 31. I disagree, too (now).
Assignee | ||
Comment 7•13 years ago
|
||
The patch is a little different, because there was some changes in the repository. nsHtml5Parser.h includes nsContentSink.h, that doesn't exist. I don't know if it'll be added with another patch, so I leaved the inclusion be.
Attachment #549104 -
Attachment is obsolete: true
Attachment #550198 -
Flags: review?(hsivonen)
Assignee | ||
Comment 8•13 years ago
|
||
Now it compiles without problems.
Attachment #550198 -
Attachment is obsolete: true
Attachment #550198 -
Flags: review?(hsivonen)
Assignee | ||
Updated•13 years ago
|
Attachment #550233 -
Flags: review?(hsivonen)
Reporter | ||
Comment 9•13 years ago
|
||
Comment on attachment 550233 [details] [diff] [review] Removed nsAHtml5FragmentParser v3 >- static nsAHtml5FragmentParser* sHTMLFragmentParser; >+ static nsHtml5Parser* sHTMLParser; > static nsIParser* sXMLFragmentParser; Please keep the variable name sHTMLFragmentParser to indicate that the object is to be used for fragment parsing only and for consistency with sXMLFragmentParser. With that, r=me.
Attachment #550233 -
Flags: review?(hsivonen) → review+
Reporter | ||
Comment 10•13 years ago
|
||
(In reply to comment #7) > nsHtml5Parser.h includes nsContentSink.h, that doesn't exist. How do you mean? http://hg.mozilla.org/mozilla-central/file/tip/content/base/src/nsContentSink.h seems to exist, still.
Assignee | ||
Comment 11•13 years ago
|
||
For nsContentSink.h there was a problem with my local repository, that I've now fixed.
Attachment #550233 -
Attachment is obsolete: true
Attachment #550334 -
Flags: review?(hsivonen)
Reporter | ||
Comment 12•13 years ago
|
||
Comment on attachment 550334 [details] [diff] [review] Removed nsAHtml5FragmentParser v3 r=hsivonen
Attachment #550334 -
Flags: review?(hsivonen) → review+
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 13•13 years ago
|
||
Added author name and commit message.
Attachment #550334 -
Attachment is obsolete: true
Updated•13 years ago
|
Keywords: checkin-needed
Whiteboard: [inbound]
Assignee | ||
Comment 15•13 years ago
|
||
what was the error?
Comment 16•13 years ago
|
||
http://tinderbox.mozilla.org/showlog.cgi?log=Mozilla-Inbound/1312441221.1312441362.1615.gz&fulltext=1#err0 error: nsContentSink.h: No such file or directory Is nsContentSink.h exported? This is one of the reasons I'm not happy with the patch.
Assignee | ||
Comment 17•13 years ago
|
||
Corrected compilation problems.
Attachment #550427 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 18•13 years ago
|
||
Ms2ger, nsContentSink.h wasn't exported, now I've changed the Makefile.in to export it. Isn't it better to have less code and more exports, than more code and less exports?
Comment 19•13 years ago
|
||
I think exporting private headers is harmful, but that ship has apparently sailed.
Updated•13 years ago
|
Keywords: checkin-needed
Whiteboard: [inbound]
Comment 21•13 years ago
|
||
http://dev.philringnalda.com/tbpl/?tree=Mozilla-Inbound&rev=e60f96b64dfa Win32: { e:/builds/moz2_slave/m-in-w32/build/editor/libeditor/html/nsHTMLDataTransfer.cpp(87) : fatal error C1083: Cannot open include file: 'nsAHtml5FragmentParser.h': No such file or directory } (and other platforms too) Marco, if you don't have try server access, just ask once the patch is updated and one of the people on the CC list will be more than happy to send to try for you :-)
Assignee | ||
Comment 22•13 years ago
|
||
I need someone that could send this to a try server.
Attachment #550668 -
Attachment is obsolete: true
Comment 23•13 years ago
|
||
(In reply to Marco Castelluccio from comment #22) > I need someone that could send this to a try server. http://dev.philringnalda.com/tbpl/?tree=Try&rev=6dba44e1c91f :-)
Assignee | ||
Comment 24•13 years ago
|
||
Ok, in the try server the build was successful. So now this has to be checked-in.
Keywords: checkin-needed
Comment 26•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/145e0f391912
Updated•13 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Comment 27•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/adfa031a0129
Flags: in-testsuite-
Whiteboard: [inbound]
Thanks for taking this on Marco.
You need to log in
before you can comment on or make changes to this bug.
Description
•