*/
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[] =
continue;
}
+ if ( $only === ResourceLoaderModule::TYPE_STYLES ) {
+ if ( $module->getType() !== ResourceLoaderModule::LOAD_STYLES ) {
+ $logger = $resourceLoader->getLogger();
+ $logger->debug( 'Unexpected general module "{module}" in styles queue.', [
+ 'module' => $name,
+ ] );
+ } else {
+ $links['states'][$name] = 'ready';
+ }
+ }
+
$sortedModules[$module->getSource()][$module->getGroup()][$name] = $module;
}
* @return string
*/
function getBottomScripts() {
- return $this->getScriptsForBottomQueue();
+ return $this->getScriptsForBottomQueue() .
+ Skin::makeVariablesScript( [ 'wgPageParseReport' => $this->limitReportData ] );
}
/**