mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1069929 - Tests for dtls font feature setting. r=fredw
This commit is contained in:
parent
dfcfbaf57a
commit
d2f86e55b5
BIN
layout/reftests/fonts/math/dtls-1.otf
Normal file
BIN
layout/reftests/fonts/math/dtls-1.otf
Normal file
Binary file not shown.
@ -65,6 +65,31 @@ def createSquareGlyph(aFont, aCodePoint):
|
||||
p.lineTo(0, em)
|
||||
p.closePath();
|
||||
|
||||
def createLLTriangleGlyph(aFont, aCodePoint):
|
||||
g = aFont.createChar(aCodePoint)
|
||||
p = g.glyphPen()
|
||||
p.moveTo(0, 0)
|
||||
p.lineTo(em, 0)
|
||||
p.lineTo(0, em)
|
||||
p.closePath();
|
||||
|
||||
def createURTriangleGlyph(aFont, aCodePoint):
|
||||
g = aFont.createChar(aCodePoint)
|
||||
p = g.glyphPen()
|
||||
p.moveTo(em, 0)
|
||||
p.lineTo(em, em)
|
||||
p.lineTo(0, em)
|
||||
p.closePath();
|
||||
|
||||
def createDiamondGlyph(aFont, aCodePoint):
|
||||
g = aFont.createChar(aCodePoint)
|
||||
p = g.glyphPen()
|
||||
p.moveTo(0, em/2)
|
||||
p.lineTo(em/2, 0)
|
||||
p.lineTo(em, em/2)
|
||||
p.lineTo(em/2, em)
|
||||
p.closePath();
|
||||
|
||||
################################################################################
|
||||
# Glyph variants and constructions
|
||||
f = newMathFont("stretchy")
|
||||
@ -497,3 +522,20 @@ f.math.AccentBaseHeight = 6 * em
|
||||
f.math.FlattenedAccentBaseHeight = 3 * em
|
||||
createSquareGlyph(f, ord("~"))
|
||||
saveMathFont(f)
|
||||
|
||||
f = newMathFont("dtls-1")
|
||||
createSquareGlyph(f, ord("a"))
|
||||
createLLTriangleGlyph(f, ord("b"))
|
||||
createSquareGlyph(f, ord("c"))
|
||||
createDiamondGlyph(f, 0x1D51E) #mathvariant=fraktur a
|
||||
createURTriangleGlyph(f, 0x1D51F) #mathvariant=fraktur b
|
||||
createDiamondGlyph(f, 0x1D520) #mathvariant=fraktur c
|
||||
f.addLookup("gsub", "gsub_single", (), (("dtls", (("latn", ("dflt")),)),))
|
||||
f.addLookupSubtable("gsub", "gsub_n")
|
||||
glyph = f["a"]
|
||||
glyph.addPosSub("gsub_n", "b")
|
||||
glyph2 = f[0x1D51F]
|
||||
glyph2.glyphname="urtriangle"
|
||||
glyph3 = f[0x1D51E]
|
||||
glyph3.addPosSub("gsub_n", "urtriangle")
|
||||
saveMathFont(f)
|
||||
|
132
layout/reftests/mathml/dtls-1-ref.html
Normal file
132
layout/reftests/mathml/dtls-1-ref.html
Normal file
@ -0,0 +1,132 @@
|
||||
<!doctype html>
|
||||
<head>
|
||||
<style type="text/css" media="screen, print">
|
||||
@font-face {
|
||||
font-family: "dtls-1";
|
||||
src: url(../fonts/math/dtls-1.otf);
|
||||
}
|
||||
math {
|
||||
font-family: dtls-1;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<math>
|
||||
<mover accent="true">
|
||||
<mn>b</mn>
|
||||
<mn>c</mn>
|
||||
</mover>
|
||||
<munder accentunder="true">
|
||||
<mn>c</mn>
|
||||
<mn>c</mn>
|
||||
</munder>
|
||||
<munderover accent="true" accentunder="true">
|
||||
<mn>b</mn>
|
||||
<mn>c</mn>
|
||||
<mn>c</mn>
|
||||
</munderover>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mn>b</mn>
|
||||
<mn>b</mn>
|
||||
</mover>
|
||||
<mn>c</mn>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mn>b</mn>
|
||||
<mn>b</mn>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mn>b</mn>
|
||||
<mn>c</mn>
|
||||
</mover>
|
||||
</mover>
|
||||
<munderover accent="true" accentunder="true">
|
||||
<munderover accent="true" accentunder="true">
|
||||
<mn>b</mn>
|
||||
<mn>b</mn>
|
||||
<mn>b</mn>
|
||||
</munderover>
|
||||
<mn>c</mn>
|
||||
<mn>c</mn>
|
||||
</munderover>
|
||||
<munderover accent="true" accentunder="true">
|
||||
<munderover accent="true" accentunder="true">
|
||||
<mn>b</mn>
|
||||
<mn>b</mn>
|
||||
<mn>b</mn>
|
||||
</munderover>
|
||||
<munderover accent="true" accentunder="true">
|
||||
<mn>b</mn>
|
||||
<mn>c</mn>
|
||||
<mn>c</mn>
|
||||
</munderover>
|
||||
<munderover accent="true" accentunder="true">
|
||||
<mn>b</mn>
|
||||
<mn>c</mn>
|
||||
<mn>c</mn>
|
||||
</munderover>
|
||||
</munderover>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mover accent="true">
|
||||
<mn>c</mn>
|
||||
<mn>c</mn>
|
||||
</mover>
|
||||
<munder accentunder="true">
|
||||
<mn>c</mn>
|
||||
<mn>c</mn>
|
||||
</munder>
|
||||
<munderover accent="true" accentunder="true">
|
||||
<mn>c</mn>
|
||||
<mn>c</mn>
|
||||
<mn>c</mn>
|
||||
</munderover>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mover accent="false">
|
||||
<mn>c</mn>
|
||||
<mn>c</mn>
|
||||
</mover>
|
||||
<munderover accent="false" accentunder="false">
|
||||
<mn>c</mn>
|
||||
<mn>c</mn>
|
||||
<mn>c</mn>
|
||||
</munderover>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mover>
|
||||
<mo movablelimits="true">c</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
<munderover>
|
||||
<mo movablelimits="true">c</mo>
|
||||
<mo>c</mo>
|
||||
<mo>c</mo>
|
||||
</munderover>
|
||||
<mover accent="true">
|
||||
<mo movablelimits="true">c</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
<munderover accent="true">
|
||||
<mo movablelimits="true">c</mo>
|
||||
<mo>c</mo>
|
||||
<mo>c</mo>
|
||||
</munderover>
|
||||
</math>
|
||||
</body>
|
134
layout/reftests/mathml/dtls-1.html
Normal file
134
layout/reftests/mathml/dtls-1.html
Normal file
@ -0,0 +1,134 @@
|
||||
<!doctype html>
|
||||
<head>
|
||||
<style type="text/css" media="screen, print">
|
||||
@font-face {
|
||||
font-family: "dtls-1";
|
||||
src: url(../fonts/math/dtls-1.otf);
|
||||
}
|
||||
math {
|
||||
font-family: dtls-1;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<math>
|
||||
<mover accent="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</mover>
|
||||
<munder accentunder="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</munder>
|
||||
<munderover accent="true" accentunder="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</munderover>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</mover>
|
||||
<mn>a</mn>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</mover>
|
||||
</mover>
|
||||
<munderover accent="true" accentunder="true">
|
||||
<munderover accent="true" accentunder="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</munderover>
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</munderover>
|
||||
<munderover accent="true" accentunder="true">
|
||||
<munderover accent="true" accentunder="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</munderover>
|
||||
<munderover accent="true" accentunder="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</munderover>
|
||||
<munderover accent="true" accentunder="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</munderover>
|
||||
</munderover>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-feature-settings: 'dtls' 0">
|
||||
<mover accent="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</mover>
|
||||
<munder accentunder="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</munder>
|
||||
<munderover accent="true" accentunder="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</munderover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mover accent="false">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</mover>
|
||||
<munderover accent="false" accentunder="false">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</munderover>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mover>
|
||||
<mo movablelimits="true">a</mo>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
<munderover>
|
||||
<mo movablelimits="true">a</mo>
|
||||
<mo>a</mo>
|
||||
<mo>a</mo>
|
||||
</munderover>
|
||||
<mover accent="true">
|
||||
<mo movablelimits="true">a</mo>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
<munderover accent="true">
|
||||
<mo movablelimits="true">a</mo>
|
||||
<mo>a</mo>
|
||||
<mo>a</mo>
|
||||
</munderover>
|
||||
</math>
|
||||
</body>
|
175
layout/reftests/mathml/dtls-2-ref.html
Normal file
175
layout/reftests/mathml/dtls-2-ref.html
Normal file
@ -0,0 +1,175 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css" media="screen, print">
|
||||
@font-face {
|
||||
font-family: "dtls-1";
|
||||
src: url(../fonts/math/dtls-1.otf);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo>b</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo>b</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo>b</mo>
|
||||
<!-- deliberately invalid -->
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mo>c</mo>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</mover>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mrow>
|
||||
<mrow>
|
||||
<mrow>
|
||||
<mo>b</mo>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</mrow>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style ="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mo>b</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mo>b</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle id="mstyle5" style ="font-family: 'dtls-1'; font-feature-settings: 'dtls' 0">
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mo>c</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mo>c</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover id="mover1" accent="true">
|
||||
<mo>b</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="false" id="mover2">
|
||||
<mo>c</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover id="mover3">
|
||||
<mo>c</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo movablelimits="true">c</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo>b</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
</body>
|
||||
</html>
|
213
layout/reftests/mathml/dtls-2.html
Normal file
213
layout/reftests/mathml/dtls-2.html
Normal file
@ -0,0 +1,213 @@
|
||||
<!doctype html>
|
||||
<html class="reftest-wait">
|
||||
<style type="text/css" media="screen, print">
|
||||
@font-face {
|
||||
font-family: "dtls-1";
|
||||
src: url(../fonts/math/dtls-1.otf);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true" id="mover0">
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo>a</mo>
|
||||
<mo id="mo0"></mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo>a</mo>
|
||||
<mo id="mo1">a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';" id="mstyle0">
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle id="mstyle1">
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mn>a</mn>
|
||||
<mn>a</mn>
|
||||
</mover>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mrow>
|
||||
<mrow>
|
||||
<mrow id="mrow0">
|
||||
</mrow>
|
||||
</mrow>
|
||||
</mrow>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle id="mstyle4" style ="font-family: 'dtls-1'; font-feature-settings: 'dtls' 0">
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mo>a</mo>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mo>a</mo>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle id="mstyle5" style ="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mo>a</mo>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mo>a</mo>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover id="mover1">
|
||||
<mo>a</mo>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true" id="mover2">
|
||||
<mo>a</mo>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true" id="mover3">
|
||||
<mo>a</mo>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo id="mo2">a</mo>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo id="mo3" movablelimits="true">a</mo>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<script>
|
||||
function doTest()
|
||||
{
|
||||
var mo = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mo");
|
||||
mo.innerHTML = "a";
|
||||
// An added child gets dtls font feature
|
||||
document.getElementById("mover0").appendChild(mo);
|
||||
// A child with changed text gets dtls font feature
|
||||
document.getElementById("mo0").innerHTML = "a";
|
||||
// A relocated child loses dtls font feature setting
|
||||
document.getElementById("mstyle0").appendChild(document.getElementById("mo1"));
|
||||
// A change in style
|
||||
document.getElementById("mstyle1").setAttribute("style", "font-family: 'dtls-1';");
|
||||
|
||||
// dtls gets added to descendants as well
|
||||
var mo1 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mo");
|
||||
mo1.innerHTML = "a";
|
||||
document.getElementById("mrow0").appendChild(mo1);
|
||||
// removing explicit dtls setting works
|
||||
document.getElementById("mstyle4").setAttribute(
|
||||
"style", "font-family: 'dtls-1';")
|
||||
// setting an explicit dtls font feature
|
||||
document.getElementById("mstyle5").setAttribute(
|
||||
"style" , "font-family: 'dtls-1'; font-feature-settings: 'dtls' 0");
|
||||
|
||||
// Adding accent="true" applies dtls font feature
|
||||
document.getElementById("mover1").setAttribute("accent", "true");
|
||||
// Changing accent="true" to false removes dtls font feature
|
||||
document.getElementById("mover2").setAttribute("accent", "false");
|
||||
// Removing accent="true" removes dtls font feature
|
||||
document.getElementById("mover3").removeAttribute("accent");
|
||||
|
||||
// Movablelimits disables dtls font feature
|
||||
document.getElementById("mo2").setAttribute("movablelimits", "true");
|
||||
// Removing movablelimits restores dtls font feature
|
||||
document.getElementById("mo3").removeAttribute("movablelimits");
|
||||
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
window.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
175
layout/reftests/mathml/dtls-3-ref.html
Normal file
175
layout/reftests/mathml/dtls-3-ref.html
Normal file
@ -0,0 +1,175 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css" media="screen, print">
|
||||
@font-face {
|
||||
font-family: "dtls-1";
|
||||
src: url(../fonts/math/dtls-1.otf);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo>𝔟</mo>
|
||||
<mo>𝔠</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo>𝔟</mo>
|
||||
<mo>𝔠</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo>𝔟</mo>
|
||||
<!-- deliberately invalid -->
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mo>𝔠</mo>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mo>𝔟</mo>
|
||||
<mo>𝔟</mo>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mo>𝔟</mo>
|
||||
<mo>𝔠</mo>
|
||||
</mover>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mrow>
|
||||
<mrow>
|
||||
<mrow>
|
||||
<mo>𝔟</mo>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</mrow>
|
||||
<mo>𝔠</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style ="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mo>𝔟</mo>
|
||||
<mo>𝔠</mo>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mo>𝔟</mo>
|
||||
<mo>𝔠</mo>
|
||||
</mover>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle id="mstyle5" style ="font-family: 'dtls-1'; font-feature-settings: 'dtls' 0">
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mo>𝔠</mo>
|
||||
<mo>𝔠</mo>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mo>𝔠</mo>
|
||||
<mo>𝔠</mo>
|
||||
</mover>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover id="mover1" accent="true">
|
||||
<mo>𝔟</mo>
|
||||
<mo>𝔠</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="false" id="mover2">
|
||||
<mo>𝔠</mo>
|
||||
<mo>𝔠</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover id="mover3">
|
||||
<mo>𝔠</mo>
|
||||
<mo>𝔠</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo>𝔞</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo>b</mo>
|
||||
<mo>c</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
</body>
|
||||
</html>
|
216
layout/reftests/mathml/dtls-3.html
Normal file
216
layout/reftests/mathml/dtls-3.html
Normal file
@ -0,0 +1,216 @@
|
||||
<!doctype html>
|
||||
<html class="reftest-wait">
|
||||
<style type="text/css" media="screen, print">
|
||||
@font-face {
|
||||
font-family: "dtls-1";
|
||||
src: url(../fonts/math/dtls-1.otf);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true" id="mover0">
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
<mo mathvariant="fraktur" id="mo0"></mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
<mo mathvariant="fraktur" id="mo1">a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';" id="mstyle0">
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle id="mstyle1">
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mn mathvariant="fraktur">a</mn>
|
||||
<mn mathvariant="fraktur">a</mn>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mn mathvariant="fraktur">a</mn>
|
||||
<mn mathvariant="fraktur">a</mn>
|
||||
</mover>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mrow>
|
||||
<mrow>
|
||||
<mrow id="mrow0">
|
||||
</mrow>
|
||||
</mrow>
|
||||
</mrow>
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle id="mstyle4" style ="font-family: 'dtls-1'; font-feature-settings: 'dtls' 0">
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
</mover>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle id="mstyle5" style ="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mover accent="true">
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
</mover>
|
||||
<mover accent="true">
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
</mover>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover id="mover1">
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true" id="mover2">
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true" id="mover3">
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
<mo mathvariant="fraktur">a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo id="mo2">a</mo>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<p>
|
||||
|
||||
<math>
|
||||
<mstyle style="font-family: 'dtls-1';">
|
||||
<mover accent="true">
|
||||
<mo mathvariant="fraktur" id="mo3">a</mo>
|
||||
<mo>a</mo>
|
||||
</mover>
|
||||
</mstyle>
|
||||
</math>
|
||||
|
||||
<script>
|
||||
function doTest()
|
||||
{
|
||||
var mo = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mo");
|
||||
mo.innerHTML = "a";
|
||||
mo.setAttribute("mathvariant", "fraktur");
|
||||
// An added child gets dtls font feature
|
||||
document.getElementById("mover0").appendChild(mo);
|
||||
// A child with changed text gets dtls font feature
|
||||
document.getElementById("mo0").innerHTML = "a";
|
||||
// A relocated child loses dtls font feature setting
|
||||
document.getElementById("mstyle0").appendChild(document.getElementById("mo1"));
|
||||
// A change in style
|
||||
document.getElementById("mstyle1").setAttribute("style", "font-family: 'dtls-1';");
|
||||
|
||||
// dtls gets added to descendants as well
|
||||
var mo1 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mo");
|
||||
mo1.innerHTML = "a";
|
||||
mo1.setAttribute("mathvariant", "fraktur");
|
||||
document.getElementById("mrow0").appendChild(mo1);
|
||||
// removing explicit dtls setting works
|
||||
document.getElementById("mstyle4").setAttribute(
|
||||
"style", "font-family: 'dtls-1';")
|
||||
// setting an explicit dtls font feature
|
||||
document.getElementById("mstyle5").setAttribute(
|
||||
"style" , "font-family: 'dtls-1'; font-feature-settings: 'dtls' 0");
|
||||
|
||||
// Adding accent="true" applies dtls font feature
|
||||
document.getElementById("mover1").setAttribute("accent", "true");
|
||||
// Changing accent="true" to false removes dtls font feature
|
||||
document.getElementById("mover2").setAttribute("accent", "false");
|
||||
// Removing accent="true" removes dtls font feature
|
||||
document.getElementById("mover3").removeAttribute("accent");
|
||||
|
||||
// dtls applies when mathvariant is set
|
||||
document.getElementById("mo2").setAttribute("mathvariant", "fraktur");
|
||||
|
||||
// dtls still applies when mathvariant is removed
|
||||
document.getElementById("mo3").removeAttribute("mathvariant");
|
||||
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
window.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -280,6 +280,9 @@ fails-if(B2G||Android||/^Windows\x20NT\x205\.1/.test(http.oscpu)||OSX) == mathva
|
||||
== mathvariant-3.html mathvariant-3-ref.html
|
||||
== mathvariant-4.html mathvariant-4-ref.html
|
||||
== mathvariant-5.html mathvariant-5-ref.html
|
||||
== dtls-1.html dtls-1-ref.html
|
||||
== dtls-2.html dtls-2-ref.html
|
||||
== dtls-3.html dtls-3-ref.html
|
||||
== ssty-1.html ssty-1-ref.html
|
||||
== ssty-2.html ssty-2-ref.html
|
||||
== ssty-3.html ssty-3-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user