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