resourceloader: Ensure user.styles and site.styles having their own request
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 12 May 2017 22:26:36 +0000 (23:26 +0100)
committerKrinkle <krinklemail@gmail.com>
Fri, 26 May 2017 14:15:47 +0000 (14:15 +0000)
commit15ca48adf291e1d0ab7d4c6d5c28fd54c4c994dd
treee70dabfc1a2f783a7ea97ee930488db407728d0a
parentf0e12ae951ef9f6cb359c5ecfcd3739e38f4d29a
resourceloader: Ensure user.styles and site.styles having their own request

Regardless of whether other modules exist with group=user or group=site,
these two modules in particular must always be in their own request for
legacy reasons.

This has already always been the case because even in the few cases where
an extension uses this group (eg. MobileFrontend's custom site module) it
would load it instead of another module in that group, never at the same
time. There is one notable exception, which is GlobalCssJs. However the
ext.globalCssJs.user.styles module is usually served from another wiki
which is why that went unnoticed as well. This commit fixes that so that
even if you're viewing a page on the central wiki, the modules are still
in separate requests.

Aside from this one existing edge case, there is also need to add
group=site to gadgets by default so that they load after the DynamicStyles
marker instead of before, which is currently causing problems with the
cascading order (gadget apply before core and skin styles due to being
in the same request group and alphabetically sorting before them).

Semantically, the appropiate solution is group=site, but this wasn't
possible due to core putting "all" group=site modules in the same request
(under the assumption there is only one such module). This commit removes
that fragile assumption.

Bug: T147667
Change-Id: I9eb725c083124d22a9af3bf3d075ade6f3b970a3
includes/OutputPage.php
tests/phpunit/includes/OutputPageTest.php