mw.loader: Fix regression that caused CSS load after scripts.
authorTimo Tijhof <ttijhof@wikimedia.org>
Fri, 29 Mar 2013 20:09:06 +0000 (21:09 +0100)
committerTimo Tijhof <ttijhof@wikimedia.org>
Fri, 29 Mar 2013 20:09:06 +0000 (21:09 +0100)
commitbe5f73b595b8fef0697bf83e9ebd13e85756c099
treeb54aaad5c92793f75f5331d11112322cccc1c2ce
parenta161e5f76843b5a17efbbf032492bfb7c8a03cc6
mw.loader: Fix regression that caused CSS load after scripts.

Follows-up 705d50c which introduced cssText buffer (yielding
one tick of the event queue to reduce the number of forced
repaints).

However since that made CSS loading asynchronoous (be it only for
a split second) it caused some nasty side-effects.

This was also reflected in the unit tests that had to resort
to doing setTimeout from within the mw.loader implemented script
to assert the styles. This is now sane again: Scripts execute
after styles are inserted.

Bug: 46401
Change-Id: I7b1562b12c8ed1a0286c19ef9db8f76870d4f69e
resources/mediawiki/mediawiki.js
tests/qunit/suites/resources/mediawiki/mediawiki.test.js