Page MenuHomePhabricator

Reduce redundancy between OutputPage and ParserOutput
Open, Needs TriagePublic

Description

OutputPage contains its own copies of most of the metadata maintained by ParserOutput, including lists of categories, index policy, the "no gallery flag", resource loader modules, etc, etc.

Instead of storing this data twice and writing bespoke routines to merge the contents of ParserOutput with OutputPage, maintain this metadata in OutputPage as a special instance of ParserOutput, accessible via OutputPage::getMetadata(). We can then use the standard "merge two ParserOutputs together" routines to combine the metadata from the page with any metadata from parsed content.

See also T300979: Ensure ParserOutput can always be combined asynchronously/out-of-order.

Event Timeline

Change 759838 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] Use OutputPage::$metadata to store index policy

https://gerrit.wikimedia.org/r/759838

Change 759840 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] Use OutputPage::$metadata to store the 'prevent clickjacking' flag

https://gerrit.wikimedia.org/r/759840

Change 760993 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] Deprecate protected and public properties of OutputPage

https://gerrit.wikimedia.org/r/760993

Change 760993 merged by jenkins-bot:

[mediawiki/core@master] Deprecate protected and public properties of OutputPage

https://gerrit.wikimedia.org/r/760993