Make "/*@noflip*/ /*@embed*/" annotation work without CSSJanus hacks
authorBartosz Dziewoński <matma.rex@gmail.com>
Sat, 20 Sep 2014 21:26:13 +0000 (23:26 +0200)
committerKrinkle <krinklemail@gmail.com>
Tue, 23 Sep 2014 22:47:54 +0000 (22:47 +0000)
commit4c01f8b2bc45da2fa4df29b8dfb14202bb2b4713
tree56c84e4ddf3b54b7f519c2b3107c750fc1c97f0f
parent6f14c88a0b42396a091560c65f4c9bb9ef47fe9e
Make "/*@noflip*/ /*@embed*/" annotation work without CSSJanus hacks

This reverts most of commit 2d842f14250646475b5c2ffa2fe4f5a131f94236,
leaving only the test added in it, and reimplements the same
functionality better.

Instead of stripping /*@noflip*/ annotations in CSSJanus, which is
incompatible with other implementations that preserve it, extend
CSSMin to allow other CSS comments to be present before the
rule-global @embed annotation. (This required making the regex logic
in it even worse than it was, but it's actually slightly less terrible
than I expected it would be. Good thing we have tests!)

Bug: 69698
Change-Id: I58603ef64f7d7cdc6461b34721a4d6b15f15ad79
includes/OutputPage.php
includes/libs/CSSJanus.php
includes/libs/CSSMin.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderUserCSSPrefsModule.php
includes/resourceloader/ResourceLoaderWikiModule.php
tests/phpunit/data/less/module/styles.css
tests/phpunit/includes/libs/CSSJanusTest.php
tests/phpunit/includes/libs/CSSMinTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderTest.php