aboutsummaryrefslogtreecommitdiffstats
path: root/includes/specials/forms
diff options
context:
space:
mode:
authorTimo Tijhof <krinklemail@gmail.com>2018-05-11 15:33:41 +0100
committerKrinkle <krinklemail@gmail.com>2018-05-16 22:47:15 +0000
commit15eac4c27939c2558615844ce2dbb86f5bbc9647 (patch)
treea7ec655c3528a20133068fe7878deee73476c212 /includes/specials/forms
parent4195c0c0cf6b2cb4eec32cfec9124f42315f30b1 (diff)
downloadmediawikicore-15eac4c27939c2558615844ce2dbb86f5bbc9647.tar.gz
mediawikicore-15eac4c27939c2558615844ce2dbb86f5bbc9647.zip
mediawiki.special: Combine various tiny specialpage style modules
These stylesheets are sufficiently tiny that it doesn't make sense to offer them the ability to be loaded separately from each other (saving bytes in double-digits) at the cost of 1) exporting a dedicated registry item with meta data shipped on every page view, 2) reduced cache re-use from increased fragmentation. Instead, move these to the 'mediawiki.special' style module. The entries retain their own files to keep them as easy to find and edit as before. Where not already, ensure addModuleStyles() is always placed above any addModules() call in the same method. The load order isn't affected by the call order, but given blocking style-modules load before async JS, it helps to order them in a way that visually matches the effective load order (from top to bottom). The following 7 modules were remove without deprecation: 1. "mediawiki.special.apisandbox.styles" (1 rule) 2. "mediawiki.special.edittags.styles" (3 rules) 3. "mediawiki.special.movePage.styles" (1 rule) 4. "mediawiki.special.pagesWithProp" (1 rule) 5. "mediawiki.special.upload.styles" (2 rules) 6. "mediawiki.special.watchlist.styles" (3 rules) 7. "mediawiki.special.comparepages.styles" (4 rules) These module names were only used on the core classes loading them, and aren't depended on outside core by module name, rather, extensions and gadgets depend on the styles styles being loaded in a blocking manner on these pages, which remains unaffected. Bug: T192623 Change-Id: I6e663dc3c80c7104c9b9abdde44c654543185373
Diffstat (limited to 'includes/specials/forms')
-rw-r--r--includes/specials/forms/UploadForm.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/specials/forms/UploadForm.php b/includes/specials/forms/UploadForm.php
index e561fe588298..8ab6f29f09e8 100644
--- a/includes/specials/forms/UploadForm.php
+++ b/includes/specials/forms/UploadForm.php
@@ -79,7 +79,7 @@ class UploadForm extends HTMLForm {
# Add a link to edit MediaWiki:Licenses
if ( $this->getUser()->isAllowed( 'editinterface' ) ) {
- $this->getOutput()->addModuleStyles( 'mediawiki.special.upload.styles' );
+ $this->getOutput()->addModuleStyles( 'mediawiki.special' );
$licensesLink = $linkRenderer->makeKnownLink(
$this->msg( 'licenses' )->inContentLanguage()->getTitle(),
$this->msg( 'licenses-edit' )->text(),