Bug 114365 - Remove legacy mathml implementation details and some mathml css cleanup. r=fredw

This commit is contained in:
James Kitchener 2013-12-02 11:50:27 -05:00
parent 4766bdda84
commit 7e8fc770fe
5 changed files with 29 additions and 285 deletions

View File

@ -1473,10 +1473,9 @@ GK_ATOM(to, "to")
GK_ATOM(XML, "XML") GK_ATOM(XML, "XML")
// internal MathML attributes: different from columnalign_, columnlines_, // internal MathML attributes: different from columnalign_, columnlines_,
// fontstyle_, rowalign_ and rowlines_ // rowalign_ and rowlines_
GK_ATOM(_moz_math_columnalign_, "_moz-math-columnalign") GK_ATOM(_moz_math_columnalign_, "_moz-math-columnalign")
GK_ATOM(_moz_math_columnline_, "_moz-math-columnline") GK_ATOM(_moz_math_columnline_, "_moz-math-columnline")
GK_ATOM(_moz_math_fontstyle_, "_moz-math-font-style")
GK_ATOM(_moz_math_rowalign_, "_moz-math-rowalign") GK_ATOM(_moz_math_rowalign_, "_moz-math-rowalign")
GK_ATOM(_moz_math_rowline_, "_moz-math-rowline") GK_ATOM(_moz_math_rowline_, "_moz-math-rowline")

View File

