Bug 669719 - support the displaystyle attribute on the <math/> element. r=roc
☠☠ backed out by fc34f965bd9d ☠ ☠
authorJonathan Hage <hage.jonathan@gmail.com>
Sat, 09 Jul 2011 15:52:19 +0200
changeset 73362 5d92749612cc656472aa79e79a67b1a576a305fc
parent 73361 1dcabbe1c7fca9821f98bab4647c10628d145f71
child 73363 5012c0792d298b1aea449ebb835c9705dad4119d
child 73364 fc34f965bd9de1fb447fd518de66d934fdb14929
push id235
push userbzbarsky@mozilla.com
push dateTue, 27 Sep 2011 17:13:04 +0000
treeherdermozilla-beta@2d1e082d176a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs669719
milestone8.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 669719 - support the displaystyle attribute on the <math/> element. r=roc
layout/mathml/nsMathMLFrame.cpp
layout/reftests/mathml/math-display-ref.html
layout/reftests/mathml/math-display.html
layout/reftests/mathml/reftest.list
--- a/layout/mathml/nsMathMLFrame.cpp
+++ b/layout/mathml/nsMathMLFrame.cpp
@@ -214,16 +214,17 @@ nsMathMLFrame::GetPresentationDataFrom(n
     if (!content)
       break;
 
     if (content->Tag() == nsGkAtoms::math) {
       const nsStyleDisplay* display = frame->GetStyleDisplay();
       if (display->mDisplay == NS_STYLE_DISPLAY_BLOCK) {
         aPresentationData.flags |= NS_MATHML_DISPLAYSTYLE;
       }
+      FindAttrDisplaystyle(content, aPresentationData);
       aPresentationData.mstyle = frame->GetFirstContinuation();
       break;
     }
     frame = frame->GetParent();
   }
   NS_WARN_IF_FALSE(frame && frame->GetContent(),
                    "bad MathML markup - could not find the top <math> element");
 }
new file mode 100644
--- /dev/null
+++ b/layout/reftests/mathml/math-display-ref.html
@@ -0,0 +1,13 @@
+<html>
+  <body>
+    <math>
+      <mstyle displaystyle="true">
+	<munderover>
+	  <mo>&sum;</mo>
+	  <mi>b</mi>
+	  <mi>c</mi>
+	</munderover>
+      </mstyle>
+    </math>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/mathml/math-display.html
@@ -0,0 +1,11 @@
+<html>
+  <body>
+    <math displaystyle="true">
+      <munderover>
+	<mo>&sum;</mo>
+	<mi>b</mi>
+	<mi>c</mi>
+      </munderover>
+    </math>
+  </body>
+</html>
--- a/layout/reftests/mathml/reftest.list
+++ b/layout/reftests/mathml/reftest.list
@@ -62,11 +62,12 @@ fails == mstyle-5.xhtml mstyle-5-ref.xht
 == 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
 == mpadded-3.html mpadded-3-ref.html
 == mpadded-4.html mpadded-4-ref.html
 == 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