From e606355ed2f855b6aae0de97218b734f36a1a82f Mon Sep 17 00:00:00 2001 From: "rbs%maths.uq.edu.au" Date: Fri, 23 Feb 2001 12:49:38 +0000 Subject: [PATCH] Declare atoms, update css rules, init a variable to zero - sr=waterson --- layout/mathml/content/src/mathml.css | 64 +++++++++++-------- layout/mathml/content/src/nsMathMLAtomList.h | 8 +-- .../mathml/content/src/nsMathMLOperators.cpp | 2 +- 3 files changed, 43 insertions(+), 31 deletions(-) diff --git a/layout/mathml/content/src/mathml.css b/layout/mathml/content/src/mathml.css index fff7a28c10b..d37dbdeb01f 100644 --- a/layout/mathml/content/src/mathml.css +++ b/layout/mathml/content/src/mathml.css @@ -31,17 +31,17 @@ /* - outermost math element */ /*******************************************************/ -math, math[mode="inline"] { -/* font-style: normal; */ +math { font-size: inherit; + font-style: normal; font-family: CMSY10, CMEX10, Symbol, Times, Lucida Sans Unicode, MT Extra, Math1, Math2, Math3, Math4, Math5, serif; +} + +math[mode="inline"] { display: inline; } math[mode="display"] { -/* font-style: normal; */ - font-size: inherit; - font-family: CMSY10, CMEX10, Symbol, Times, Lucida Sans Unicode, MT Extra, Math1, Math2, Math3, Math4, Math5, serif; display: block; text-align: center; } @@ -135,7 +135,7 @@ merror { mtable { display: table; border-spacing: 0.8em 1.0ex; /* horizontal vertical */ - border-collapse: separate; + border-collapse: separate; /* 'collapse' is blocked by bug 49490 */ margin-left: -0.4em; margin-right: -0.8em; margin-top: -1.0ex; @@ -209,23 +209,47 @@ mi { font-style: italic; } -mstyle[fontstyle="normal"] mi { +[-moz-math-font-style="normal"] { font-style: normal; } -:-moz-math-font-style-normal { - font-style: normal; -} /* change of size induced by changing the scriptlevel */ -:-moz-math-font-size-smaller { - font-size: smaller; +[-moz-math-font-size="+1"] { + font-size: 71%; +} +[-moz-math-font-size="+2"] { + font-size: 50%; +} +[-moz-math-font-size="+3"] { + font-size: 36%; +} +[-moz-math-font-size="+4"] { + font-size: 25%; +} +[-moz-math-font-size="+5"] { + font-size: 18%; +} +[-moz-math-font-size="scriptminsize"] { + font-size: 8pt; +} +[-moz-math-font-size="-1"] { + font-size: 141%; +} +[-moz-math-font-size="-2"] { + font-size: 200%; +} +[-moz-math-font-size="-3"] { + font-size: 283%; +} +[-moz-math-font-size="-4"] { + font-size: 400%; +} +[-moz-math-font-size="-5"] { + font-size: 566%; } -:-moz-math-font-size-larger { - font-size: larger; -} /* style used for stretchy symbols */ @@ -247,16 +271,6 @@ mstyle[fontstyle="normal"] mi { /* They may go away at any time */ /**************************************************************************/ -math { -/* font-weight: bold; */ -/* font-size: 24pt; */ -} - -/* -p { - display: block; -} -*/ [background="yellow"] { background-color: yellow; diff --git a/layout/mathml/content/src/nsMathMLAtomList.h b/layout/mathml/content/src/nsMathMLAtomList.h index 6a5bafd8c85..54007597425 100644 --- a/layout/mathml/content/src/nsMathMLAtomList.h +++ b/layout/mathml/content/src/nsMathMLAtomList.h @@ -38,11 +38,8 @@ ******/ - -MATHML_ATOM(fontsize_smaller, ":-moz-math-font-size-smaller") -MATHML_ATOM(fontsize_larger, ":-moz-math-font-size-larger") - -MATHML_ATOM(fontstyle_normal, ":-moz-math-font-style-normal") +MATHML_ATOM(fontsize, "-moz-math-font-size") // different from fontsize_ +MATHML_ATOM(fontstyle, "-moz-math-font-style") // different from fontstyle_ MATHML_ATOM(fontstyle_stretchy, ":-moz-math-font-style-stretchy") MATHML_ATOM(fontstyle_anonymous, ":-moz-math-font-style-anonymous") @@ -103,6 +100,7 @@ MATHML_ATOM(factorial_, "factorial") MATHML_ATOM(fence_, "fence") MATHML_ATOM(fn_, "fn") MATHML_ATOM(fontfamily_, "fontfamily") +MATHML_ATOM(fontsize_, "fontstyle") MATHML_ATOM(fontstyle_, "fontstyle") MATHML_ATOM(forall_, "forall") MATHML_ATOM(form_, "form") diff --git a/layout/mathml/content/src/nsMathMLOperators.cpp b/layout/mathml/content/src/nsMathMLOperators.cpp index 73c6d0266ca..eb2da105128 100644 --- a/layout/mathml/content/src/nsMathMLOperators.cpp +++ b/layout/mathml/content/src/nsMathMLOperators.cpp @@ -483,7 +483,7 @@ nsMathMLOperators::IsMutableOperator(const nsString& aOperator) if (gOperatorTable) { // Lookup with form=0 will put all the variants in gOperatorFound[] float dummy; - nsOperatorFlags flags; + nsOperatorFlags flags = 0; LookupOperator(aOperator, 0, &flags, &dummy, &dummy); // if the operator was found, gOperatorFound contains all the variants // of the operator. check if there is one that meets the criteria