Currently CSSGroupingRule.insertRule only accepts a style rule.
Created attachment 686797 [details] [diff] [review] patch If you have any good ideas about how I might test for whether the @page and @font-face rules were applied when inserted into a passing conditional rule, I can update the test.
Attachment #686797 - Flags: review?(bzbarsky)
Comment on attachment 686797 [details] [diff] [review] patch > If you have any good ideas about how I might test for whether the @page and @font-face > rules were applied For @font-face you might be able to detect font metrics via getBoundingClientRect or something? No idea about @page. As for the patch itself, do we want a whitelist here, or a blacklist of @namespace and @import? r=me if you at least add an assert that the type is one of those two if it's not in your whitelist.
Attachment #686797 - Flags: review?(bzbarsky) → review+
I was going for a white list; I'll add an assertion.
I worked in the @font-face testing, too. https://hg.mozilla.org/integration/mozilla-inbound/rev/447dff867909
(Commit message should be s/CSSRule/CSSGroupingRule/ but oh well.)
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.