dynamic-duplicate-rule-1a.html (1579B)
1 <!DOCTYPE HTML> 2 <html class="reftest-wait"> 3 <head> 4 <meta charset="utf-8"> 5 6 <!-- Testcase for bug 879963 regression. 7 We have two <style> elements with identical @font-face rules, which will 8 share a common proxy font entry. When the entry is loaded, the references 9 in both rules must be updated, otherwise text may disappear if the "wrong" 10 (non-updated) rule is subsequently used. 11 By disabling the first style element after the document has loaded (and the 12 user font has been resolved to a real font entry), we can check that the 13 second rule also works as expected. 14 Note that if a platform doesn't have any of the local() fonts listed, 15 the testcase will "pass" harmlessly as a no-op. --> 16 17 <style type="text/css" id="style1"> 18 @font-face { 19 font-family: foo; 20 src: local("Arial"), 21 local("DejaVu Sans"), 22 local("Free Sans"), 23 local("Open Sans"), 24 local("Droid Sans"), 25 local("Roboto"); 26 } 27 </style> 28 29 <style type="text/css" id="style2"> 30 @font-face { 31 font-family: foo; 32 src: local("Arial"), 33 local("DejaVu Sans"), 34 local("Free Sans"), 35 local("Open Sans"), 36 local("Droid Sans"), 37 local("Roboto"); 38 } 39 </style> 40 41 <style type="text/css"> 42 body { 43 font-family: serif; 44 } 45 .test { 46 font-family: foo; 47 } 48 </style> 49 50 <script type="application/javascript"> 51 function run() { 52 document.getElementById("style1").disabled = true; 53 document.documentElement.removeAttribute("class"); 54 } 55 </script> 56 57 </head> 58 59 <body onload="run()"> 60 <div> 61 foo <span class="test">bar</span> baz 62 </div> 63 </body> 64 65 </html>