Mac reftest failure looks like a gradient rasterization issue. This patch has reduced the bounds of some display items and maybe some temporary surfaces causing the gradient to get rendered slightly differently after invalidation. I'll fuzz it.

Landing bug 828146 on the b2g18 branch causes some new test failures. So I think the best solution is to just disable the failing tests on the b2g18 branch:
gfx/tests/reftest/709477-1.html
layout/reftests/scrolling/opacity-mixed-scrolling-2.html
(Note that bug 828146 only affects elements using -moz-appearance which we don't actually use on B2G.)