Commit graph

3 commits

Author SHA1 Message Date
Coren 29bdd0c18e Add property filtering
Properties listed in $wgTemplateStylesPropertyBlacklist, or
those that contain function-like values not listed in
$wgTemplateStylesFunctionWhitelist cause the containing
declaration to be omitted from rendering entirely.

Additionally, rule selectors are unconditionally prepended
with '#mw-content-text' so that they cannot be applied to
UI elements outside the actual page content.

Change-Id: Id3d7dff465363d0163e4a5a1f31e770b4b0a67e2
2016-04-21 05:16:06 +00:00
Bryan Davis 1615767ae7 Pretty up the test suite
Add some comments and tweak the formatting of the test suite. Some
things that were hardcoded can now be tweaked by the
parse->render->verify tests if desired.

Change-Id: I36abc9fa2b9971d6b92d5714c4583dea6ad26b88
2016-04-20 14:15:13 -06:00
Coren 436370e59d Add unit tests for CSSParse and CSSRender
Test the roundtrip on a collection of correct and pathological
stylesheets to ascertain whether the parse is behaving as
expected.

Bug: T483
Change-Id: I484cc856b5696c1fa6265769320f79853365e1d6
2016-04-20 14:15:08 -06:00