layout/reftests/font-face/dynamic-duplicate-rule-1a.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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

mercurial