HomePhorge

[ParsoidParser] Remove unneeded code to set render ID

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

[ParsoidParser] Remove unneeded code to set render ID

Since I72c5e6f86b7f081ab5ce7a56f5365d2f75067a78 it is part of the
contract of ContentRenderer::getParserOutput() that the render ID (and
other cache parameters) will be set when it returns.
(ContentHandler::getParserOutput() can set them even earlier if it has
custom content-based overrides.) We had a lot of temporary
backward-compatibility code "later" in the parse process to try to close
the barn door if some code path "forgot" to set them, but these are
unnecessary now.

This patch removes that backward-compatibility code in ParsoidParser;
there is similar remaining code in ParserCache etc. which can be
addressed in follow ups.

(For compatibility we do have to temporarily copy the render ID code
inside ParsoidOutputAccess::parseUncachable, but that class is
deprecated and will be removed.)

The HtmlOutputRendererHelper path which used to call
ParsoidParser::parseFakeRevision() is now replaced with a codepath that
goes through RevisionRenderer. In order to maintain the same behavior
of the ParsoidHandler, we have also added 'useParsoid' handling to the
JsonContentHandler. This support can perhaps be deprecated eventually.

Bug: T350538
Change-Id: I0853624cf785f72fd956c6c2336f979f4402a68f

Details

Provenance
C. Scott AnanianAuthored on Feb 8 2024, 9:07 PM

Event Timeline

C. Scott Ananian <cscott@cscott.net> committed rMW16de2c085120: [ParsoidParser] Remove unneeded code to set render ID (authored by C. Scott Ananian <cscott@cscott.net>).Jul 19 2024, 8:09 PM

Commit No Longer Exists

This commit no longer exists in the repository.