resourceloader: Implement support for 'site' into mw.loader
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 24 Jul 2015 04:00:39 +0000 (21:00 -0700)
committerOri.livneh <ori@wikimedia.org>
Wed, 29 Jul 2015 20:12:01 +0000 (20:12 +0000)
commit19a40cd3ad589369a4f4a5faf1af4530d7c9c906
treeda8cf45063d0d2b67cd94c6851f37625a7428611
parent3b81eb7d0b7db27bb2101572284c2eb985b0108b
resourceloader: Implement support for 'site' into mw.loader

* No longer a dedicated <script> with only=scripts.
  This means it creates no extra script request and becomes a versioned
  request using data from the startup module.

* No longer in group=site.
  This means it collapses into the existing bottom queue.
  Not even one dedicated script request, but zero.

* No longer exclude from module storage. This can be cached like any other module.
  It was previously excluded because it was already loaded separately.

* Change mw.loader#execute to special-case the 'site' module with $.globalEval.

* Add hack to ensure the styles of the 'site' module still load without
  JavaScript, in the top, and after the ResourceLoaderDynamicStyles marker.
  This unfortunately stays its own request. Not sure how to avoid that.

Bug: T32358
Bug: T106736
Bug: T102077
Change-Id: I291a8c3aae1a71760bec58161891c1bd77c9b724
includes/OutputPage.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderSiteModule.php
resources/src/mediawiki/mediawiki.js