]> git.parisson.com Git - pdf.js.git/commit
Fix same origin policy issue when adding @font-face rules
authorIonuț G. Stan <ionut.g.stan@gmail.com>
Wed, 2 Nov 2011 10:47:41 +0000 (12:47 +0200)
committerIonuț G. Stan <ionut.g.stan@gmail.com>
Wed, 2 Nov 2011 11:06:26 +0000 (13:06 +0200)
commit090b4d6647c08f9b2a962966c892b84ef05fdd41
tree8d3209d433985f4dfc15f7827cbb4450517799e6
parent112115c0132c369fb53528d98f5b600b88c555ef
Fix same origin policy issue when adding @font-face rules

If the first stylesheet in the document is located on an external domain, then
trying to access the `cssRules` property of that `CSSStyleSheet` object will
result in a Security error being thrown in Firefox. In Safari, `cssRules` will
be null, which causes a null pointer exception in the `styleSheet.cssRules.length`
expression.
src/fonts.js