@ -38,42 +38,6 @@ font.mathfont-glyph-tables = MathJax_Main, STIXNonUnicode, STIXSizeOneSym, STIXS
# for operators that are ultimately handled by nsMathMLChar. # for operators that are ultimately handled by nsMathMLChar.
# @see how |useMathMLChar| is set in nsMathMLmoFrame::Stretch() & Paint(). # @see how |useMathMLChar| is set in nsMathMLmoFrame::Stretch() & Paint().
# Mappings from Unicode BMP chars to style invariant chars (these chars have
# their own intrinsic predefined styles).
# http://www.w3.org/TR/2003/REC-MathML2-20031021/chapter6.html#chars.BMP-SMP
#
# The string consists of a list of UTF16 code triples. For each i,
# * the code at offset 3i is the BMP character
# * the following two codes at offset 3i+1 and 3i+2 are either
# * (usually) a surrogate pair representing the corresponding character
# in the Mathematical Alphanumeric Symbols block, or
# * when the corresponding styled mathematical character is in the BMP, that
# BMP character followed by padding in the form of a UNICODE REPLACEMENT
# CHARACTER U+fffd.
#
# Currently only some transformations are performed, and only through the
# style system. (Bug 114365: Support for the 'mathvariant' attribute.)
# there are no normal style-invariant mathematical alphanumeric symbols.
#mathvariant.normal =
mathvariant.bold = A\ud835\udc00B\ud835\udc01C\ud835\udc02D\ud835\udc03E\ud835\udc04F\ud835\udc05G\ud835\udc06H\ud835\udc07I\ud835\udc08J\ud835\udc09K\ud835\udc0aL\ud835\udc0bM\ud835\udc0cN\ud835\udc0dO\ud835\udc0eP\ud835\udc0fQ\ud835\udc10R\ud835\udc11S\ud835\udc12T\ud835\udc13U\ud835\udc14V\ud835\udc15W\ud835\udc16X\ud835\udc17Y\ud835\udc18Z\ud835\udc19a\ud835\udc1ab\ud835\udc1bc\ud835\udc1cd\ud835\udc1de\ud835\udc1ef\ud835\udc1fg\ud835\udc20h\ud835\udc21i\ud835\udc22j\ud835\udc23k\ud835\udc24l\ud835\udc25m\ud835\udc26n\ud835\udc27o\ud835\udc28p\ud835\udc29q\ud835\udc2ar\ud835\udc2bs\ud835\udc2ct\ud835\udc2du\ud835\udc2ev\ud835\udc2fw\ud835\udc30x\ud835\udc31y\ud835\udc32z\ud835\udc33\u0391\ud835\udea8\u0392\ud835\udea9\u0393\ud835\udeaa\u0394\ud835\udeab\u0395\ud835\udeac\u0396\ud835\udead\u0397\ud835\udeae\u0398\ud835\udeaf\u0399\ud835\udeb0\u039A\ud835\udeb1\u039B\ud835\udeb2\u039C\ud835\udeb3\u039D\ud835\udeb4\u039E\ud835\udeb5\u039F\ud835\udeb6\u03A0\ud835\udeb7\u03A1\ud835\udeb8\u03F4\ud835\udeb9\u03A3\ud835\udeba\u03A4\ud835\udebb\u03A5\ud835\udebc\u03A6\ud835\udebd\u03A7\ud835\udebe\u03A8\ud835\udebf\u03A9\ud835\udec0\u2207\ud835\udec1\u03B1\ud835\udec2\u03B2\ud835\udec3\u03B3\ud835\udec4\u03B4\ud835\udec5\u03B5\ud835\udec6\u03B6\ud835\udec7\u03B7\ud835\udec8\u03B8\ud835\udec9\u03B9\ud835\udeca\u03BA\ud835\udecb\u03BB\ud835\udecc\u03BC\ud835\udecd\u03BD\ud835\udece\u03BE\ud835\udecf\u03BF\ud835\uded0\u03C0\ud835\uded1\u03C1\ud835\uded2\u03C2\ud835\uded3\u03C3\ud835\uded4\u03C4\ud835\uded5\u03C5\ud835\uded6\u03C6\ud835\uded7\u03C7\ud835\uded8\u03C8\ud835\uded9\u03C9\ud835\udeda\u2202\ud835\udedb\u220A\ud835\udedc\u03D1\ud835\udedd\u03F0\ud835\udede\u03D5\ud835\udedf\u03F1\ud835\udee0\u03D6\ud835\udee10\ud835\udfce1\ud835\udfcf2\ud835\udfd03\ud835\udfd14\ud835\udfd25\ud835\udfd36\ud835\udfd47\ud835\udfd58\ud835\udfd69\ud835\udfd7
mathvariant.italic = A\ud835\udc34B\ud835\udc35C\ud835\udc36D\ud835\udc37E\ud835\udc38F\ud835\udc39G\ud835\udc3aH\ud835\udc3bI\ud835\udc3cJ\ud835\udc3dK\ud835\udc3eL\ud835\udc3fM\ud835\udc40N\ud835\udc41O\ud835\udc42P\ud835\udc43Q\ud835\udc44R\ud835\udc45S\ud835\udc46T\ud835\udc47U\ud835\udc48V\ud835\udc49W\ud835\udc4aX\ud835\udc4bY\ud835\udc4cZ\ud835\udc4da\ud835\udc4eb\ud835\udc4fc\ud835\udc50d\ud835\udc51e\ud835\udc52f\ud835\udc53g\ud835\udc54h\u210e\ufffdi\ud835\udc56j\ud835\udc57k\ud835\udc58l\ud835\udc59m\ud835\udc5an\ud835\udc5bo\ud835\udc5cp\ud835\udc5dq\ud835\udc5er\ud835\udc5fs\ud835\udc60t\ud835\udc61u\ud835\udc62v\ud835\udc63w\ud835\udc64x\ud835\udc65y\ud835\udc66z\ud835\udc67\u0391\ud835\udee2\u0392\ud835\udee3\u0393\ud835\udee4\u0394\ud835\udee5\u0395\ud835\udee6\u0396\ud835\udee7\u0397\ud835\udee8\u0398\ud835\udee9\u0399\ud835\udeea\u039A\ud835\udeeb\u039B\ud835\udeec\u039C\ud835\udeed\u039D\ud835\udeee\u039E\ud835\udeef\u039F\ud835\udef0\u03A0\ud835\udef1\u03A1\ud835\udef2\u03F4\ud835\udef3\u03A3\ud835\udef4\u03A4\ud835\udef5\u03A5\ud835\udef6\u03A6\ud835\udef7\u03A7\ud835\udef8\u03A8\ud835\udef9\u03A9\ud835\udefa\u2207\ud835\udefb\u03B1\ud835\udefc\u03B2\ud835\udefd\u03B3\ud835\udefe\u03B4\ud835\udeff\u03B5\ud835\udf00\u03B6\ud835\udf01\u03B7\ud835\udf02\u03B8\ud835\udf03\u03B9\ud835\udf04\u03BA\ud835\udf05\u03BB\ud835\udf06\u03BC\ud835\udf07\u03BD\ud835\udf08\u03BE\ud835\udf09\u03BF\ud835\udf0a\u03C0\ud835\udf0b\u03C1\ud835\udf0c\u03C2\ud835\udf0d\u03C3\ud835\udf0e\u03C4\ud835\udf0f\u03C5\ud835\udf10\u03C6\ud835\udf11\u03C7\ud835\udf12\u03C8\ud835\udf13\u03C9\ud835\udf14\u2202\ud835\udf15\u220A\ud835\udf16\u03D1\ud835\udf17\u03F0\ud835\udf18\u03D5\ud835\udf19\u03F1\ud835\udf1a\u03D6\ud835\udf1b
mathvariant.bold-italic = A\ud835\udc68B\ud835\udc69C\ud835\udc6aD\ud835\udc6bE\ud835\udc6cF\ud835\udc6dG\ud835\udc6eH\ud835\udc6fI\ud835\udc70J\ud835\udc71K\ud835\udc72L\ud835\udc73M\ud835\udc74N\ud835\udc75O\ud835\udc76P\ud835\udc77Q\ud835\udc78R\ud835\udc79S\ud835\udc7aT\ud835\udc7bU\ud835\udc7cV\ud835\udc7dW\ud835\udc7eX\ud835\udc7fY\ud835\udc80Z\ud835\udc81a\ud835\udc82b\ud835\udc83c\ud835\udc84d\ud835\udc85e\ud835\udc86f\ud835\udc87g\ud835\udc88h\ud835\udc89i\ud835\udc8aj\ud835\udc8bk\ud835\udc8cl\ud835\udc8dm\ud835\udc8en\ud835\udc8fo\ud835\udc90p\ud835\udc91q\ud835\udc92r\ud835\udc93s\ud835\udc94t\ud835\udc95u\ud835\udc96v\ud835\udc97w\ud835\udc98x\ud835\udc99y\ud835\udc9az\ud835\udc9b\u0391\ud835\udf1c\u0392\ud835\udf1d\u0393\ud835\udf1e\u0394\ud835\udf1f\u0395\ud835\udf20\u0396\ud835\udf21\u0397\ud835\udf22\u0398\ud835\udf23\u0399\ud835\udf24\u039A\ud835\udf25\u039B\ud835\udf26\u039C\ud835\udf27\u039D\ud835\udf28\u039E\ud835\udf29\u039F\ud835\udf2a\u03A0\ud835\udf2b\u03A1\ud835\udf2c\u03F4\ud835\udf2d\u03A3\ud835\udf2e\u03A4\ud835\udf2f\u03A5\ud835\udf30\u03A6\ud835\udf31\u03A7\ud835\udf32\u03A8\ud835\udf33\u03A9\ud835\udf34\u2207\ud835\udf35\u03B1\ud835\udf36\u03B2\ud835\udf37\u03B3\ud835\udf38\u03B4\ud835\udf39\u03B5\ud835\udf3a\u03B6\ud835\udf3b\u03B7\ud835\udf3c\u03B8\ud835\udf3d\u03B9\ud835\udf3e\u03BA\ud835\udf3f\u03BB\ud835\udf40\u03BC\ud835\udf41\u03BD\ud835\udf42\u03BE\ud835\udf43\u03BF\ud835\udf44\u03C0\ud835\udf45\u03C1\ud835\udf46\u03C2\ud835\udf47\u03C3\ud835\udf48\u03C4\ud835\udf49\u03C5\ud835\udf4a\u03C6\ud835\udf4b\u03C7\ud835\udf4c\u03C8\ud835\udf4d\u03C9\ud835\udf4e\u2202\ud835\udf4f\u220A\ud835\udf50\u03D1\ud835\udf51\u03F0\ud835\udf52\u03D5\ud835\udf53\u03F1\ud835\udf54\u03D6\ud835\udf55
mathvariant.double-struck = A\ud835\udd38B\ud835\udd39C\u2102\ufffdD\ud835\udd3bE\ud835\udd3cF\ud835\udd3dG\ud835\udd3eH\u210d\ufffdI\ud835\udd40J\ud835\udd41K\ud835\udd42L\ud835\udd43M\ud835\udd44N\u2115\ufffdO\ud835\udd46P\u2119\ufffdQ\u211a\ufffdR\u211d\ufffdS\ud835\udd4aT\ud835\udd4bU\ud835\udd4cV\ud835\udd4dW\ud835\udd4eX\ud835\udd4fY\ud835\udd50Z\u2124\ufffda\ud835\udd52b\ud835\udd53c\ud835\udd54d\ud835\udd55e\ud835\udd56f\ud835\udd57g\ud835\udd58h\ud835\udd59i\ud835\udd5aj\ud835\udd5bk\ud835\udd5cl\ud835\udd5dm\ud835\udd5en\ud835\udd5fo\ud835\udd60p\ud835\udd61q\ud835\udd62r\ud835\udd63s\ud835\udd64t\ud835\udd65u\ud835\udd66v\ud835\udd67w\ud835\udd68x\ud835\udd69y\ud835\udd6az\ud835\udd6b0\ud835\udfd81\ud835\udfd92\ud835\udfda3\ud835\udfdb4\ud835\udfdc5\ud835\udfdd6\ud835\udfde7\ud835\udfdf8\ud835\udfe09\ud835\udfe1
mathvariant.script = A\ud835\udc9cB\u212c\ufffdC\ud835\udc9eD\ud835\udc9fE\u2130\ufffdF\u2131\ufffdG\ud835\udca2H\u210b\ufffdI\u2110\ufffdJ\ud835\udca5K\ud835\udca6L\u2112\ufffdM\u2133\ufffdN\ud835\udca9O\ud835\udcaaP\ud835\udcabQ\ud835\udcacR\u211b\ufffdS\ud835\udcaeT\ud835\udcafU\ud835\udcb0V\ud835\udcb1W\ud835\udcb2X\ud835\udcb3Y\ud835\udcb4Z\ud835\udcb5a\ud835\udcb6b\ud835\udcb7c\ud835\udcb8d\ud835\udcb9e\u212f\ufffdf\ud835\udcbbg\u210a\ufffdh\ud835\udcbdi\ud835\udcbej\ud835\udcbfk\ud835\udcc0l\ud835\udcc1m\ud835\udcc2n\ud835\udcc3o\u2134\ufffdp\ud835\udcc5q\ud835\udcc6r\ud835\udcc7s\ud835\udcc8t\ud835\udcc9u\ud835\udccav\ud835\udccbw\ud835\udcccx\ud835\udccdy\ud835\udccez\ud835\udccf
mathvariant.bold-script = A\ud835\udcd0B\ud835\udcd1C\ud835\udcd2D\ud835\udcd3E\ud835\udcd4F\ud835\udcd5G\ud835\udcd6H\ud835\udcd7I\ud835\udcd8J\ud835\udcd9K\ud835\udcdaL\ud835\udcdbM\ud835\udcdcN\ud835\udcddO\ud835\udcdeP\ud835\udcdfQ\ud835\udce0R\ud835\udce1S\ud835\udce2T\ud835\udce3U\ud835\udce4V\ud835\udce5W\ud835\udce6X\ud835\udce7Y\ud835\udce8Z\ud835\udce9a\ud835\udceab\ud835\udcebc\ud835\udcecd\ud835\udcede\ud835\udceef\ud835\udcefg\ud835\udcf0h\ud835\udcf1i\ud835\udcf2j\ud835\udcf3k\ud835\udcf4l\ud835\udcf5m\ud835\udcf6n\ud835\udcf7o\ud835\udcf8p\ud835\udcf9q\ud835\udcfar\ud835\udcfbs\ud835\udcfct\ud835\udcfdu\ud835\udcfev\ud835\udcffw\ud835\udd00x\ud835\udd01y\ud835\udd02z\ud835\udd03
mathvariant.fraktur = A\ud835\udd04B\ud835\udd05C\u212d\ufffdD\ud835\udd07E\ud835\udd08F\ud835\udd09G\ud835\udd0aH\u210c\ufffdI\u2111\ufffdJ\ud835\udd0dK\ud835\udd0eL\ud835\udd0fM\ud835\udd10N\ud835\udd11O\ud835\udd12P\ud835\udd13Q\ud835\udd14R\u211c\ufffdS\ud835\udd16T\ud835\udd17U\ud835\udd18V\ud835\udd19W\ud835\udd1aX\ud835\udd1bY\ud835\udd1cZ\u2128\ufffda\ud835\udd1eb\ud835\udd1fc\ud835\udd20d\ud835\udd21e\ud835\udd22f\ud835\udd23g\ud835\udd24h\ud835\udd25i\ud835\udd26j\ud835\udd27k\ud835\udd28l\ud835\udd29m\ud835\udd2an\ud835\udd2bo\ud835\udd2cp\ud835\udd2dq\ud835\udd2er\ud835\udd2fs\ud835\udd30t\ud835\udd31u\ud835\udd32v\ud835\udd33w\ud835\udd34x\ud835\udd35y\ud835\udd36z\ud835\udd37
mathvariant.bold-fraktur = A\ud835\udd6cB\ud835\udd6dC\ud835\udd6eD\ud835\udd6fE\ud835\udd70F\ud835\udd71G\ud835\udd72H\ud835\udd73I\ud835\udd74J\ud835\udd75K\ud835\udd76L\ud835\udd77M\ud835\udd78N\ud835\udd79O\ud835\udd7aP\ud835\udd7bQ\ud835\udd7cR\ud835\udd7dS\ud835\udd7eT\ud835\udd7fU\ud835\udd80V\ud835\udd81W\ud835\udd82X\ud835\udd83Y\ud835\udd84Z\ud835\udd85a\ud835\udd86b\ud835\udd87c\ud835\udd88d\ud835\udd89e\ud835\udd8af\ud835\udd8bg\ud835\udd8ch\ud835\udd8di\ud835\udd8ej\ud835\udd8fk\ud835\udd90l\ud835\udd91m\ud835\udd92n\ud835\udd93o\ud835\udd94p\ud835\udd95q\ud835\udd96r\ud835\udd97s\ud835\udd98t\ud835\udd99u\ud835\udd9av\ud835\udd9bw\ud835\udd9cx\ud835\udd9dy\ud835\udd9ez\ud835\udd9f
mathvariant.sans-serif = A\ud835\udda0B\ud835\udda1C\ud835\udda2D\ud835\udda3E\ud835\udda4F\ud835\udda5G\ud835\udda6H\ud835\udda7I\ud835\udda8J\ud835\udda9K\ud835\uddaaL\ud835\uddabM\ud835\uddacN\ud835\uddadO\ud835\uddaeP\ud835\uddafQ\ud835\uddb0R\ud835\uddb1S\ud835\uddb2T\ud835\uddb3U\ud835\uddb4V\ud835\uddb5W\ud835\uddb6X\ud835\uddb7Y\ud835\uddb8Z\ud835\uddb9a\ud835\uddbab\ud835\uddbbc\ud835\uddbcd\ud835\uddbde\ud835\uddbef\ud835\uddbfg\ud835\uddc0h\ud835\uddc1i\ud835\uddc2j\ud835\uddc3k\ud835\uddc4l\ud835\uddc5m\ud835\uddc6n\ud835\uddc7o\ud835\uddc8p\ud835\uddc9q\ud835\uddcar\ud835\uddcbs\ud835\uddcct\ud835\uddcdu\ud835\uddcev\ud835\uddcfw\ud835\uddd0x\ud835\uddd1y\ud835\uddd2z\ud835\uddd30\ud835\udfe21\ud835\udfe32\ud835\udfe43\ud835\udfe54\ud835\udfe65\ud835\udfe76\ud835\udfe87\ud835\udfe98\ud835\udfea9\ud835\udfeb
mathvariant.bold-sans-serif = A\ud835\uddd4B\ud835\uddd5C\ud835\uddd6D\ud835\uddd7E\ud835\uddd8F\ud835\uddd9G\ud835\udddaH\ud835\udddbI\ud835\udddcJ\ud835\uddddK\ud835\udddeL\ud835\udddfM\ud835\udde0N\ud835\udde1O\ud835\udde2P\ud835\udde3Q\ud835\udde4R\ud835\udde5S\ud835\udde6T\ud835\udde7U\ud835\udde8V\ud835\udde9W\ud835\uddeaX\ud835\uddebY\ud835\uddecZ\ud835\uddeda\ud835\uddeeb\ud835\uddefc\ud835\uddf0d\ud835\uddf1e\ud835\uddf2f\ud835\uddf3g\ud835\uddf4h\ud835\uddf5i\ud835\uddf6j\ud835\uddf7k\ud835\uddf8l\ud835\uddf9m\ud835\uddfan\ud835\uddfbo\ud835\uddfcp\ud835\uddfdq\ud835\uddfer\ud835\uddffs\ud835\ude00t\ud835\ude01u\ud835\ude02v\ud835\ude03w\ud835\ude04x\ud835\ude05y\ud835\ude06z\ud835\ude07\u0391\ud835\udf56\u0392\ud835\udf57\u0393\ud835\udf58\u0394\ud835\udf59\u0395\ud835\udf5a\u0396\ud835\udf5b\u0397\ud835\udf5c\u0398\ud835\udf5d\u0399\ud835\udf5e\u039A\ud835\udf5f\u039B\ud835\udf60\u039C\ud835\udf61\u039D\ud835\udf62\u039E\ud835\udf63\u039F\ud835\udf64\u03A0\ud835\udf65\u03A1\ud835\udf66\u03F4\ud835\udf67\u03A3\ud835\udf68\u03A4\ud835\udf69\u03A5\ud835\udf6a\u03A6\ud835\udf6b\u03A7\ud835\udf6c\u03A8\ud835\udf6d\u03A9\ud835\udf6e\u2207\ud835\udf6f\u03B1\ud835\udf70\u03B2\ud835\udf71\u03B3\ud835\udf72\u03B4\ud835\udf73\u03B5\ud835\udf74\u03B6\ud835\udf75\u03B7\ud835\udf76\u03B8\ud835\udf77\u03B9\ud835\udf78\u03BA\ud835\udf79\u03BB\ud835\udf7a\u03BC\ud835\udf7b\u03BD\ud835\udf7c\u03BE\ud835\udf7d\u03BF\ud835\udf7e\u03C0\ud835\udf7f\u03C1\ud835\udf80\u03C2\ud835\udf81\u03C3\ud835\udf82\u03C4\ud835\udf83\u03C5\ud835\udf84\u03C6\ud835\udf85\u03C7\ud835\udf86\u03C8\ud835\udf87\u03C9\ud835\udf88\u2202\ud835\udf89\u220A\ud835\udf8a\u03D1\ud835\udf8b\u03F0\ud835\udf8c\u03D5\ud835\udf8d\u03F1\ud835\udf8e\u03D6\ud835\udf8f0\ud835\udfec1\ud835\udfed2\ud835\udfee3\ud835\udfef4\ud835\udff05\ud835\udff16\ud835\udff27\ud835\udff38\ud835\udff49\ud835\udff5
mathvariant.sans-serif-italic = A\ud835\ude08B\ud835\ude09C\ud835\ude0aD\ud835\ude0bE\ud835\ude0cF\ud835\ude0dG\ud835\ude0eH\ud835\ude0fI\ud835\ude10J\ud835\ude11K\ud835\ude12L\ud835\ude13M\ud835\ude14N\ud835\ude15O\ud835\ude16P\ud835\ude17Q\ud835\ude18R\ud835\ude19S\ud835\ude1aT\ud835\ude1bU\ud835\ude1cV\ud835\ude1dW\ud835\ude1eX\ud835\ude1fY\ud835\ude20Z\ud835\ude21a\ud835\ude22b\ud835\ude23c\ud835\ude24d\ud835\ude25e\ud835\ude26f\ud835\ude27g\ud835\ude28h\ud835\ude29i\ud835\ude2aj\ud835\ude2bk\ud835\ude2cl\ud835\ude2dm\ud835\ude2en\ud835\ude2fo\ud835\ude30p\ud835\ude31q\ud835\ude32r\ud835\ude33s\ud835\ude34t\ud835\ude35u\ud835\ude36v\ud835\ude37w\ud835\ude38x\ud835\ude39y\ud835\ude3az\ud835\ude3b
mathvariant.sans-serif-bold-italic = A\ud835\ude3cB\ud835\ude3dC\ud835\ude3eD\ud835\ude3fE\ud835\ude40F\ud835\ude41G\ud835\ude42H\ud835\ude43I\ud835\ude44J\ud835\ude45K\ud835\ude46L\ud835\ude47M\ud835\ude48N\ud835\ude49O\ud835\ude4aP\ud835\ude4bQ\ud835\ude4cR\ud835\ude4dS\ud835\ude4eT\ud835\ude4fU\ud835\ude50V\ud835\ude51W\ud835\ude52X\ud835\ude53Y\ud835\ude54Z\ud835\ude55a\ud835\ude56b\ud835\ude57c\ud835\ude58d\ud835\ude59e\ud835\ude5af\ud835\ude5bg\ud835\ude5ch\ud835\ude5di\ud835\ude5ej\ud835\ude5fk\ud835\ude60l\ud835\ude61m\ud835\ude62n\ud835\ude63o\ud835\ude64p\ud835\ude65q\ud835\ude66r\ud835\ude67s\ud835\ude68t\ud835\ude69u\ud835\ude6av\ud835\ude6bw\ud835\ude6cx\ud835\ude6dy\ud835\ude6ez\ud835\ude6f\u0391\ud835\udf90\u0392\ud835\udf91\u0393\ud835\udf92\u0394\ud835\udf93\u0395\ud835\udf94\u0396\ud835\udf95\u0397\ud835\udf96\u0398\ud835\udf97\u0399\ud835\udf98\u039A\ud835\udf99\u039B\ud835\udf9a\u039C\ud835\udf9b\u039D\ud835\udf9c\u039E\ud835\udf9d\u039F\ud835\udf9e\u03A0\ud835\udf9f\u03A1\ud835\udfa0\u03F4\ud835\udfa1\u03A3\ud835\udfa2\u03A4\ud835\udfa3\u03A5\ud835\udfa4\u03A6\ud835\udfa5\u03A7\ud835\udfa6\u03A8\ud835\udfa7\u03A9\ud835\udfa8\u2207\ud835\udfa9\u03B1\ud835\udfaa\u03B2\ud835\udfab\u03B3\ud835\udfac\u03B4\ud835\udfad\u03B5\ud835\udfae\u03B6\ud835\udfaf\u03B7\ud835\udfb0\u03B8\ud835\udfb1\u03B9\ud835\udfb2\u03BA\ud835\udfb3\u03BB\ud835\udfb4\u03BC\ud835\udfb5\u03BD\ud835\udfb6\u03BE\ud835\udfb7\u03BF\ud835\udfb8\u03C0\ud835\udfb9\u03C1\ud835\udfba\u03C2\ud835\udfbb\u03C3\ud835\udfbc\u03C4\ud835\udfbd\u03C5\ud835\udfbe\u03C6\ud835\udfbf\u03C7\ud835\udfc0\u03C8\ud835\udfc1\u03C9\ud835\udfc2\u2202\ud835\udfc3\u220A\ud835\udfc4\u03D1\ud835\udfc5\u03F0\ud835\udfc6\u03D5\ud835\udfc7\u03F1\ud835\udfc8\u03D6\ud835\udfc9
mathvariant.monospace = A\ud835\ude70B\ud835\ude71C\ud835\ude72D\ud835\ude73E\ud835\ude74F\ud835\ude75G\ud835\ude76H\ud835\ude77I\ud835\ude78J\ud835\ude79K\ud835\ude7aL\ud835\ude7bM\ud835\ude7cN\ud835\ude7dO\ud835\ude7eP\ud835\ude7fQ\ud835\ude80R\ud835\ude81S\ud835\ude82T\ud835\ude83U\ud835\ude84V\ud835\ude85W\ud835\ude86X\ud835\ude87Y\ud835\ude88Z\ud835\ude89a\ud835\ude8ab\ud835\ude8bc\ud835\ude8cd\ud835\ude8de\ud835\ude8ef\ud835\ude8fg\ud835\ude90h\ud835\ude91i\ud835\ude92j\ud835\ude93k\ud835\ude94l\ud835\ude95m\ud835\ude96n\ud835\ude97o\ud835\ude98p\ud835\ude99q\ud835\ude9ar\ud835\ude9bs\ud835\ude9ct\ud835\ude9du\ud835\ude9ev\ud835\ude9fw\ud835\udea0x\ud835\udea1y\ud835\udea2z\ud835\udea30\ud835\udff61\ud835\udff72\ud835\udff83\ud835\udff94\ud835\udffa5\ud835\udffb6\ud835\udffc7\ud835\udffd8\ud835\udffe9\ud835\udfff
# Operator Dictionary indexed on the "form" (i.e., infix, prefix, or suffix). # Operator Dictionary indexed on the "form" (i.e., infix, prefix, or suffix).
# Each entry lists the attributes of the operator, using its Unicode format. # Each entry lists the attributes of the operator, using its Unicode format.

