jenkins-bot has submitted this change and it was merged.

Change subject: resourceloader: Make 'site.styles' actually in group 'site'
......................................................................


resourceloader: Make 'site.styles' actually in group 'site'

Before 93ed259cf and 7bb7315d4, 'site' and 'site.styles' module were one module
loaded in two parts. One part via the general queue (not in a separate request),
and the other part in the stylesheet queue (in a separate request).

This was achieved by hacking the stylesheet queue handler to hardcode the group
to be 'site' for a module named 'site' (later 'site.styles' in c20a76ee)
eventhough the module as a whole was not actually in that group.

Now that these modules are separated, this hack is no longer needed
and the module can be registered as being in group 'site' properly.

Change-Id: If193f556be211749b115f3808ee46536b578fb22
---
M includes/OutputPage.php
M includes/resourceloader/ResourceLoaderSiteStylesModule.php
2 files changed, 7 insertions(+), 6 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index c7499b1..77dbde7 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -2688,12 +2688,6 @@
                                                        // Special case in 
buildExemptModules()
                                                        return false;
                                                }
-                                               if ( $name === 'site.styles' ) {
-                                                       // HACK: Technically, 
'site.styles' isn't in a separate request group.
-                                                       // But, in order to 
ensure its styles are in the right position,
-                                                       // pretend it's in a 
group called 'site'.
-                                                       $group = 'site';
-                                               }
                                                if ( isset( 
$exemptGroups[$group] ) ) {
                                                        $exemptStates[$name] = 
'ready';
                                                        if ( 
!$module->isKnownEmpty( $context ) ) {
diff --git a/includes/resourceloader/ResourceLoaderSiteStylesModule.php 
b/includes/resourceloader/ResourceLoaderSiteStylesModule.php
index 46808a1..79922bf 100644
--- a/includes/resourceloader/ResourceLoaderSiteStylesModule.php
+++ b/includes/resourceloader/ResourceLoaderSiteStylesModule.php
@@ -50,4 +50,11 @@
        public function getType() {
                return self::LOAD_STYLES;
        }
+
+       /**
+        * @return string
+        */
+       public function getGroup() {
+               return 'site';
+       }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/306791
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If193f556be211749b115f3808ee46536b578fb22
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to