Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
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 | |
michael@0 | 8 | This test is designed to hit the case where we were adding the same |
michael@0 | 9 | proxy font entry to a family multiple times during user font set updates. |
michael@0 | 10 | |
michael@0 | 11 | Note that if a platform doesn't have any of the local() fonts listed, |
michael@0 | 12 | the testcase will "pass" harmlessly as a no-op. --> |
michael@0 | 13 | |
michael@0 | 14 | <style type="text/css" id="style1"> |
michael@0 | 15 | @font-face { |
michael@0 | 16 | font-family: foo; |
michael@0 | 17 | src: local("Arial"), |
michael@0 | 18 | local("DejaVu Sans"), |
michael@0 | 19 | local("Free Sans"), |
michael@0 | 20 | local("Open Sans"), |
michael@0 | 21 | local("Droid Sans"), |
michael@0 | 22 | local("Roboto"); |
michael@0 | 23 | } |
michael@0 | 24 | </style> |
michael@0 | 25 | |
michael@0 | 26 | <style type="text/css" id="style2"> |
michael@0 | 27 | @font-face { |
michael@0 | 28 | font-family: foo; |
michael@0 | 29 | src: local("Arial"), |
michael@0 | 30 | local("DejaVu Sans"), |
michael@0 | 31 | local("Free Sans"), |
michael@0 | 32 | local("Open Sans"), |
michael@0 | 33 | local("Droid Sans"), |
michael@0 | 34 | local("Roboto"); |
michael@0 | 35 | } |
michael@0 | 36 | </style> |
michael@0 | 37 | |
michael@0 | 38 | <style type="text/css" id="style3"> |
michael@0 | 39 | @font-face { |
michael@0 | 40 | font-family: foo; |
michael@0 | 41 | src: local("Arial"), |
michael@0 | 42 | local("DejaVu Sans"), |
michael@0 | 43 | local("Free Sans"), |
michael@0 | 44 | local("Open Sans"), |
michael@0 | 45 | local("Droid Sans"), |
michael@0 | 46 | local("Roboto"); |
michael@0 | 47 | } |
michael@0 | 48 | </style> |
michael@0 | 49 | |
michael@0 | 50 | <style type="text/css"> |
michael@0 | 51 | body { |
michael@0 | 52 | font-family: serif; |
michael@0 | 53 | } |
michael@0 | 54 | .test { |
michael@0 | 55 | font-family: foo; |
michael@0 | 56 | } |
michael@0 | 57 | </style> |
michael@0 | 58 | |
michael@0 | 59 | <script type="application/javascript"> |
michael@0 | 60 | function run() { |
michael@0 | 61 | // Disable one of our three identical style elements. |
michael@0 | 62 | // This will trigger an update of the user font set, |
michael@0 | 63 | // and there will still be two identical rules present. |
michael@0 | 64 | document.getElementById("style3").disabled = true; |
michael@0 | 65 | |
michael@0 | 66 | // Now we trigger the use of the 'foo' font family, |
michael@0 | 67 | // so that font loading occurs. |
michael@0 | 68 | // If there are duplicate proxy entries in the family, |
michael@0 | 69 | // and only the first one gets replaced by the real face, |
michael@0 | 70 | // blank text will result. |
michael@0 | 71 | document.getElementById("test").className = "test"; |
michael@0 | 72 | |
michael@0 | 73 | document.documentElement.removeAttribute("class"); |
michael@0 | 74 | } |
michael@0 | 75 | </script> |
michael@0 | 76 | |
michael@0 | 77 | </head> |
michael@0 | 78 | |
michael@0 | 79 | <body onload="run()"> |
michael@0 | 80 | <div> |
michael@0 | 81 | foo <span id="test">bar</span> baz |
michael@0 | 82 | </div> |
michael@0 | 83 | </body> |
michael@0 | 84 | |
michael@0 | 85 | </html> |