mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 669719 - support the displaystyle attribute on the <math/> element. r=roc
This commit is contained in:
parent
27d2020203
commit
d14defe899
@ -62,14 +62,15 @@ nsMathMLFrame::GetMathMLFrameType()
|
||||
return eMathMLFrameType_Ordinary;
|
||||
}
|
||||
|
||||
// snippet of code used by <mstyle> and <mtable>, which are the only
|
||||
// two tags where the displaystyle attribute is allowed by the spec.
|
||||
// snippet of code used by <mstyle>, <mtable> and <math> which are the only
|
||||
// three tags where the displaystyle attribute is allowed by the spec.
|
||||
/* static */ void
|
||||
nsMathMLFrame::FindAttrDisplaystyle(nsIContent* aContent,
|
||||
nsPresentationData& aPresentationData)
|
||||
{
|
||||
NS_ASSERTION(aContent->Tag() == nsGkAtoms::mstyle_ ||
|
||||
aContent->Tag() == nsGkAtoms::mtable_, "bad caller");
|
||||
aContent->Tag() == nsGkAtoms::mtable_ ||
|
||||
aContent->Tag() == nsGkAtoms::math, "bad caller");
|
||||
static nsIContent::AttrValuesArray strings[] =
|
||||
{&nsGkAtoms::_false, &nsGkAtoms::_true, nsnull};
|
||||
// see if the explicit displaystyle attribute is there
|
||||
@ -219,6 +220,7 @@ nsMathMLFrame::GetPresentationDataFrom(nsIFrame* aFrame,
|
||||
if (display->mDisplay == NS_STYLE_DISPLAY_BLOCK) {
|
||||
aPresentationData.flags |= NS_MATHML_DISPLAYSTYLE;
|
||||
}
|
||||
FindAttrDisplaystyle(content, aPresentationData);
|
||||
aPresentationData.mstyle = frame->GetFirstContinuation();
|
||||
break;
|
||||
}
|
||||
|
13
layout/reftests/mathml/math-display-ref.html
Normal file
13
layout/reftests/mathml/math-display-ref.html
Normal file
@ -0,0 +1,13 @@
|
||||
<html>
|
||||
<body>
|
||||
<math>
|
||||
<mstyle displaystyle="true">
|
||||
<munderover>
|
||||
<mo>∑</mo>
|
||||
<mi>b</mi>
|
||||
<mi>c</mi>
|
||||
</munderover>
|
||||
</mstyle>
|
||||
</math>
|
||||
</body>
|
||||
</html>
|
11
layout/reftests/mathml/math-display.html
Normal file
11
layout/reftests/mathml/math-display.html
Normal file
@ -0,0 +1,11 @@
|
||||
<html>
|
||||
<body>
|
||||
<math displaystyle="true">
|
||||
<munderover>
|
||||
<mo>∑</mo>
|
||||
<mi>b</mi>
|
||||
<mi>c</mi>
|
||||
</munderover>
|
||||
</math>
|
||||
</body>
|
||||
</html>
|
@ -72,6 +72,7 @@ fails == mstyle-5.xhtml mstyle-5-ref.xhtml # See bug 569125#c29
|
||||
== mpadded-5.html mpadded-5-ref.html
|
||||
== mpadded-1-2.html mpadded-1-2-ref.html
|
||||
== mpadded-6.html mpadded-6-ref.html
|
||||
== math-display.html math-display-ref.html
|
||||
== mfrac-linethickness-1.xhtml mfrac-linethickness-1-ref.xhtml
|
||||
== mathml-negativespace.html mathml-negativespace-ref.html
|
||||
!= link-1.xhtml link-ref.xhtml
|
||||
|
Loading…
Reference in New Issue
Block a user