layout/reftests/bugs/355548-4.xml

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

     1 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
     2 <head>
     3 <style>
     4 /* test the situation where an nsStyleFont is cached in the rule tree but we have to blow it
     5    away because MathML is suddenly introduced */
     6 .v { font: 48px "Verdana"; }
     7 </style>
     8 <script>
     9 function addMathML() {
    10   function createMathMLElement(tag) {
    11     return document.createElementNS("http://www.w3.org/1998/Math/MathML", tag);
    12   }
    14   var body = document.getElementById("body");
    15   body.offsetTop;
    17   // if we don't blow away the rule tree correctly, then we will cache an nsStyleFont with
    18   // a scriptsizemultiplier of 0.71 (the default) and use it to style mstyle2, so the
    19   // scriptlevel change will not scale the text by 0.5
    20   var math = createMathMLElement("math");
    21   var mstyle = createMathMLElement("mstyle");
    22   mstyle.setAttribute("scriptsizemultiplier", "0.5");
    23   var mstyle2 = createMathMLElement("mstyle");
    24   mstyle2.setAttribute("class", "v");
    25   var mstyle3 = createMathMLElement("mstyle");
    26   mstyle3.setAttribute("scriptlevel", "+1");
    27   var mi = createMathMLElement("mi");
    28   mi.textContent = "Id";
    29   mstyle3.appendChild(mi);
    30   mstyle2.appendChild(mstyle3);
    31   mstyle.appendChild(mstyle2);
    32   math.appendChild(mstyle);
    33   body.appendChild(math);
    34   document.documentElement.className = '';
    35 }
    36 </script>
    37 </head>
    38 <body id="body" onload="addMathML()">
    39 <p><span class="v">Hello</span></p>
    40 </body>
    41 </html>

mercurial