Revert "Move NewPP limit report HTML comments to JS variables" and followups
[lhc/web/wiklou.git] / includes / OutputPage.php
index 12df3a5..50629ba 100644 (file)
@@ -295,9 +295,6 @@ class OutputPage extends ContextSource {
         */
        private $copyrightUrl;
 
-       /** @var array Profiling data */
-       private $limitReportData = [];
-
        /**
         * Constructor for OutputPage. This should not be called directly.
         * Instead a new RequestContext should be created and it will implicitly create
@@ -1775,16 +1772,11 @@ class OutputPage extends ContextSource {
                        }
                }
 
-               // Enable OOUI if requested via ParserOutput
+               // enable OOUI if requested via ParserOutput
                if ( $parserOutput->getEnableOOUI() ) {
                        $this->enableOOUI();
                }
 
-               // Include profiling data
-               if ( !$this->limitReportData ) {
-                       $this->setLimitReportData( $parserOutput->getLimitReportData() );
-               }
-
                // Link flags are ignored for now, but may in the future be
                // used to mark individual language links.
                $linkFlags = [];
@@ -2810,8 +2802,8 @@ class OutputPage extends ContextSource {
                        // The spec recommends defining XHTML5's charset using the XML declaration
                        // instead of meta.
                        // Our XML declaration is output by Html::htmlHeader.
-                       // http://www.whatwg.org/html/semantics.html#attr-meta-http-equiv-content-type
-                       // http://www.whatwg.org/html/semantics.html#charset
+                       // https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-content-type
+                       // https://html.spec.whatwg.org/multipage/semantics.html#charset
                        $pieces[] = Html::element( 'meta', [ 'charset' => 'UTF-8' ] );
                }
 
@@ -2966,15 +2958,6 @@ class OutputPage extends ContextSource {
                        }
                }
 
-               if ( $this->limitReportData ) {
-                       $chunks[] = ResourceLoader::makeInlineScript(
-                               ResourceLoader::makeConfigSetScript(
-                                       [ 'wgPageParseReport' => $this->limitReportData ],
-                                       true
-                               )
-                       );
-               }
-
                return self::combineWrappedStrings( $chunks );
        }
 
@@ -3695,7 +3678,7 @@ class OutputPage extends ContextSource {
        public static function transformCssMedia( $media ) {
                global $wgRequest;
 
-               // http://www.w3.org/TR/css3-mediaqueries/#syntax
+               // https://www.w3.org/TR/css3-mediaqueries/#syntax
                $screenMediaQueryRegex = '/^(?:only\s+)?screen\b/i';
 
                // Switch in on-screen display for media testing
@@ -3876,12 +3859,4 @@ class OutputPage extends ContextSource {
                        'mediawiki.widgets.styles',
                ] );
        }
-
-       /**
-        * @param array $data Data from ParserOutput::getLimitReportData()
-        * @since 1.28
-        */
-       public function setLimitReportData( array $data ) {
-               $this->limitReportData = $data;
-       }
 }