View File

@ -34,37 +34,21 @@ math[display="inline"] {
} }
/**************************************************************************/ /**************************************************************************/
/* Style switching during frame construction depending on the context of <mi>: /* Token elements */
These rules are not used when mathvariant or fontstyle is specified
explicitly.
/**************************************************************************/ /**************************************************************************/
/* If the textual content of an <mi> consists of a single character ms {
with a corresponding mathematical italic alphanumeric character, display: inline;
then try to emulate that character */
[_moz-math-font-style="italic"] {
font-style: italic;
font-weight: normal;
} }
/* If the textual content consists of multiple characters, then the default is ms:before, ms:after {
mathvariant=normal. It seems that mathvariant=normal should be interpreted content: "\0022"
to mean non-slanted:
http://www.w3.org/TR/2003/REC-MathML2-20031021/chapter3.html#presm.commatt
"In particular, inheritance of the mathvariant attribute does not follow
the CSS model. The default value for this attribute is "normal"
(non-slanted) for all tokens except mi. ... (The deprecated fontslant
attribute also behaves this way.)"
*/
[_moz-math-font-style="normal"] {
font-style: normal;
} }
/* A style-invariant character preserves its own style */ ms[lquote]:before {
[_moz-math-font-style="invariant"] { content: attr(lquote)
font-style: normal;
font-weight: normal;
} }
ms[rquote]:after {
content: attr(rquote)
}
/**************************************************************************/ /**************************************************************************/
/* Links */ /* Links */
@ -77,121 +61,29 @@ math[display="inline"] {
/* attributes common to all tags */ /* attributes common to all tags */
/**************************************************************************/ /**************************************************************************/
/* deprecated attributes from MathML 1.0 */ /* These attributes are mapped to style in nsMathMLElement.cpp:
/* fontstyle */ - background -> background (deprecated)
[fontstyle="normal"] { - color -> color (deprecated)
font-style: normal; - fontfamily -> font-family (deprecated)
} - fontsize -> font-size (deprecated)
[fontstyle="italic"] { - fontstyle -> font-style (deprecated)
font-style: italic; - fontweight -> font-weight (deprecated)
} - mathvariant -> -moz-math-variant
/* fontweight */ - scriptsizemultiplier -> -moz-script-size-multiplier
[fontweight="normal"] { - scriptminsize -> -moz-script-min-size
font-weight: normal; - scriptlevel -> -moz-script-level
} - mathsize -> font-size
[fontweight="bold"] { - mathcolor -> color
font-weight: bold; - mathbackground -> background
}
/* attributes from MathML 2.0 */
/* These ones are handled in the back-end:
mathcolor (replaces 'color'):
#rgb | #rrggbb | html-color-name
mathbackground (replaces 'background'):
#rgb | #rrggbb | html-color-name
*/ */
/* mathvariant (replaces 'fontstyle' & 'fontweight' & 'fontslant'):
normal | bold | italic | bold-italic | double-struck | bold-fraktur | script |
bold-script | fraktur | sans-serif | bold-sans-serif | sans-serif-italic |
sans-serif-bold-italic | monospace
Note1: Back-end code for these is not yet written (bug 114365):
double-struck, script, fraktur, bold-fraktur, bold-script
Note2: Don't use the 'font' shorthand because it resets the font-size and this
breaks the propagation of the scriptlevel size.
XXX bugs 46622 & 114365: need -moz-math-serif, etc, to only lookup math fonts
The meaning of mathvariant=normal is unclear as there is no interpretation
that "corresponds to SMP Math Alphanumeric Symbol characters"
(http://www.w3.org/TR/2003/REC-MathML2-20031021/chapter3.html#presm.commatt),
but let's assume an explicit mathvariant=normal is an attempt to reset all
style.
*/
[mathvariant] { /* shared and same as [mathvariant="normal"] */
/* reset all font properties except those that affect the size */
font-family: MathJax_Main, STIXGeneral, DejaVu Serif, DejaVu Sans, Cambria, Cambria Math, Times, Lucida Sans Unicode, OpenSymbol, Standard Symbols L, serif;
font-style: normal;
font-variant: normal;
font-weight: normal;
}
[mathvariant="bold-fraktur"] {
font-weight: bold;
font-family: MathJax_Fraktur, STIXGeneral, DejaVu Serif, DejaVu Sans, Cambria, Cambria Math, Times, Lucida Sans Unicode, OpenSymbol, Standard Symbols L, serif;
}
[mathvariant="bold-script"] {
font-weight: bold;
font-family: MathJax_Script, STIXGeneral, DejaVu Serif, DejaVu Sans, Cambria, Cambria Math, Times, Lucida Sans Unicode, OpenSymbol, Standard Symbols L, serif;
}
[mathvariant="bold"] {
font-weight: bold;
}
[mathvariant="italic"] {
font-style: italic;
}
[mathvariant="bold-italic"] {
font-weight: bold;
font-style: italic;
}
[mathvariant="sans-serif"] {
font-family: MathJax_SansSerif, sans-serif;
}
[mathvariant="bold-sans-serif"] {
font-weight: bold;
font-family: MathJax_SansSerif, sans-serif;
}
[mathvariant="sans-serif-italic"] {
font-family: MathJax_SansSerif, sans-serif;
font-style: italic;
}
[mathvariant="sans-serif-bold-italic"] {
font-family: MathJax_SansSerif, sans-serif;
font-weight: bold;
font-style: italic;
}
[mathvariant="monospace"] {
font-family: MathJax_Typewriter, monospace;
}
[mathvariant="double-struck"] {
font-family: MathJax_AMS, STIXGeneral, DejaVu Serif, DejaVu Sans, Cambria, Cambria Math, Times, Lucida Sans Unicode, OpenSymbol, Standard Symbols L, serif;
}
[mathvariant="script"] {
font-family: MathJax_Script, STIXGeneral, DejaVu Serif, DejaVu Sans, Cambria, Cambria Math, Times, Lucida Sans Unicode, OpenSymbol, Standard Symbols L, serif;
}
[mathvariant="fraktur"] {
font-family: MathJax_Fraktur, STIXGeneral, DejaVu Serif, DejaVu Sans, Cambria, Cambria Math, Times, Lucida Sans Unicode, OpenSymbol, Standard Symbols L, serif;
}
/**************************************************************************/ /**************************************************************************/
/* tags with generated content */ /* merror */
/**************************************************************************/ /**************************************************************************/
ms {
display: inline;
}
ms:before, ms:after {
content: "\0022";
}
ms[lquote]:before {
content: attr(lquote);
}
ms[rquote]:after {
content: attr(rquote);
}
merror { merror {
display: block; display: block;
font-family: sans-serif; font-family: sans-serif;

View File

@ -33,28 +33,10 @@ static uint32_t gOperatorCount = 0;
static OperatorData* gOperatorArray = nullptr; static OperatorData* gOperatorArray = nullptr;
static nsHashtable* gOperatorTable = nullptr; static nsHashtable* gOperatorTable = nullptr;
static bool gGlobalsInitialized = false; static bool gGlobalsInitialized = false;
static nsTArray<nsString>* gInvariantCharArray = nullptr;
static const PRUnichar kDashCh = PRUnichar('#'); static const PRUnichar kDashCh = PRUnichar('#');
static const PRUnichar kColonCh = PRUnichar(':'); static const PRUnichar kColonCh = PRUnichar(':');
static const char* const kMathVariant_name[] = {
"normal",
"bold",
"italic",
"bold-italic",
"sans-serif",
"bold-sans-serif",
"sans-serif-italic",
"sans-serif-bold-italic",
"monospace",
"script",
"bold-script",
"fraktur",
"bold-fraktur",
"double-struck"
};
static void static void
SetBooleanProperty(OperatorData* aOperatorData, SetBooleanProperty(OperatorData* aOperatorData,
nsString aName) nsString aName)
@ -243,15 +225,6 @@ InitOperators(void)
NS_LITERAL_CSTRING("resource://gre/res/fonts/mathfont.properties")); NS_LITERAL_CSTRING("resource://gre/res/fonts/mathfont.properties"));
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;
// Get the list of invariant chars
for (int32_t i = 0; i < eMATHVARIANT_COUNT; ++i) {
nsAutoCString key(NS_LITERAL_CSTRING("mathvariant."));
key.Append(kMathVariant_name[i]);
nsAutoString value;
mathfontProp->GetStringProperty(key, value);
gInvariantCharArray->AppendElement(value); // i.e., gInvariantCharArray[i] holds this list
}
// Parse the Operator Dictionary in two passes. // Parse the Operator Dictionary in two passes.
// The first pass is to count the number of operators; the second pass is to // The first pass is to count the number of operators; the second pass is to
// allocate the necessary space for them and to add them in the hash table. // allocate the necessary space for them and to add them in the hash table.
@ -318,12 +291,9 @@ InitGlobals()
{ {
gGlobalsInitialized = true; gGlobalsInitialized = true;
nsresult rv = NS_ERROR_OUT_OF_MEMORY; nsresult rv = NS_ERROR_OUT_OF_MEMORY;
gInvariantCharArray = new nsTArray<nsString>(); gOperatorTable = new nsHashtable();
if (gInvariantCharArray) { if (gOperatorTable) {
gOperatorTable = new nsHashtable(); rv = InitOperators();
if (gOperatorTable) {
rv = InitOperators();
}
} }
if (NS_FAILED(rv)) if (NS_FAILED(rv))
nsMathMLOperators::CleanUp(); nsMathMLOperators::CleanUp();
@ -333,10 +303,6 @@ InitGlobals()
void void
nsMathMLOperators::CleanUp() nsMathMLOperators::CleanUp()
{ {
if (gInvariantCharArray) {
delete gInvariantCharArray;
gInvariantCharArray = nullptr;
}
if (gOperatorArray) { if (gOperatorArray) {
delete[] gOperatorArray; delete[] gOperatorArray;
gOperatorArray = nullptr; gOperatorArray = nullptr;
@ -514,47 +480,3 @@ nsMathMLOperators::GetStretchyDirection(const nsString& aOperator)
return NS_STRETCH_DIRECTION_UNSUPPORTED; return NS_STRETCH_DIRECTION_UNSUPPORTED;
} }
} }
/* static */ eMATHVARIANT
nsMathMLOperators::LookupInvariantChar(const nsAString& aChar)
{
if (!gGlobalsInitialized) {
InitGlobals();
}
if (gInvariantCharArray) {
for (int32_t i = gInvariantCharArray->Length()-1; i >= 0; --i) {
const nsString& list = gInvariantCharArray->ElementAt(i);
nsString::const_iterator start, end;
list.BeginReading(start);
list.EndReading(end);
// Style-invariant characters are at offset 3*j + 1.
if (FindInReadable(aChar, start, end) &&
start.size_backward() % 3 == 1) {
return eMATHVARIANT(i);
}
}
}
return eMATHVARIANT_NONE;
}
/* static */ const nsDependentSubstring
nsMathMLOperators::TransformVariantChar(const PRUnichar& aChar,
eMATHVARIANT aVariant)
{
if (!gGlobalsInitialized) {
InitGlobals();
}
if (gInvariantCharArray) {
nsString list = gInvariantCharArray->ElementAt(aVariant);
int32_t index = list.FindChar(aChar);
// BMP characters are at offset 3*j
if (index != kNotFound && index % 3 == 0 && list.Length() - index >= 2 ) {
// The style-invariant character is the next character
// (and list should contain padding if the next character is in the BMP).
++index;
uint32_t len = NS_IS_HIGH_SURROGATE(list.CharAt(index)) ? 2 : 1;
return nsDependentSubstring(list, index, len);
}
}
return nsDependentSubstring(&aChar, &aChar + 1);
}

View File

@ -58,26 +58,6 @@ enum {
#define NS_MATHML_OPERATOR_SIZE_INFINITY NS_IEEEPositiveInfinity() #define NS_MATHML_OPERATOR_SIZE_INFINITY NS_IEEEPositiveInfinity()
// Style invariant characters (chars have their own intrinsic predefined style)
enum eMATHVARIANT {
eMATHVARIANT_NONE = -1,
eMATHVARIANT_normal = 0,
eMATHVARIANT_bold,
eMATHVARIANT_italic,
eMATHVARIANT_bold_italic,
eMATHVARIANT_sans_serif,
eMATHVARIANT_bold_sans_serif,
eMATHVARIANT_sans_serif_italic,
eMATHVARIANT_sans_serif_bold_italic,
eMATHVARIANT_monospace,
eMATHVARIANT_script,
eMATHVARIANT_bold_script,
eMATHVARIANT_fraktur,
eMATHVARIANT_bold_fraktur,
eMATHVARIANT_double_struck,
eMATHVARIANT_COUNT
};
class nsMathMLOperators { class nsMathMLOperators {
public: public:
static void AddRefTable(void); static void AddRefTable(void);
@ -123,19 +103,6 @@ public:
// Helper function used by the nsMathMLChar class. // Helper function used by the nsMathMLChar class.
static nsStretchDirection GetStretchyDirection(const nsString& aOperator); static nsStretchDirection GetStretchyDirection(const nsString& aOperator);
// Return the variant type of one Unicode Mathematical Alphanumeric Symbol
// character (which may be represented by a surrogate pair), or return
// eMATHVARIANT_NONE if aChar is not such a character.
static eMATHVARIANT LookupInvariantChar(const nsAString& aChar);
// Return the styled Mathematical Alphanumeric Symbol character
// corresponding to a BMP character and a mathvariant value, or return aChar
// if there is no such corresponding character.
// Note the result may be dependent on aChar, and should be considered a
// temporary.
static const nsDependentSubstring
TransformVariantChar(const PRUnichar& aChar, eMATHVARIANT aVariant);
}; };
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////