зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 3 changesets (bug 1790009) for causing mochitest failures at browser_misused_characters_in_strings.js. CLOSED TREE
Backed out changeset 73ff5b4bf98c (bug 1790009) Backed out changeset 236e1d9535ed (bug 1790009) Backed out changeset 90ee5367d506 (bug 1790009)
This commit is contained in:
Родитель
86987f69cb
Коммит
0421d864fc
|
@ -1200,7 +1200,16 @@ operator.\u0026.prefix = lspace:0 rspace:5 # &
|
||||||
operator.\u002B\u002B.prefix = lspace:0 rspace:2 # ++
|
operator.\u002B\u002B.prefix = lspace:0 rspace:2 # ++
|
||||||
operator.\u002D\u002D.prefix = lspace:0 rspace:2 # --
|
operator.\u002D\u002D.prefix = lspace:0 rspace:2 # --
|
||||||
operator.\u002E\u002E.postfix = lspace:0 rspace:0 # ..
|
operator.\u002E\u002E.postfix = lspace:0 rspace:0 # ..
|
||||||
|
operator.\u002E\u002E\u002E.postfix = lspace:0 rspace:0 # ...
|
||||||
operator.\u003B.postfix = lspace:0 rspace:0 separator # ;
|
operator.\u003B.postfix = lspace:0 rspace:0 separator # ;
|
||||||
|
operator.\u003C\u20D2.infix = lspace:5 rspace:5 # <⃒
|
||||||
|
operator.\u003E\u20D2.infix = lspace:5 rspace:5 # >⃒
|
||||||
|
operator.\u006C\u0069\u006D.prefix = lspace:0 rspace:3 movablelimits # lim
|
||||||
|
operator.\u006D\u0061\u0078.prefix = lspace:0 rspace:3 movablelimits # max
|
||||||
|
operator.\u006D\u0069\u006E.prefix = lspace:0 rspace:3 movablelimits # min
|
||||||
|
operator.\u007C\u007C\u007C.infix = lspace:2 rspace:2 stretchy fence symmetric direction:vertical # multiple character operator: |||
|
||||||
|
operator.\u007C\u007C\u007C.postfix = lspace:0 rspace:0 stretchy fence symmetric direction:vertical # multiple character operator: |||
|
||||||
|
operator.\u007C\u007C\u007C.prefix = lspace:0 rspace:0 stretchy fence symmetric direction:vertical # multiple character operator: |||
|
||||||
operator.\u007E.infix = lspace:2 rspace:2 stretchy direction:horizontal # ~
|
operator.\u007E.infix = lspace:2 rspace:2 stretchy direction:horizontal # ~
|
||||||
operator.\u0332.postfix = lspace:0 rspace:0 stretchy accent direction:horizontal # _
|
operator.\u0332.postfix = lspace:0 rspace:0 stretchy accent direction:horizontal # _
|
||||||
operator.\u03F6.infix = lspace:5 rspace:5 # greek reversed lunate epsilon symbol
|
operator.\u03F6.infix = lspace:5 rspace:5 # greek reversed lunate epsilon symbol
|
||||||
|
@ -1226,7 +1235,20 @@ operator.\u2234.infix = lspace:5 rspace:5 # ∴
|
||||||
operator.\u2235.infix = lspace:5 rspace:5 # ∵
|
operator.\u2235.infix = lspace:5 rspace:5 # ∵
|
||||||
operator.\u223D\u0331.infix = lspace:3 rspace:3 # reversed tilde with underline
|
operator.\u223D\u0331.infix = lspace:3 rspace:3 # reversed tilde with underline
|
||||||
operator.\u223F.infix = lspace:3 rspace:3 # sine wave
|
operator.\u223F.infix = lspace:3 rspace:3 # sine wave
|
||||||
|
operator.\u2242\u0338.infix = lspace:5 rspace:5 # ≂̸
|
||||||
|
operator.\u224E\u0338.infix = lspace:5 rspace:5 # ≎̸
|
||||||
|
operator.\u224F\u0338.infix = lspace:5 rspace:5 # ≏̸
|
||||||
|
operator.\u2266\u0338.infix = lspace:5 rspace:5 # ≧̸
|
||||||
|
operator.\u226A\u0338.infix = lspace:5 rspace:5 # ≪̸
|
||||||
|
operator.\u226B\u0338.infix = lspace:5 rspace:5 # ≫̸
|
||||||
|
operator.\u227F\u0338.infix = lspace:5 rspace:5 # ≿̸
|
||||||
|
operator.\u2282\u020D2.infix = lspace:5 rspace:5 # ⊂⃒
|
||||||
|
operator.\u2282\u20D2.infix = lspace:5 rspace:5 # subset of with vertical line
|
||||||
|
operator.\u2283\u020D2.infix = lspace:5 rspace:5 # ⊃⃒
|
||||||
|
operator.\u2283\u20D2.infix = lspace:5 rspace:5 # superset of with vertical line
|
||||||
operator.\u228E.prefix = lspace:1 rspace:2 largeop movablelimits symmetric direction:vertical # ⊎
|
operator.\u228E.prefix = lspace:1 rspace:2 largeop movablelimits symmetric direction:vertical # ⊎
|
||||||
|
operator.\u228F\u0338.infix = lspace:5 rspace:5 # ⊏̸
|
||||||
|
operator.\u2290\u0338.infix = lspace:5 rspace:5 # ⊐̸
|
||||||
operator.\u2295.prefix = lspace:0 rspace:3 largeop movablelimits symmetric direction:vertical # ⊕
|
operator.\u2295.prefix = lspace:0 rspace:3 largeop movablelimits symmetric direction:vertical # ⊕
|
||||||
operator.\u2296.prefix = lspace:0 rspace:3 largeop movablelimits symmetric direction:vertical # ⊖
|
operator.\u2296.prefix = lspace:0 rspace:3 largeop movablelimits symmetric direction:vertical # ⊖
|
||||||
operator.\u2297.prefix = lspace:0 rspace:3 largeop movablelimits symmetric direction:vertical # ⊗
|
operator.\u2297.prefix = lspace:0 rspace:3 largeop movablelimits symmetric direction:vertical # ⊗
|
||||||
|
@ -1328,6 +1350,8 @@ operator.\u29CA.infix = lspace:3 rspace:3 # triangle with dot above
|
||||||
operator.\u29CB.infix = lspace:3 rspace:3 # triangle with underbar
|
operator.\u29CB.infix = lspace:3 rspace:3 # triangle with underbar
|
||||||
operator.\u29CC.infix = lspace:3 rspace:3 # s in triangle
|
operator.\u29CC.infix = lspace:3 rspace:3 # s in triangle
|
||||||
operator.\u29CD.infix = lspace:3 rspace:3 # triangle with serifs at bottom
|
operator.\u29CD.infix = lspace:3 rspace:3 # triangle with serifs at bottom
|
||||||
|
operator.\u29CF\u0338.infix = lspace:5 rspace:5 # ⧏̸
|
||||||
|
operator.\u29D0\u0338.infix = lspace:5 rspace:5 # ⧐̸
|
||||||
operator.\u29D8.infix = lspace:3 rspace:3 # left wiggly fence
|
operator.\u29D8.infix = lspace:3 rspace:3 # left wiggly fence
|
||||||
operator.\u29D9.infix = lspace:3 rspace:3 # right wiggly fence
|
operator.\u29D9.infix = lspace:3 rspace:3 # right wiggly fence
|
||||||
operator.\u29DB.infix = lspace:3 rspace:3 # right double wiggly fence
|
operator.\u29DB.infix = lspace:3 rspace:3 # right double wiggly fence
|
||||||
|
@ -1350,6 +1374,15 @@ operator.\u29F2.infix = lspace:3 rspace:3 # error-barred white circle
|
||||||
operator.\u29F3.infix = lspace:3 rspace:3 # error-barred black circle
|
operator.\u29F3.infix = lspace:3 rspace:3 # error-barred black circle
|
||||||
operator.\u29FE.infix = lspace:4 rspace:4 # tiny
|
operator.\u29FE.infix = lspace:4 rspace:4 # tiny
|
||||||
operator.\u29FF.infix = lspace:4 rspace:4 # miny
|
operator.\u29FF.infix = lspace:4 rspace:4 # miny
|
||||||
|
operator.\u2A7D\u0338.infix = lspace:5 rspace:5 # ⩽̸
|
||||||
|
operator.\u2A7E\u0338.infix = lspace:5 rspace:5 # ⩾̸
|
||||||
|
operator.\u2AA1\u0338.infix = lspace:5 rspace:5 # ⪡̸
|
||||||
|
operator.\u2AA2\u0338.infix = lspace:5 rspace:5 # ⪢̸
|
||||||
|
operator.\u2AAF\u0338.infix = lspace:5 rspace:5 # ⪯̸
|
||||||
|
operator.\u2AB0\u0338.infix = lspace:5 rspace:5 # ⪰̸
|
||||||
|
operator.\u2AC5\u0338.infix = lspace:5 rspace:5 # ⫅̸
|
||||||
|
operator.\u2AC6\u0338.infix = lspace:5 rspace:5 # ⫅̸
|
||||||
|
operator.\u2ADD\u0338.infix = lspace:5 rspace:5 # nonforking with slash
|
||||||
operator.\u2AEC.infix = lspace:5 rspace:5 # double stroke not sign
|
operator.\u2AEC.infix = lspace:5 rspace:5 # double stroke not sign
|
||||||
operator.\u2AED.infix = lspace:5 rspace:5 # reversed double stroke not sign
|
operator.\u2AED.infix = lspace:5 rspace:5 # reversed double stroke not sign
|
||||||
operator.\u2AEF.infix = lspace:5 rspace:5 # vertical line with circle above
|
operator.\u2AEF.infix = lspace:5 rspace:5 # vertical line with circle above
|
||||||
|
|
|
@ -309,7 +309,7 @@ static OperatorData* GetOperatorData(const nsString& aOperator,
|
||||||
return gOperatorTable->Get(key);
|
return gOperatorTable->Get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool nsMathMLOperators::LookupOperator(const nsString& aOperator,
|
void nsMathMLOperators::LookupOperator(const nsString& aOperator,
|
||||||
const uint8_t aForm,
|
const uint8_t aForm,
|
||||||
nsOperatorFlags* aFlags,
|
nsOperatorFlags* aFlags,
|
||||||
float* aLeadingSpace,
|
float* aLeadingSpace,
|
||||||
|
@ -317,59 +317,70 @@ bool nsMathMLOperators::LookupOperator(const nsString& aOperator,
|
||||||
NS_ASSERTION(aFlags && aLeadingSpace && aTrailingSpace, "bad usage");
|
NS_ASSERTION(aFlags && aLeadingSpace && aTrailingSpace, "bad usage");
|
||||||
NS_ASSERTION(aForm > 0 && aForm < 4, "*** invalid call ***");
|
NS_ASSERTION(aForm > 0 && aForm < 4, "*** invalid call ***");
|
||||||
|
|
||||||
// Operator strings must be of length 1 or 2 in UTF-16.
|
|
||||||
// https://w3c.github.io/mathml-core/#dfn-algorithm-to-determine-the-category-of-an-operator
|
|
||||||
if (aOperator.IsEmpty() || aOperator.Length() > 2) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ignore the combining "negation" suffix for 2-character strings.
|
|
||||||
// https://w3c.github.io/mathml-core/#dfn-algorithm-to-determine-the-category-of-an-operator
|
|
||||||
if (aOperator.Length() == 2 &&
|
|
||||||
(aOperator[1] == 0x0338 || aOperator[1] == 0x20D2)) {
|
|
||||||
nsAutoString newOperator;
|
|
||||||
newOperator.Append(aOperator[0]);
|
|
||||||
return LookupOperator(newOperator, aForm, aFlags, aLeadingSpace,
|
|
||||||
aTrailingSpace);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!gGlobalsInitialized) {
|
if (!gGlobalsInitialized) {
|
||||||
InitOperatorGlobals();
|
InitOperatorGlobals();
|
||||||
}
|
}
|
||||||
if (gOperatorTable) {
|
if (gOperatorTable) {
|
||||||
if (OperatorData* data = GetOperatorData(aOperator, aForm)) {
|
// The MathML REC says:
|
||||||
NS_ASSERTION(data->mStr.Equals(aOperator), "bad setup");
|
// If the operator does not occur in the dictionary with the specified form,
|
||||||
*aFlags = data->mFlags;
|
// the renderer should use one of the forms which is available there, in the
|
||||||
*aLeadingSpace = data->mLeadingSpace;
|
// order of preference: infix, postfix, prefix.
|
||||||
*aTrailingSpace = data->mTrailingSpace;
|
|
||||||
return true;
|
OperatorData* found;
|
||||||
|
if (!(found = GetOperatorData(aOperator, aForm))) {
|
||||||
|
for (const auto& form :
|
||||||
|
{NS_MATHML_OPERATOR_FORM_INFIX, NS_MATHML_OPERATOR_FORM_POSTFIX,
|
||||||
|
NS_MATHML_OPERATOR_FORM_PREFIX}) {
|
||||||
|
if (form == aForm) {
|
||||||
|
// This form was tried above, skip it.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ((found = GetOperatorData(aOperator, form))) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (found) {
|
||||||
|
NS_ASSERTION(found->mStr.Equals(aOperator), "bad setup");
|
||||||
|
*aLeadingSpace = found->mLeadingSpace;
|
||||||
|
*aTrailingSpace = found->mTrailingSpace;
|
||||||
|
*aFlags &= ~NS_MATHML_OPERATOR_FORM; // clear the form bits
|
||||||
|
*aFlags |= found->mFlags; // just add bits without overwriting
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool nsMathMLOperators::LookupOperatorWithFallback(const nsString& aOperator,
|
void nsMathMLOperators::LookupOperators(const nsString& aOperator,
|
||||||
const uint8_t aForm,
|
nsOperatorFlags* aFlags,
|
||||||
nsOperatorFlags* aFlags,
|
float* aLeadingSpace,
|
||||||
float* aLeadingSpace,
|
float* aTrailingSpace) {
|
||||||
float* aTrailingSpace) {
|
if (!gGlobalsInitialized) {
|
||||||
if (LookupOperator(aOperator, aForm, aFlags, aLeadingSpace, aTrailingSpace)) {
|
InitOperatorGlobals();
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
for (const auto& form :
|
|
||||||
{NS_MATHML_OPERATOR_FORM_INFIX, NS_MATHML_OPERATOR_FORM_POSTFIX,
|
aFlags[NS_MATHML_OPERATOR_FORM_INFIX] = 0;
|
||||||
NS_MATHML_OPERATOR_FORM_PREFIX}) {
|
aLeadingSpace[NS_MATHML_OPERATOR_FORM_INFIX] = 0.0f;
|
||||||
if (form == aForm) {
|
aTrailingSpace[NS_MATHML_OPERATOR_FORM_INFIX] = 0.0f;
|
||||||
// This form was tried above, skip it.
|
|
||||||
continue;
|
aFlags[NS_MATHML_OPERATOR_FORM_POSTFIX] = 0;
|
||||||
}
|
aLeadingSpace[NS_MATHML_OPERATOR_FORM_POSTFIX] = 0.0f;
|
||||||
if (LookupOperator(aOperator, form, aFlags, aLeadingSpace,
|
aTrailingSpace[NS_MATHML_OPERATOR_FORM_POSTFIX] = 0.0f;
|
||||||
aTrailingSpace)) {
|
|
||||||
return true;
|
aFlags[NS_MATHML_OPERATOR_FORM_PREFIX] = 0;
|
||||||
|
aLeadingSpace[NS_MATHML_OPERATOR_FORM_PREFIX] = 0.0f;
|
||||||
|
aTrailingSpace[NS_MATHML_OPERATOR_FORM_PREFIX] = 0.0f;
|
||||||
|
|
||||||
|
if (gOperatorTable) {
|
||||||
|
for (const auto& form :
|
||||||
|
{NS_MATHML_OPERATOR_FORM_INFIX, NS_MATHML_OPERATOR_FORM_POSTFIX,
|
||||||
|
NS_MATHML_OPERATOR_FORM_PREFIX}) {
|
||||||
|
if (OperatorData* found = GetOperatorData(aOperator, form)) {
|
||||||
|
aFlags[form] = found->mFlags;
|
||||||
|
aLeadingSpace[form] = found->mLeadingSpace;
|
||||||
|
aTrailingSpace[form] = found->mTrailingSpace;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
|
@ -392,22 +403,19 @@ bool nsMathMLOperators::IsIntegralOperator(const nsString& aOperator) {
|
||||||
/* static */
|
/* static */
|
||||||
nsStretchDirection nsMathMLOperators::GetStretchyDirection(
|
nsStretchDirection nsMathMLOperators::GetStretchyDirection(
|
||||||
const nsString& aOperator) {
|
const nsString& aOperator) {
|
||||||
// Search any entry for that operator and return the corresponding direction.
|
// LookupOperator will search infix, postfix and prefix forms of aOperator and
|
||||||
// It is assumed that all the forms have same direction.
|
// return the first form found. It is assumed that all these forms have same
|
||||||
for (const auto& form :
|
// direction.
|
||||||
{NS_MATHML_OPERATOR_FORM_INFIX, NS_MATHML_OPERATOR_FORM_POSTFIX,
|
nsOperatorFlags flags = 0;
|
||||||
NS_MATHML_OPERATOR_FORM_PREFIX}) {
|
float dummy;
|
||||||
nsOperatorFlags flags;
|
nsMathMLOperators::LookupOperator(aOperator, NS_MATHML_OPERATOR_FORM_INFIX,
|
||||||
float dummy;
|
&flags, &dummy, &dummy);
|
||||||
if (nsMathMLOperators::LookupOperator(aOperator, form, &flags, &dummy,
|
|
||||||
&dummy)) {
|
if (NS_MATHML_OPERATOR_IS_DIRECTION_VERTICAL(flags)) {
|
||||||
if (NS_MATHML_OPERATOR_IS_DIRECTION_VERTICAL(flags)) {
|
return NS_STRETCH_DIRECTION_VERTICAL;
|
||||||
return NS_STRETCH_DIRECTION_VERTICAL;
|
} else if (NS_MATHML_OPERATOR_IS_DIRECTION_HORIZONTAL(flags)) {
|
||||||
}
|
return NS_STRETCH_DIRECTION_HORIZONTAL;
|
||||||
if (NS_MATHML_OPERATOR_IS_DIRECTION_HORIZONTAL(flags)) {
|
} else {
|
||||||
return NS_STRETCH_DIRECTION_HORIZONTAL;
|
return NS_STRETCH_DIRECTION_UNSUPPORTED;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return NS_STRETCH_DIRECTION_UNSUPPORTED;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,21 +66,24 @@ class nsMathMLOperators {
|
||||||
// LookupOperator:
|
// LookupOperator:
|
||||||
// Given the string value of an operator and its form (last two bits of
|
// Given the string value of an operator and its form (last two bits of
|
||||||
// flags), this method returns attributes of the operator in the output
|
// flags), this method returns attributes of the operator in the output
|
||||||
// parameters. The return value indicates whether an entry was found.
|
// parameters. If the operator is not found under the supplied form, then the
|
||||||
static bool LookupOperator(const nsString& aOperator, const uint8_t aForm,
|
// other forms are tried in the following order: infix, postfix, prefix. The
|
||||||
|
// caller can test the output parameter aFlags to know exactly under which
|
||||||
|
// form the operator was found in the Operator Dictionary.
|
||||||
|
static void LookupOperator(const nsString& aOperator, const uint8_t aForm,
|
||||||
nsOperatorFlags* aFlags, float* aLeadingSpace,
|
nsOperatorFlags* aFlags, float* aLeadingSpace,
|
||||||
float* aTrailingSpace);
|
float* aTrailingSpace);
|
||||||
|
|
||||||
// LookupOperatorWithFallback:
|
// LookupOperators:
|
||||||
// Same as LookupOperator but if the operator is not found under the supplied
|
// Helper to return all the forms under which an operator is listed in the
|
||||||
// form, then the other forms are tried in the following order: infix, postfix
|
// Operator Dictionary. The caller must pass arrays of size 4, and use
|
||||||
// prefix. The caller can test the output parameter aFlags to know exactly
|
// aFlags[NS_MATHML_OPERATOR_FORM_{INFIX|POSTFIX|PREFIX}],
|
||||||
// under which form the operator was found in the Operator Dictionary.
|
// aLeadingSpace[], etc, to access the attributes of the operator under a
|
||||||
static bool LookupOperatorWithFallback(const nsString& aOperator,
|
// particular form. If the operator wasn't found under a form, its entry
|
||||||
const uint8_t aForm,
|
// aFlags[form] is set to zero.
|
||||||
nsOperatorFlags* aFlags,
|
static void LookupOperators(const nsString& aOperator,
|
||||||
float* aLeadingSpace,
|
nsOperatorFlags* aFlags, float* aLeadingSpace,
|
||||||
float* aTrailingSpace);
|
float* aTrailingSpace);
|
||||||
|
|
||||||
// Helper functions used by the nsMathMLChar class.
|
// Helper functions used by the nsMathMLChar class.
|
||||||
static bool IsMirrorableOperator(const nsString& aOperator);
|
static bool IsMirrorableOperator(const nsString& aOperator);
|
||||||
|
|
|
@ -131,16 +131,12 @@ void nsMathMLmoFrame::ProcessTextData() {
|
||||||
|
|
||||||
// lookup all the forms under which the operator is listed in the dictionary,
|
// lookup all the forms under which the operator is listed in the dictionary,
|
||||||
// and record whether the operator has accent="true" or movablelimits="true"
|
// and record whether the operator has accent="true" or movablelimits="true"
|
||||||
nsOperatorFlags allFlags = 0;
|
nsOperatorFlags flags[4];
|
||||||
for (const auto& form :
|
float lspace[4], rspace[4];
|
||||||
{NS_MATHML_OPERATOR_FORM_INFIX, NS_MATHML_OPERATOR_FORM_POSTFIX,
|
nsMathMLOperators::LookupOperators(data, flags, lspace, rspace);
|
||||||
NS_MATHML_OPERATOR_FORM_PREFIX}) {
|
nsOperatorFlags allFlags = flags[NS_MATHML_OPERATOR_FORM_INFIX] |
|
||||||
nsOperatorFlags flags = 0;
|
flags[NS_MATHML_OPERATOR_FORM_POSTFIX] |
|
||||||
float dummy;
|
flags[NS_MATHML_OPERATOR_FORM_PREFIX];
|
||||||
if (nsMathMLOperators::LookupOperator(data, form, &flags, &dummy, &dummy)) {
|
|
||||||
allFlags |= flags;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mFlags |= allFlags & NS_MATHML_OPERATOR_ACCENT;
|
mFlags |= allFlags & NS_MATHML_OPERATOR_ACCENT;
|
||||||
mFlags |= allFlags & NS_MATHML_OPERATOR_MOVABLELIMITS;
|
mFlags |= allFlags & NS_MATHML_OPERATOR_MOVABLELIMITS;
|
||||||
|
@ -331,13 +327,7 @@ void nsMathMLmoFrame::ProcessOperatorData() {
|
||||||
// lookup the operator dictionary
|
// lookup the operator dictionary
|
||||||
nsAutoString data;
|
nsAutoString data;
|
||||||
mMathMLChar.GetData(data);
|
mMathMLChar.GetData(data);
|
||||||
nsOperatorFlags flags = 0;
|
nsMathMLOperators::LookupOperator(data, form, &mFlags, &lspace, &rspace);
|
||||||
if (nsMathMLOperators::LookupOperatorWithFallback(data, form, &flags,
|
|
||||||
&lspace, &rspace)) {
|
|
||||||
mFlags &= ~NS_MATHML_OPERATOR_FORM; // clear the form bits
|
|
||||||
mFlags |= flags; // just add bits without overwriting
|
|
||||||
}
|
|
||||||
|
|
||||||
// Spacing is zero if our outermost embellished operator is not in an
|
// Spacing is zero if our outermost embellished operator is not in an
|
||||||
// inferred mrow.
|
// inferred mrow.
|
||||||
if (!NS_MATHML_OPERATOR_EMBELLISH_IS_ISOLATED(mFlags) &&
|
if (!NS_MATHML_OPERATOR_EMBELLISH_IS_ISOLATED(mFlags) &&
|
||||||
|
|
|
@ -134,19 +134,6 @@ if ($ARGV[0] eq "check") {
|
||||||
@moz_keys = (keys %moz_hash);
|
@moz_keys = (keys %moz_hash);
|
||||||
# check the validity of our private data
|
# check the validity of our private data
|
||||||
while ($key = pop(@moz_keys)) {
|
while ($key = pop(@moz_keys)) {
|
||||||
|
|
||||||
if ($key =~ /\\u.+\\u.+\\u.+/) {
|
|
||||||
$valid = 0;
|
|
||||||
$nb_errors++;
|
|
||||||
print $file_syntax_errors "error: \"$key\" has more than 2 characters\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($key =~ /\\u20D2\./ || $key =~ /\\u0338\./) {
|
|
||||||
$valid = 0;
|
|
||||||
$nb_errors++;
|
|
||||||
print $file_syntax_errors "error: \"$key\" ends with character U+20D2 or U+0338\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
@moz = @{ $moz_hash{$key} };
|
@moz = @{ $moz_hash{$key} };
|
||||||
$entry = &generateEntry($key, @moz);
|
$entry = &generateEntry($key, @moz);
|
||||||
$valid = 1;
|
$valid = 1;
|
||||||
|
|
|
@ -33,12 +33,7 @@
|
||||||
var epsilon = 1;
|
var epsilon = 1;
|
||||||
var emToPx = 25;
|
var emToPx = 25;
|
||||||
|
|
||||||
[
|
["equal", "vertical_bar"].forEach(id => {
|
||||||
"equal",
|
|
||||||
"vertical_bar",
|
|
||||||
"left_normal_factor_semidirect_product",
|
|
||||||
"there_exists",
|
|
||||||
].forEach(id => {
|
|
||||||
var div = document.getElementById(id);
|
var div = document.getElementById(id);
|
||||||
var ref = div.getElementsByClassName("reference")[0];
|
var ref = div.getElementsByClassName("reference")[0];
|
||||||
var totalSpaceRef = spaceBetween(ref, 0, 2);
|
var totalSpaceRef = spaceBetween(ref, 0, 2);
|
||||||
|
@ -109,51 +104,5 @@
|
||||||
</math>
|
</math>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="left_normal_factor_semidirect_product">
|
|
||||||
<p>
|
|
||||||
<math class="reference">
|
|
||||||
<mn> </mn>
|
|
||||||
<mo stretchy="false">⋉</mo>
|
|
||||||
<mn> </mn>
|
|
||||||
</math>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<math class="combining">
|
|
||||||
<mn> </mn>
|
|
||||||
<mo stretchy="false">⋉̸</mo>
|
|
||||||
<mn> </mn>
|
|
||||||
</math>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<math class="combining">
|
|
||||||
<mn> </mn>
|
|
||||||
<mo stretchy="false">⋉⃒</mo>
|
|
||||||
<mn> </mn>
|
|
||||||
</math>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div id="there_exists">
|
|
||||||
<p>
|
|
||||||
<math class="reference">
|
|
||||||
<mn> </mn>
|
|
||||||
<mo stretchy="false">∃</mo>
|
|
||||||
<mn> </mn>
|
|
||||||
</math>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<math class="combining">
|
|
||||||
<mn> </mn>
|
|
||||||
<mo stretchy="false">∄</mo>
|
|
||||||
<mn> </mn>
|
|
||||||
</math>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<math class="combining">
|
|
||||||
<mn> </mn>
|
|
||||||
<mo stretchy="false">∃⃒</mo>
|
|
||||||
<mn> </mn>
|
|
||||||
</math>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<title>Spacing of empty and three-char operators (reference)</title>
|
|
||||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
|
||||||
<style>
|
|
||||||
math {
|
|
||||||
font: 50px/1 Ahem;
|
|
||||||
}
|
|
||||||
mn:first-child {
|
|
||||||
color: blue;
|
|
||||||
}
|
|
||||||
mn:last-child {
|
|
||||||
color: yellow;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<p><math><mn>_</mn><mo lspace="0.2777777777777778em" rspace="0.2777777777777778em">_</mo><mn>_</mn></math></p>
|
|
||||||
|
|
||||||
<p>The spacing after the blue squares and before the yellow squares should be the same as the above reference:</p>
|
|
||||||
|
|
||||||
<p><math><mn>_</mn><mo lspace="0.2777777777777778em" rspace="0.2777777777777778em"><!-- empty --></mo><mn>_</mn></math></p>
|
|
||||||
<p><math><mn>_</mn><mo lspace="0.2777777777777778em" rspace="0.2777777777777778em">...</mo><mn>_</mn></math></p>
|
|
||||||
<p><math><mn>_</mn><mo lspace="0.2777777777777778em" rspace="0.2777777777777778em">lim</mo><mn>_</mn></math>
|
|
||||||
<p><math><mn>_</mn><mo lspace="0.2777777777777778em" rspace="0.2777777777777778em">max</mo><mn>_</mn></math>
|
|
||||||
<p><math><mn>_</mn><mo lspace="0.2777777777777778em" rspace="0.2777777777777778em">min</mo><mn>_</mn></math>
|
|
||||||
<p><math><mn>_</mn><mo lspace="0.2777777777777778em" rspace="0.2777777777777778em">|||</mo><mn>_</mn></math>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,39 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<title>Spacing of empty and three-char operators</title>
|
|
||||||
<link rel="help" href="https://w3c.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
|
|
||||||
<link rel="help" href="https://w3c.github.io/mathml-core/#operator-dictionary">
|
|
||||||
<meta name="assert" content="Verifies that empty and three-char operators use the default spacing.">
|
|
||||||
<link rel="match" href="operator-dictionary-empty-and-three-chars-ref.html">
|
|
||||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
|
||||||
<style>
|
|
||||||
math {
|
|
||||||
font: 50px/1 Ahem;
|
|
||||||
}
|
|
||||||
mn:first-child {
|
|
||||||
color: blue;
|
|
||||||
}
|
|
||||||
mn:last-child {
|
|
||||||
color: yellow;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<p><math><mn>_</mn><mo lspace="0.2777777777777778em" rspace="0.2777777777777778em">_</mo><mn>_</mn></math></p>
|
|
||||||
|
|
||||||
<p>The spacing after the blue squares and before the yellow squares should be the same as the above reference:</p>
|
|
||||||
|
|
||||||
<p><math><mn>_</mn><mo><!-- empty --></mo><mn>_</mn></math></p>
|
|
||||||
<p><math><mn>_</mn><mo>...</mo><mn>_</mn></math></p>
|
|
||||||
<p><math><mn>_</mn><mo>lim</mo><mn>_</mn></math>
|
|
||||||
<p><math><mn>_</mn><mo>max</mo><mn>_</mn></math>
|
|
||||||
<p><math><mn>_</mn><mo>min</mo><mn>_</mn></math>
|
|
||||||
<p><math><mn>_</mn><mo>|||</mo><mn>_</mn></math>
|
|
||||||
|
|
||||||
<script src="/mathml/support/feature-detection.js"></script>
|
|
||||||
<script>MathMLFeatureDetection.ensure_for_match_reftest("has_operator_spacing");</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Загрузка…
Ссылка в новой задаче