OutputPage: Load html5shiv without indirection of load.php
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 4 Jul 2019 15:54:24 +0000 (16:54 +0100)
committerAaron Schulz <aschulz@wikimedia.org>
Sat, 6 Jul 2019 00:35:25 +0000 (00:35 +0000)
commit66a011797d8e2fdead7265b9403b1827d36bd59a
tree594ab25bc9db49e04c2ec1e226822c321bc6a57a
parente2e2eb49d6581e2eab58ba843ef2db84ce06b256
OutputPage: Load html5shiv without indirection of load.php

This library was introduced in 3a30e03645f, to make sure Grade C
stylesheets that apply to HTML5 elements that older browsers might
not know yet, work as expected in old IE.

It originally committed a minified version and loaded it directly
as an HTML script tag in a conditional comment. This had minimal
impact on anything else, and was easy to maintain.

In 68237fb1a74, this was changed to commit the unminified version
instead because Debian maintainers don't like packaging software
that contain minified files, despite being a simple file,
unmodified from the original (upstream publishes it in minified
form, with license header), published under a compatible free
license, and embedded in a license-compliant manner. We then
registered it as an unused ResourceLoader module, to be minified
on-the-fly at run-time.

Support for "server-registered client-unregistered" modules was
removed last week in c554ee8e64e because nothing needed it
anymore (except html5shiv apparently), which resulted in this
module being registered client-side on all page views for all
users (in latest master). This doesn't break anything, but it
is a regression performance-wise.

Restore this by (mostly) going to how it was before: A simple static
file, committed to Git, served as-is. Not related to, served by,
pulled through, nor registered with, ResourceLoader in any way.

Only difference with the original approach is that it is no longer
minified, which means a few more bytes transferred on old IE page
views, which is considered an acceptable compromise.

Bug: T201483
Change-Id: Ib0020b6bd015679b61f63eaa8109ed9b83d8ad15
includes/OutputPage.php
resources/Resources.php