TL;DR: I just landed bug 971096 on fx-team. On trees with this change, you can no longer "just" add code that causes CSS parsing errors in Gecko, because there is a browser mochitest that will scream at you if you do. [0]

Longer explanation: after several issues where broken CSS went unfixed for a long time, and an hours-before-rc-go-to-build backout for 29 that would have been caught if we'd had checks for this kind of stuff, I had enough and wrote a test that recursively finds all the CSS (also in jar files) that ends up in (a subdir of) the app directory, and checks if Gecko parses it.

The test will fail if it encounters CSS files that cause CSS parser errors/warnings reported to the error service.

The test incorporates a small whitelist for the current pre-existing issues in our CSS (amongst others, because we have some CSS for devtools and about:accounts which used to be used on the web and therefore has webkit-specific properties/selectors in it, or IE7 star hacks (yes, really), and isn't really worth changing).

If you're adding code that copies in external previously-web-and-other-browsers-facing CSS, and it is expected that bits of the CSS get ignored by Gecko and you genuinely don't think this is a problem, please feel free to use the whitelist (if not, you'll cause test failures and I wouldn't be surprised if you got backed out).

Likewise, if you're making a Gecko change (e.g. dropping prefixes) and don't want to have to fix every single consumer immediately, you may need to add whitelist entries - but in this case, because some of these errors show up in the browser console etc., I would imagine that we should ensure that we ship with the consumers fixed (and the whitelist entry removed again).

Please let me know if there are any questions.

~ Gijs

[0] https://hg.mozilla.org/integration/fx-team/file/a38146bf6d18/browser/base/content/test/general/browser_parsable_css.js
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to