OutputPage: Make ResourceLoader position exemption more generic
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 19 Aug 2016 02:04:21 +0000 (19:04 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 19 Aug 2016 02:18:29 +0000 (19:18 -0700)
commit3e7a50d5fdb921a362a8f26deb8ced61898173d9
tree6f11a8eb04a89aa8141082454555f647ad4ae18e
parent453ada4be7b70332e2e0d296302ec8afa3230c86
OutputPage: Make ResourceLoader position exemption more generic

Follows-up 80e5b160e which moved queue formatting out of OutputPage into a
a separate ResourceLoaderClientHtml class.

The special handling for 'user' and 'user.styles' modules, and the exempt
module groups was kept in OutputPage. However the handling for it was
hardcoded for the modules in that group by default. It did not account for
modules with a group of 'user' loaded by an extension (e.g. GlobalCssJs).
GlobalCssJs modules were wrongly loaded in the regular style queue
(still in a separate request group, but not in the right cascading order
below the DynamicSyles marker).

This commit generalises the handling previously put in buildExemptModules
and moves it to getRlClient() so that it may apply to all style modules.

This commit should be a no-op besides the moving of any <link rel=stylesheet>
for non-core modules in group 'site' or 'user' now being one line lower
in the <head> HTML (after the DynamicStyles marker).

Bug: T143357
Change-Id: I1d6ea10b42293acfc535578172ad7ab2369f6299
includes/OutputPage.php