Safari loads error pages as UTF-16, while the stylesheet is ASCII. Since the stylesheet encoding is now inherited, it is decoded incorrectly and gets ignored. This is already fixed in TOT Safari, but we need a workaround for nightlies.
Created attachment 10941 [details] proposed fix This takes a completely different approach than we discussed on IRC, as otherwise this same issue would probably bite other people using loadHTMLString and related APIs.
Comment on attachment 10941 [details] proposed fix Looks fine. r=me.
Committed revision 16853.