Patch originally developed on bug 1458921 but needs to land with the WR update. MozReview-Commit-ID: 82BYyNWBAfn --HG-- extra : rebase_source : e6bca2f446c019fd41a37c2c28db73bbe1cfc216