*/
protected $styles = [];
- /**
- * Whether jQuery is already handled.
- */
- protected $mJQueryDone = false;
-
private $mIndexPolicy = 'index';
private $mFollowPolicy = 'follow';
private $mVaryHeader = [
*/
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
$this->mModuleStyles = array_merge( $this->mModuleStyles, (array)$modules );
}
- /**
- * Get the list of module messages to include on this page
- *
- * @deprecated since 1.26 Obsolete
- * @param bool $filter
- * @param string|null $position
- * @return array Array of module names
- */
- public function getModuleMessages( $filter = false, $position = null ) {
- wfDeprecated( __METHOD__, '1.26' );
- return [];
- }
-
- /**
- * Load messages of one or more ResourceLoader modules.
- *
- * @deprecated since 1.26 Use addModules() instead
- * @param string|array $modules Module name (string) or array of module names
- */
- public function addModuleMessages( $modules ) {
- wfDeprecated( __METHOD__, '1.26' );
- }
-
/**
* @return null|string ResourceLoader target
*/
}
}
- // enable OOUI if requested via ParserOutput
+ // Enable OOUI if requested via ParserOutput
if ( $parserOutput->getEnableOOUI() ) {
$this->enableOOUI();
}
+ // Include profiling data
+ $this->limitReportData = $parserOutput->getLimitReportData();
+
// Link flags are ignored for now, but may in the future be
// used to mark individual language links.
$linkFlags = [];
$bodyClasses[] = 'capitalize-all-nouns';
}
+ // Parser feature migration class
+ // The idea is that this will eventually be removed, after the wikitext
+ // which requires it is cleaned up.
+ $bodyClasses[] = 'mw-hide-empty-elt';
+
$bodyClasses[] = $sk->getPageClasses( $this->getTitle() );
$bodyClasses[] = 'skin-' . Sanitizer::escapeClass( $sk->getSkinName() );
$bodyClasses[] =
* @return string
*/
function getBottomScripts() {
- return $this->getScriptsForBottomQueue();
+ return $this->getScriptsForBottomQueue() .
+ ResourceLoader::makeInlineScript(
+ ResourceLoader::makeConfigSetScript(
+ [ 'wgPageParseReport' => $this->limitReportData ],
+ true
+ )
+ );
}
/**
) {
// We're on a preview of a CSS subpage
// Exclude this page from the user module in case it's in there (bug 26283)
- $link = $this->makeResourceLoaderLink( 'user', ResourceLoaderModule::TYPE_STYLES,
+ $link = $this->makeResourceLoaderLink( 'user.styles', ResourceLoaderModule::TYPE_STYLES,
[ 'excludepage' => $this->getTitle()->getPrefixedDBkey() ]
);
$otherTags = array_merge( $otherTags, $link['html'] );
$otherTags[] = Html::inlineStyle( $previewedCSS );
} else {
// Load the user styles normally
- $moduleStyles[] = 'user';
+ $moduleStyles[] = 'user.styles';
}
// Per-user preference styles