mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 854339 - Make the equal sign stretchable in MathML. r=karlt
This commit is contained in:
parent
b4b65217f2
commit
719ca1f09c
@ -111,7 +111,7 @@ operator.\u003B.infix = lspace:0 rspace:3 separator # ;
|
||||
operator.\u003C.infix = lspace:5 rspace:5 # <
|
||||
operator.\u003C\u003D.infix = lspace:5 rspace:5 # <=
|
||||
operator.\u003C\u003E.infix = lspace:1 rspace:1 # <>
|
||||
operator.\u003D.infix = lspace:5 rspace:5 # =
|
||||
operator.\u003D.infix = lspace:5 rspace:5 direction:horizontal # =
|
||||
operator.\u003D\u003D.infix = lspace:4 rspace:4 # ==
|
||||
operator.\u003E.infix = lspace:5 rspace:5 # >
|
||||
operator.\u003E\u003D.infix = lspace:5 rspace:5 # >=
|
||||
|
@ -23,6 +23,7 @@
|
||||
\u203E = \uFFFD\uFFFD\uFFFD\u0305\u00AF # overline
|
||||
\u0332 = \uFFFD\uFFFD\uFFFD\u0332\u0332 # COMBINING LOW LINE, UnderBar
|
||||
\u005F = \uFFFD\uFFFD\uFFFD\u0332\u0332 # _ low line
|
||||
\u003D = \uFFFD\uFFFD\uFFFD\u003D\u003D # = equal sign
|
||||
|
||||
\u2016 = \uFFFD\uFFFD\uFFFD\u2016\u2016 # DOUBLE VERTICAL LINE, Vert, Verbar
|
||||
|
||||
|
@ -167,12 +167,6 @@ nsMathMLmoFrame::ProcessTextData()
|
||||
mFlags |= allFlags & NS_MATHML_OPERATOR_ACCENT;
|
||||
mFlags |= allFlags & NS_MATHML_OPERATOR_MOVABLELIMITS;
|
||||
|
||||
bool isMutable =
|
||||
NS_MATHML_OPERATOR_IS_STRETCHY(allFlags) ||
|
||||
NS_MATHML_OPERATOR_IS_LARGEOP(allFlags);
|
||||
if (isMutable)
|
||||
mFlags |= NS_MATHML_OPERATOR_MUTABLE;
|
||||
|
||||
// see if this is an operator that should be centered to cater for
|
||||
// fonts that are not math-aware
|
||||
if (1 == length) {
|
||||
@ -187,12 +181,19 @@ nsMathMLmoFrame::ProcessTextData()
|
||||
|
||||
// cache the operator
|
||||
mMathMLChar.SetData(presContext, data);
|
||||
ResolveMathMLCharStyle(presContext, mContent, mStyleContext, &mMathMLChar, isMutable);
|
||||
|
||||
// cache the native direction -- beware of bug 133429...
|
||||
// mEmbellishData.direction must always retain our native direction, whereas
|
||||
// mMathMLChar.GetStretchDirection() may change later, when Stretch() is called
|
||||
mEmbellishData.direction = mMathMLChar.GetStretchDirection();
|
||||
|
||||
bool isMutable =
|
||||
NS_MATHML_OPERATOR_IS_LARGEOP(allFlags) ||
|
||||
(mEmbellishData.direction != NS_STRETCH_DIRECTION_UNSUPPORTED);
|
||||
if (isMutable)
|
||||
mFlags |= NS_MATHML_OPERATOR_MUTABLE;
|
||||
|
||||
ResolveMathMLCharStyle(presContext, mContent, mStyleContext, &mMathMLChar, isMutable);
|
||||
}
|
||||
|
||||
// get our 'form' and lookup in the Operator Dictionary to fetch
|
||||
|
@ -82,6 +82,7 @@ fails == mstyle-5.xhtml mstyle-5-ref.xhtml # Bug 787215
|
||||
== scale-stretchy-3.xhtml scale-stretchy-3-ref.xhtml
|
||||
!= scale-stretchy-4.xhtml scale-stretchy-4-ref.xhtml
|
||||
!= scale-stretchy-5.xhtml scale-stretchy-5-ref.xhtml
|
||||
!= stretchy-1.html stretchy-1-ref.html
|
||||
== math-as-mstyle-1.xhtml math-as-mstyle-1-ref.xhtml
|
||||
== mpadded-1.html mpadded-1-ref.html
|
||||
== mpadded-2.html mpadded-2-ref.html
|
||||
|
14
layout/reftests/mathml/stretchy-1-ref.html
Normal file
14
layout/reftests/mathml/stretchy-1-ref.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><title>Test stretchy equal (bug 854339)</title></head>
|
||||
<body>
|
||||
|
||||
<math>
|
||||
<munder>
|
||||
<mi>AVERYLONGBASE</mi>
|
||||
<mo stretchy="false">=</mo>
|
||||
</munder>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
14
layout/reftests/mathml/stretchy-1.html
Normal file
14
layout/reftests/mathml/stretchy-1.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><title>Test stretchy equal (bug 854339)</title></head>
|
||||
<body>
|
||||
|
||||
<math>
|
||||
<munder>
|
||||
<mi>AVERYLONGBASE</mi>
|
||||
<mo stretchy="true">=</mo>
|
||||
</munder>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user