@aschmitz (i think actually webkit and chrome depends on libxml2/libxslt and gecko has their own c++ implementation.)
@Lady WebKit uses libxslt, at least it did when I packaged it.
Firefox has its own custom HTML 5 parser, originally developed around 2009 and somewhat based off the HTML 5 standard parsing algorithm and a Java reference implementation, unimaginatively just called "parser". It does vendor a copy of Expat for pure XML.
See also:
https://johnresig.com/blog/html-5-parsing/
https://hacks.mozilla.org/2010/05/firefox-4-the-html5-parser-inline-svg-speed-and-more/
https://hg-edge.mozilla.org/mozilla-central/file/tip/parser
@awilfox @Lady WebKit developer here! Libxml and libxslt are used for... Well, XML and XSLT support (mainly the latter). The main HTML/XHTML parser is custom and heavily tested (and fuzzed) like the rest of WebKit. For those truly concerned about bugs in those libraries, both @WebKitGTK and @WPEWebKit may be built without them but losing a bit of (somewhat niche) functionality.
@awilfox @Lady @WebKitGTK @WPEWebKit the relevant code is in https://github.com/WebKit/WebKit/tree/main/Source/WebCore/html/parser
@lanodan @Lady Kind of, yes. Though systemd and ninja only need it for building, nginx only(?) needs it for libnginx-mod-http-xslt-filter, and php uses it for php-xml. And we're both leaving out things, but I was just sort of surprised by how few things actually seem to have firm dependencies on it. On the other hand, there's enough that if it stopped working with, say, a new glibc/musl version, there would probably be a fix in short order.
@aschmitz and yes i would love for someone to rewrite it as well (and make it support XML1.1, and XSLT/XPATH 2.0, and 3.0…), but nobody IS going to do that, because it’s very hard, and in the meantime libxml2 is what is available on every platform, and it still has bugs i would love to see get solved