Merge upstream.

This commit is contained in:
Rob Sayre 2011-07-05 23:23:12 -07:00
commit ebeff10a9a
7 changed files with 176 additions and 13 deletions

View file

@ -287,7 +287,7 @@ function WorkerPDFDoc(canvas) {
var rule = ("@font-face { font-family:'" + data.fontName +
"';src:" + url + '}');
var styleSheet = document.styleSheets[0];
styleSheet.insertRule(rule, styleSheet.length);
styleSheet.insertRule(rule, styleSheet.cssRules.length);
// Just adding the font-face to the DOM doesn't make it load. It
// seems it's loaded once Gecko notices it's used. Therefore,