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.)

     1 <!DOCTYPE HTML>
     2 <html class="reftest-wait">
     3 <head>
     4 <meta charset="utf-8">
     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. -->
    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>
    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>
    41 <style type="text/css">
    42 body {
    43   font-family: serif;
    44 }
    45 .test {
    46   font-family: foo;
    47 }
    48 </style>
    50 <script type="application/javascript">
    51 function run() {
    52   document.getElementById("style1").disabled = true;
    53   document.documentElement.removeAttribute("class");
    54 }
    55 </script>
    57 </head>
    59 <body onload="run()">
    60 <div>
    61 foo <span class="test">bar</span> baz
    62 </div>
    63 </body>
    65 </html>

mercurial