Title: [202973] trunk
Revision
202973
Author
[email protected]
Date
2016-07-08 02:37:57 -0700 (Fri, 08 Jul 2016)

Log Message

Use OpenType MATH constant AxisHeight.
https://bugs.webkit.org/show_bug.cgi?id=133567

Patch by Frederic Wang <[email protected]> on 2016-07-08
Reviewed by Brent Fulgham.

Source/WebCore:

We make RenderMathMLOperator and RenderMathMLTable use the OpenType MATH constant AxisHeight.
These are the only remaining cases to handle since RenderMathMLFraction already uses that constant.

Tests: imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html
      imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html

* rendering/mathml/RenderMathMLBlock.cpp: Make RenderMathMLTable use the math axis
for its vertical alignment and update a bit the comments.
(WebCore::axisHeight): Move the code in a static function that can be called by
RenderMathMLBlock and RenderMathMLTable.
(WebCore::RenderMathMLBlock::mathAxisHeight): Use axisHeight.
(WebCore::RenderMathMLTable::firstLineBaseline): Ditto.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::stretchTo):

LayoutTests:

Import tests from the MathML in HTML5 test suite to verify the AxisHeight parameter.

* imported/mathml-in-html5/fonts/math/axisheight5000-verticalarrow14000.woff: Added.
* imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1-expected.txt: Added.
* imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html: Added.
* imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html: Added.
* imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-expected.txt: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (202972 => 202973)


--- trunk/LayoutTests/ChangeLog	2016-07-08 08:57:50 UTC (rev 202972)
+++ trunk/LayoutTests/ChangeLog	2016-07-08 09:37:57 UTC (rev 202973)
@@ -1,3 +1,18 @@
+2016-07-08  Frederic Wang  <[email protected]>
+
+        Use OpenType MATH constant AxisHeight.
+        https://bugs.webkit.org/show_bug.cgi?id=133567
+
+        Reviewed by Brent Fulgham.
+
+        Import tests from the MathML in HTML5 test suite to verify the AxisHeight parameter.
+
+        * imported/mathml-in-html5/fonts/math/axisheight5000-verticalarrow14000.woff: Added.
+        * imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1-expected.txt: Added.
+        * imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html: Added.
+        * imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html: Added.
+        * imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-expected.txt: Added.
+
 2016-07-08  Manuel Rego Casasnovas  <[email protected]>
 
         [css-grid] Disallow repeat() in grid-template shorthand

Added: trunk/LayoutTests/imported/mathml-in-html5/fonts/math/axisheight5000-verticalarrow14000.woff (0 => 202973)


--- trunk/LayoutTests/imported/mathml-in-html5/fonts/math/axisheight5000-verticalarrow14000.woff	                        (rev 0)
+++ trunk/LayoutTests/imported/mathml-in-html5/fonts/math/axisheight5000-verticalarrow14000.woff	2016-07-08 09:37:57 UTC (rev 202973)
@@ -0,0 +1,15 @@
+wOFFOTTO	hCFF Tn\xC1\x8EFFTMhyȐ\xACMATH\x84\x81hTK"OS/2\@`\xF81\x92cmap\xFC@JCB\xE2Phead.6	\xBA\xE0\xD1hhea8$=\xEBhmtx\xD0maxpTPname\x9C^x\x98\xB7\xAF$post< \xFF\x863x\x9Cc`d``b妺M\xF1\xFC6_\xB8\x99_E.G\x99\xCCC\xA6\x99_\x98mRL ,\xA8
+Fx\x9Cc`d``~\xC1\xC0\xC0\x90&AlFT\xC0P\xA02Px\x9Cc`a~\xC18\x81\x81\x95\x81\x81\x99\x87ك\x81\x81a\x84fr`\xB0f4\xD2\xAC\x9C0\xC0\xC4
+Ƞ\x81AAq\xF3 +I+(!#\x81\xA3\xC9x\x9C\xBD\x91Kj\xC30E\xAF\x9Dt\xD2\xDF
+h!8H&\xC9 \xD0AȠ$\xA3B\xE6\xC65\xB1 DA6\xF9t\xDDGGv\xDD@WSz\xAD\x88\x8C
+-j!t\xF4|\xDF\xD5\xD3\x80s\xBC"\xC0\xF1\xBB\xC5\xCCs\x80\xDE<\x87\xB8Ƨ\xE7\xEE\x82g\xCFu\xB4\xC2\xCF+\\x86\x9E\x9B\x8C\xBFP\xD4ϸ\xBBwY\xC3zq\x83\xCF5<W\x9E\xEB\xEF\x9E\xA1\xF2\xDC\xC48|\xC4袱D\x8Em\xA4\xE8p\x8D!\xA10 ͑\xF0O\xCEu\xC6\xDD\x87\xA1J\xBB\xB8&\xAF\x81\x89\xD9\xAC^\xE6\xA5h\xA7K5\xF3\xA4\xCC\xE731*
+\x93\xEA\xA4Ԇ\xB2{ft\xCBNg\xF6yR5"l\xB5\xCE3\xA5r\xC5i9v\xAC\xA4\xE7UH\xF6\xBAȳ꨾\x942\xDAf\xB6\xD4i\xB2J\xAC5;\xD5c\xBF\xF3\xF9.q\xEA.S\xBAղ\xBC\xCC5\xA2K\xB9\xC0\x90\xF3\xEF\xE5}]#fF\xA76cj\xD6\xE5\xD4\xD8e&\xE2\xAEC\xF1\xE35\xA9Qqԏ\xAA^\xFFWcΧ\xF0\x8F.\\x9Er\xFD9\xDE+\x8B\xCC|h!\xA5\xEAV5\xFESa_,ʣ\xA5x\x9Cc```f\x80`Fp\xF2\xC1|+ \xCD\xA4\x98W\xFC\xFF\xE4\x83\xE9\xFF\xEFEA\xD5#\x82\x83\x92\xEA\x98n	\xB1x\x9Cc`f\x83\xFF\xCDF@\x8A\x91+(U\xB9x\x9Ccd`aa`ddTJ\xAC\xC8,\xCEH\xCDL\xCF(1500\xD0-K-*\xC9LN\xCCI,*\xCA/74
+102102\xE8\xFD\xE0g\xF8!\xC7\xF8C\x9E\xE9\x87\xF3	\x96\xC6\xEE\xEE_52fXe\xDE\xF1\xCB00\xC80|\x94a\x93a\x8Cb`\xE9\xE1ebg\xB0a\x88e\xA8WZ\x90\x92\x97T\x9CZ\x9CY\x95j"\x8C\x9C\xF3*\x8B@V+h$k*\x9A)\xF8&\x96d\xF8\xFA(8\xE7'g&\x96d\xE6\xE7t a#c;cc'+\xD0\xCBʦ\xEE\x91\xDD{\x9C\xDA˸w\xEF\xCF-{\x99\xF7\x8A\xFD\x92\xF8\xA9\xF7O\x82m\xEF\x9F?\xA2?N\xFD\xDC\xF2\xE7;\xD0w\x8C@\xCC\xDC\xCD\xF2\xAB\xE6WͿ6\xBEep\xE9t\xB3+ \x91_5"ݢ\xDD<\\xBFj\x80\x88\x87\xE7W+7\x90\xE2\xDEZ~x\x9Cc```d\x82\xCB"\xEA\xF9`:\xCAd\x8C7}x\x9Cc`d``\xE0bx\xC0\xA8\xC7\xC0`\xC3z\x87\x84;\x88'\xA0\xB4&j\xA7100\xC6\xA1\xCE\xA2L\xC3\xD8Hf\xA0\x88anj\xA2\xAF\xD96b@ZH3\x82M`CT\x9E
+\xF301H0\xC8\xE1tD\xA5\x83\x83	\x90%T\xADg\x8A1KG2\xB0\x98m\x84\x8B1\x82\xD51A\xD8Q\xC8\xB7\xE8\xE8
\ No newline at end of file

Added: trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1-expected.txt (0 => 202973)


--- trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1-expected.txt	2016-07-08 09:37:57 UTC (rev 202973)
@@ -0,0 +1,5 @@
+↨
+
+
+FAIL AxisHeight assert_approx_equals: mo: axis height expected 50 +/- 1 but got 70
+
Property changes on: trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1-expected.txt
___________________________________________________________________

Added: svn:eol-style

+LF \ No newline at end of property

Added: trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html (0 => 202973)


--- trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html	                        (rev 0)
+++ trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html	2016-07-08 09:37:57 UTC (rev 202973)
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>mo axis height</title>
+<link rel="help" href=""
+<meta name="assert" content="Element mo correctly uses the axis height parameter from the MATH table.">
+<script src=""
+<script src=""
+<style>
+  math, mspace {
+    font-size: 10px;
+  }
+  @font-face {
+    font-family: axisheight5000-verticalarrow14000;
+    src: url("../../../fonts/math/axisheight5000-verticalarrow14000.woff");
+  }
+</style>
+<script>
+  var emToPx = 10 / 1000; // font-size: 10px, font.em = 1000
+  var epsilon = 1;
+
+  function getBox(aId) {
+    return document.getElementById(aId).getBoundingClientRect();
+  }
+
+  setup({ explicit_done: true });
+  window.addEventListener("load", function() {
+    document.fonts.ready.then(function() {
+      window.setTimeout(runTests, 250);
+    });
+  });
+
+  function runTests() {
+    test(function() {
+      var v1 = 5000 * emToPx;
+      var moMiddle = (getBox("mo").bottom + getBox("mo").top) / 2;
+      assert_approx_equals(getBox("baseline").bottom - moMiddle,
+                           v1, epsilon, "mo: axis height");
+    }, "AxisHeight");
+
+    done();
+  }
+</script>
+</head>
+<body>
+  <p>
+    <math style="font-family: axisheight5000-verticalarrow14000;">
+      <mrow>
+        <mspace id="baseline" mathbackground="blue" width="100px" height="1px"/>
+        <mo id="mo" mathcolor="green">&#x21A8;</mo>
+        <mspace mathbackground="black" width="10px" height="100px"/>
+      </mrow>
+    </math>
+  </p>
+</body>
+</html>
Property changes on: trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html
___________________________________________________________________

Added: svn:eol-style

+LF \ No newline at end of property

Added: svn:mime-type

+text/html \ No newline at end of property

Added: trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height-expected.txt (0 => 202973)


--- trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height-expected.txt	2016-07-08 09:37:57 UTC (rev 202973)
@@ -0,0 +1,3 @@
+
+PASS AxisHeight 
+
Property changes on: trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height-expected.txt
___________________________________________________________________

Added: svn:eol-style

+LF \ No newline at end of property

Added: trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html (0 => 202973)


--- trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html	                        (rev 0)
+++ trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html	2016-07-08 09:37:57 UTC (rev 202973)
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>table axis height</title>
+<link rel="help" href=""
+<meta name="assert" content="Element mtable correctly uses the axis height parameter from the MATH table.">
+<script src=""
+<script src=""
+<style>
+  math, mspace {
+    font-size: 10px;
+  }
+  @font-face {
+    font-family: axisheight5000-verticalarrow14000;
+    src: url("../../../fonts/math/axisheight5000-verticalarrow14000.woff");
+  }
+</style>
+<script>
+  var emToPx = 10 / 1000; // font-size: 10px, font.em = 1000
+  var epsilon = 1;
+
+  function getBox(aId) {
+    return document.getElementById(aId).getBoundingClientRect();
+  }
+
+  setup({ explicit_done: true });
+  window.addEventListener("load", function() {
+    document.fonts.ready.then(function() {
+      window.setTimeout(runTests, 250);
+    });
+  });
+
+  function runTests() {
+    test(function() {
+      var v1 = 5000 * emToPx;
+      var tableMiddle = (getBox("table").bottom + getBox("table").top) / 2;
+      assert_approx_equals(getBox("baseline").bottom - tableMiddle,
+                           v1, epsilon, "mtable: axis height");
+    }, "AxisHeight");
+
+    done();
+  }
+</script>
+</head>
+<body>
+  <p>
+    <math style="font-family: axisheight5000-verticalarrow14000">
+      <mspace id="baseline" mathbackground="green" width="50px" height="1px"/>
+      <mtable id="table" mathbackground="blue"><mtr><mtd><mspace width="100px" height="1px"/></mtd></mtr></mtable>
+    </math>
+  </p>
+</body>
+</html>
Property changes on: trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html
___________________________________________________________________

Added: svn:eol-style

+LF \ No newline at end of property

Added: svn:mime-type

+text/html \ No newline at end of property

Modified: trunk/LayoutTests/platform/gtk/mathml/opentype/vertical-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/gtk/mathml/opentype/vertical-expected.txt (202972 => 202973)


--- trunk/LayoutTests/platform/gtk/mathml/opentype/vertical-expected.txt	2016-07-08 08:57:50 UTC (rev 202972)
+++ trunk/LayoutTests/platform/gtk/mathml/opentype/vertical-expected.txt	2016-07-08 09:37:57 UTC (rev 202973)
@@ -1,8 +1,8 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x371
-  RenderBlock {HTML} at (0,0) size 800x371
-    RenderBody {BODY} at (8,16) size 784x339
+layer at (0,0) size 800x358
+  RenderBlock {HTML} at (0,0) size 800x358
+    RenderBody {BODY} at (8,16) size 784x326
       RenderBlock {P} at (0,0) size 784x18
         RenderMathMLMath {math} at (0,2) size 100x16 [padding: 0 1 0 1]
           RenderMathMLOperator {mo} at (1,0) size 4x16
@@ -67,72 +67,72 @@
                 text run at (0,-45) width 6: "\x{27E9}"
           RenderMathMLSpace {mspace} at (98,4) size 0x8
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {P} at (0,34) size 784x30
-        RenderMathMLMath {math} at (0,0) size 142x30 [padding: 0 1 0 1]
-          RenderMathMLOperator {mo} at (1,0) size 8x30
+      RenderBlock {P} at (0,34) size 784x24
+        RenderMathMLMath {math} at (0,0) size 128x24 [padding: 0 1 0 1]
+          RenderMathMLOperator {mo} at (1,0) size 7x24
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "["
-          RenderMathMLOperator {mo} at (9,0) size 8x30
+          RenderMathMLOperator {mo} at (8,0) size 7x24
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "]"
-          RenderMathMLOperator {mo} at (17,0) size 11x30
+          RenderMathMLOperator {mo} at (15,0) size 10x24
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "{"
-          RenderMathMLOperator {mo} at (28,0) size 11x30
+          RenderMathMLOperator {mo} at (25,0) size 10x24
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "}"
-          RenderMathMLOperator {mo} at (39,0) size 10x30
+          RenderMathMLOperator {mo} at (35,0) size 8x24
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: "("
-          RenderMathMLOperator {mo} at (49,0) size 10x30
+          RenderMathMLOperator {mo} at (43,0) size 8x24
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: ")"
-          RenderMathMLOperator {mo} at (59,1) size 8x28
+          RenderMathMLOperator {mo} at (51,0) size 8x24
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "|"
-          RenderMathMLOperator {mo} at (66,0) size 9x30
+          RenderMathMLOperator {mo} at (58,0) size 9x24
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2308}"
-          RenderMathMLOperator {mo} at (74,0) size 9x30
+          RenderMathMLOperator {mo} at (66,0) size 9x24
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2309}"
-          RenderMathMLOperator {mo} at (82,0) size 9x30
+          RenderMathMLOperator {mo} at (74,0) size 9x24
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230A}"
-          RenderMathMLOperator {mo} at (90,0) size 9x30
+          RenderMathMLOperator {mo} at (82,0) size 9x24
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230B}"
-          RenderMathMLOperator {mo} at (98,0) size 12x30
+          RenderMathMLOperator {mo} at (90,0) size 10x24
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{27E6}"
-          RenderMathMLOperator {mo} at (109,0) size 12x30
+          RenderMathMLOperator {mo} at (99,0) size 10x24
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{27E7}"
-          RenderMathMLOperator {mo} at (120,0) size 11x30
+          RenderMathMLOperator {mo} at (108,0) size 10x24
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: "\x{27E8}"
-          RenderMathMLOperator {mo} at (130,0) size 11x30
+          RenderMathMLOperator {mo} at (117,0) size 10x24
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: "\x{27E9}"
-          RenderMathMLSpace {mspace} at (140,3) size 0x16
-        RenderText {#text} at (141,5) size 5x17
-          text run at (141,5) width 5: " "
-        RenderMathMLMath {math} at (145,3) size 212x23 [padding: 0 1 0 1]
+          RenderMathMLSpace {mspace} at (126,0) size 0x16
+        RenderText {#text} at (127,2) size 5x17
+          text run at (127,2) width 5: " "
+        RenderMathMLMath {math} at (131,0) size 212x23 [padding: 0 1 0 1]
           RenderMathMLOperator {mo} at (1,1) size 17x22
             RenderBlock (anonymous) at (0,0) size 8x15
               RenderText {#text} at (0,-46) size 8x106
@@ -183,93 +183,93 @@
                 text run at (0,-45) width 10: "\x{21D5}"
           RenderMathMLSpace {mspace} at (209,0) size 0x16
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {P} at (0,80) size 784x48
-        RenderMathMLMath {math} at (0,0) size 190x48 [padding: 0 1 0 1]
-          RenderMathMLOperator {mo} at (1,0) size 11x48
+      RenderBlock {P} at (0,74) size 784x42
+        RenderMathMLMath {math} at (0,0) size 160x42 [padding: 0 1 0 1]
+          RenderMathMLOperator {mo} at (1,1) size 8x40
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "["
-          RenderMathMLOperator {mo} at (12,0) size 11x48
+          RenderMathMLOperator {mo} at (9,1) size 8x40
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "]"
-          RenderMathMLOperator {mo} at (23,0) size 14x48
+          RenderMathMLOperator {mo} at (17,1) size 12x40
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "{"
-          RenderMathMLOperator {mo} at (37,0) size 14x48
+          RenderMathMLOperator {mo} at (29,1) size 12x40
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "}"
-          RenderMathMLOperator {mo} at (51,0) size 14x48
+          RenderMathMLOperator {mo} at (41,1) size 12x40
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: "("
-          RenderMathMLOperator {mo} at (65,0) size 14x48
+          RenderMathMLOperator {mo} at (53,1) size 12x40
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: ")"
-          RenderMathMLOperator {mo} at (79,3) size 8x42
+          RenderMathMLOperator {mo} at (65,0) size 8x42
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "|"
-          RenderMathMLOperator {mo} at (86,0) size 11x48
+          RenderMathMLOperator {mo} at (72,1) size 10x40
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2308}"
-          RenderMathMLOperator {mo} at (96,0) size 11x48
+          RenderMathMLOperator {mo} at (81,1) size 10x40
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2309}"
-          RenderMathMLOperator {mo} at (106,0) size 11x48
+          RenderMathMLOperator {mo} at (90,1) size 10x40
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230A}"
-          RenderMathMLOperator {mo} at (116,0) size 11x48
+          RenderMathMLOperator {mo} at (99,1) size 10x40
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230B}"
-          RenderMathMLOperator {mo} at (126,0) size 17x48
+          RenderMathMLOperator {mo} at (108,1) size 14x40
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{27E6}"
-          RenderMathMLOperator {mo} at (142,0) size 17x48
+          RenderMathMLOperator {mo} at (121,1) size 14x40
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{27E7}"
-          RenderMathMLOperator {mo} at (158,0) size 16x48
+          RenderMathMLOperator {mo} at (134,1) size 13x40
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: "\x{27E8}"
-          RenderMathMLOperator {mo} at (173,0) size 16x48
+          RenderMathMLOperator {mo} at (146,1) size 13x40
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: "\x{27E9}"
-          RenderMathMLSpace {mspace} at (188,4) size 0x24
+          RenderMathMLSpace {mspace} at (158,1) size 0x24
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {P} at (0,144) size 784x58
+      RenderBlock {P} at (0,132) size 784x58
         RenderMathMLMath {math} at (0,0) size 194x58 [padding: 0 1 0 1]
-          RenderMathMLOperator {mo} at (1,1) size 11x57
+          RenderMathMLOperator {mo} at (1,1) size 11x56
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "["
-          RenderMathMLOperator {mo} at (12,1) size 11x57
+          RenderMathMLOperator {mo} at (12,1) size 11x56
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "]"
-          RenderMathMLOperator {mo} at (23,1) size 14x57
+          RenderMathMLOperator {mo} at (23,1) size 14x56
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "{"
-          RenderMathMLOperator {mo} at (37,1) size 14x57
+          RenderMathMLOperator {mo} at (37,1) size 14x56
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "}"
-          RenderMathMLOperator {mo} at (51,1) size 14x57
+          RenderMathMLOperator {mo} at (51,1) size 14x56
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: "("
-          RenderMathMLOperator {mo} at (65,1) size 14x57
+          RenderMathMLOperator {mo} at (65,1) size 14x56
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: ")"
@@ -277,27 +277,27 @@
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "|"
-          RenderMathMLOperator {mo} at (86,1) size 12x57
+          RenderMathMLOperator {mo} at (86,1) size 12x56
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2308}"
-          RenderMathMLOperator {mo} at (97,1) size 12x57
+          RenderMathMLOperator {mo} at (97,1) size 12x56
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2309}"
-          RenderMathMLOperator {mo} at (108,1) size 12x57
+          RenderMathMLOperator {mo} at (108,1) size 12x56
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230A}"
-          RenderMathMLOperator {mo} at (119,1) size 12x57
+          RenderMathMLOperator {mo} at (119,1) size 12x56
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230B}"
-          RenderMathMLOperator {mo} at (130,1) size 17x57
+          RenderMathMLOperator {mo} at (130,1) size 17x56
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{27E6}"
-          RenderMathMLOperator {mo} at (146,1) size 17x57
+          RenderMathMLOperator {mo} at (146,1) size 17x56
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{27E7}"
@@ -363,57 +363,57 @@
                 text run at (0,-45) width 10: "\x{21D5}"
           RenderMathMLSpace {mspace} at (210,0) size 0x32
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {P} at (0,218) size 784x121
-        RenderMathMLMath {math} at (0,0) size 194x121 [padding: 0 1 0 1]
-          RenderMathMLOperator {mo} at (1,0) size 11x121
+      RenderBlock {P} at (0,206) size 784x120
+        RenderMathMLMath {math} at (0,0) size 194x120 [padding: 0 1 0 1]
+          RenderMathMLOperator {mo} at (1,0) size 11x120
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "["
-          RenderMathMLOperator {mo} at (12,0) size 11x121
+          RenderMathMLOperator {mo} at (12,0) size 11x120
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "]"
-          RenderMathMLOperator {mo} at (23,0) size 14x121
+          RenderMathMLOperator {mo} at (23,0) size 14x120
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "{"
-          RenderMathMLOperator {mo} at (37,0) size 14x121
+          RenderMathMLOperator {mo} at (37,0) size 14x120
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "}"
-          RenderMathMLOperator {mo} at (51,0) size 14x121
+          RenderMathMLOperator {mo} at (51,0) size 14x120
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: "("
-          RenderMathMLOperator {mo} at (65,0) size 14x121
+          RenderMathMLOperator {mo} at (65,0) size 14x120
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: ")"
-          RenderMathMLOperator {mo} at (79,0) size 8x121
+          RenderMathMLOperator {mo} at (79,0) size 8x120
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "|"
-          RenderMathMLOperator {mo} at (86,0) size 12x121
+          RenderMathMLOperator {mo} at (86,0) size 12x120
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2308}"
-          RenderMathMLOperator {mo} at (97,0) size 12x121
+          RenderMathMLOperator {mo} at (97,0) size 12x120
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2309}"
-          RenderMathMLOperator {mo} at (108,0) size 12x121
+          RenderMathMLOperator {mo} at (108,0) size 12x120
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230A}"
-          RenderMathMLOperator {mo} at (119,0) size 12x121
+          RenderMathMLOperator {mo} at (119,0) size 12x120
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230B}"
-          RenderMathMLOperator {mo} at (130,0) size 17x121
+          RenderMathMLOperator {mo} at (130,0) size 17x120
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{27E6}"
-          RenderMathMLOperator {mo} at (146,0) size 17x121
+          RenderMathMLOperator {mo} at (146,0) size 17x120
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{27E7}"

Modified: trunk/LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.txt (202972 => 202973)


--- trunk/LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.txt	2016-07-08 08:57:50 UTC (rev 202972)
+++ trunk/LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.txt	2016-07-08 09:37:57 UTC (rev 202973)
@@ -1,108 +1,108 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x270
-  RenderBlock {HTML} at (0,0) size 800x270
-    RenderBody {BODY} at (8,8) size 784x254
-      RenderMathMLMath {math} at (0,0) size 140x36 [padding: 0 1 0 1]
-        RenderMathMLRow {mrow} at (1,0) size 138x36
-          RenderMathMLOperator {mo} at (0,3) size 10x30
+layer at (0,0) size 800x268
+  RenderBlock {HTML} at (0,0) size 800x268
+    RenderBody {BODY} at (8,8) size 784x252
+      RenderMathMLMath {math} at (0,0) size 132x36 [padding: 0 1 0 1]
+        RenderMathMLRow {mrow} at (1,0) size 130x36
+          RenderMathMLOperator {mo} at (0,6) size 8x24
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: "("
-          RenderMathMLOperator {mo} at (10,3) size 10x30
+          RenderMathMLOperator {mo} at (8,6) size 8x24
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: ")"
-          RenderMathMLOperator {mo} at (20,3) size 11x30
+          RenderMathMLOperator {mo} at (16,6) size 10x24
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "{"
-          RenderMathMLOperator {mo} at (31,3) size 11x30
+          RenderMathMLOperator {mo} at (26,6) size 10x24
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "}"
-          RenderMathMLOperator {mo} at (42,3) size 8x30
+          RenderMathMLOperator {mo} at (36,6) size 7x24
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "["
-          RenderMathMLOperator {mo} at (50,3) size 8x30
+          RenderMathMLOperator {mo} at (43,6) size 7x24
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "]"
-          RenderMathMLOperator {mo} at (58,3) size 8x30
+          RenderMathMLOperator {mo} at (50,6) size 8x24
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2308}"
-          RenderMathMLOperator {mo} at (66,3) size 8x30
+          RenderMathMLOperator {mo} at (58,6) size 8x24
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2309}"
-          RenderMathMLOperator {mo} at (74,3) size 8x30
+          RenderMathMLOperator {mo} at (66,6) size 8x24
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230A}"
-          RenderMathMLOperator {mo} at (82,3) size 8x30
+          RenderMathMLOperator {mo} at (74,6) size 8x24
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230B}"
-          RenderMathMLOperator {mo} at (90,0) size 17x36
+          RenderMathMLOperator {mo} at (82,0) size 17x36
             RenderBlock (anonymous) at (0,0) size 11x18
               RenderText {#text} at (0,-44) size 11x106
                 text run at (0,-44) width 11: "\x{222B}"
-          RenderMathMLOperator {mo} at (106,4) size 9x28
+          RenderMathMLOperator {mo} at (98,6) size 9x24
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "|"
-          RenderMathMLOperator {mo} at (114,10) size 7x16
+          RenderMathMLOperator {mo} at (106,10) size 7x16
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: "\x{2016}"
-          RenderMathMLOperator {mo} at (120,10) size 18x16
+          RenderMathMLOperator {mo} at (112,10) size 18x16
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "\x{2225}"
-      RenderText {#text} at (139,8) size 5x17
-        text run at (139,8) width 5: " "
+      RenderText {#text} at (131,8) size 5x17
+        text run at (131,8) width 5: " "
       RenderBR {BR} at (0,0) size 0x0
-      RenderMathMLMath {math} at (0,36) size 172x143 [padding: 0 1 0 1]
-        RenderMathMLRow {mrow} at (1,0) size 170x143
-          RenderMathMLOperator {mo} at (0,0) size 14x143
+      RenderMathMLMath {math} at (0,36) size 172x142 [padding: 0 1 0 1]
+        RenderMathMLRow {mrow} at (1,0) size 170x142
+          RenderMathMLOperator {mo} at (0,0) size 14x142
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: "("
-          RenderMathMLOperator {mo} at (14,0) size 14x143
+          RenderMathMLOperator {mo} at (14,0) size 14x142
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: ")"
-          RenderMathMLOperator {mo} at (28,0) size 14x143
+          RenderMathMLOperator {mo} at (28,0) size 14x142
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "{"
-          RenderMathMLOperator {mo} at (42,0) size 14x143
+          RenderMathMLOperator {mo} at (42,0) size 14x142
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "}"
-          RenderMathMLOperator {mo} at (56,0) size 11x143
+          RenderMathMLOperator {mo} at (56,0) size 11x142
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "["
-          RenderMathMLOperator {mo} at (67,0) size 11x143
+          RenderMathMLOperator {mo} at (67,0) size 11x142
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "]"
-          RenderMathMLOperator {mo} at (78,0) size 11x143
+          RenderMathMLOperator {mo} at (78,0) size 11x142
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2308}"
-          RenderMathMLOperator {mo} at (89,0) size 11x143
+          RenderMathMLOperator {mo} at (89,0) size 11x142
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2309}"
-          RenderMathMLOperator {mo} at (100,0) size 11x143
+          RenderMathMLOperator {mo} at (100,0) size 11x142
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230A}"
-          RenderMathMLOperator {mo} at (111,0) size 11x143
+          RenderMathMLOperator {mo} at (111,0) size 11x142
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230B}"
@@ -110,7 +110,7 @@
             RenderBlock (anonymous) at (0,0) size 11x18
               RenderText {#text} at (0,-44) size 11x106
                 text run at (0,-44) width 11: "\x{222B}"
-          RenderMathMLOperator {mo} at (138,0) size 9x143
+          RenderMathMLOperator {mo} at (138,0) size 9x142
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "|"
@@ -125,45 +125,45 @@
           RenderMathMLSpace {mspace} at (169,0) size 0x76
       RenderText {#text} at (171,97) size 5x17
         text run at (171,97) width 5: " "
-      RenderMathMLMath {math} at (175,61) size 172x93 [padding: 0 1 0 1]
-        RenderMathMLRow {mrow} at (1,0) size 170x93
-          RenderMathMLOperator {mo} at (0,0) size 14x93
+      RenderMathMLMath {math} at (175,61) size 172x92 [padding: 0 1 0 1]
+        RenderMathMLRow {mrow} at (1,0) size 170x92
+          RenderMathMLOperator {mo} at (0,0) size 14x92
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: "("
-          RenderMathMLOperator {mo} at (14,0) size 14x93
+          RenderMathMLOperator {mo} at (14,0) size 14x92
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: ")"
-          RenderMathMLOperator {mo} at (28,0) size 14x93
+          RenderMathMLOperator {mo} at (28,0) size 14x92
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "{"
-          RenderMathMLOperator {mo} at (42,0) size 14x93
+          RenderMathMLOperator {mo} at (42,0) size 14x92
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "}"
-          RenderMathMLOperator {mo} at (56,0) size 11x93
+          RenderMathMLOperator {mo} at (56,0) size 11x92
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "["
-          RenderMathMLOperator {mo} at (67,0) size 11x93
+          RenderMathMLOperator {mo} at (67,0) size 11x92
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "]"
-          RenderMathMLOperator {mo} at (78,0) size 11x93
+          RenderMathMLOperator {mo} at (78,0) size 11x92
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2308}"
-          RenderMathMLOperator {mo} at (89,0) size 11x93
+          RenderMathMLOperator {mo} at (89,0) size 11x92
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2309}"
-          RenderMathMLOperator {mo} at (100,0) size 11x93
+          RenderMathMLOperator {mo} at (100,0) size 11x92
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230A}"
-          RenderMathMLOperator {mo} at (111,0) size 11x93
+          RenderMathMLOperator {mo} at (111,0) size 11x92
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230B}"
@@ -171,7 +171,7 @@
             RenderBlock (anonymous) at (0,0) size 11x18
               RenderText {#text} at (0,-44) size 11x106
                 text run at (0,-44) width 11: "\x{222B}"
-          RenderMathMLOperator {mo} at (138,0) size 9x93
+          RenderMathMLOperator {mo} at (138,0) size 9x92
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "|"
@@ -248,45 +248,45 @@
       RenderText {#text} at (493,97) size 5x17
         text run at (493,97) width 5: " "
       RenderBR {BR} at (0,0) size 0x0
-      RenderMathMLMath {math} at (0,179) size 187x76 [padding: 0 1 0 1]
-        RenderMathMLRoot {msqrt} at (1,0) size 185x76
-          RenderMathMLOperator {mo} at (17,2) size 14x74
+      RenderMathMLMath {math} at (0,178) size 187x75 [padding: 0 1 0 1]
+        RenderMathMLRoot {msqrt} at (1,0) size 185x75
+          RenderMathMLOperator {mo} at (17,2) size 14x73
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: "("
-          RenderMathMLOperator {mo} at (31,2) size 14x74
+          RenderMathMLOperator {mo} at (31,2) size 14x73
             RenderBlock (anonymous) at (0,0) size 6x16
               RenderText {#text} at (0,-45) size 6x106
                 text run at (0,-45) width 6: ")"
-          RenderMathMLOperator {mo} at (45,2) size 14x74
+          RenderMathMLOperator {mo} at (45,2) size 14x73
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "{"
-          RenderMathMLOperator {mo} at (59,2) size 14x74
+          RenderMathMLOperator {mo} at (59,2) size 14x73
             RenderBlock (anonymous) at (0,0) size 8x16
               RenderText {#text} at (0,-45) size 8x106
                 text run at (0,-45) width 8: "}"
-          RenderMathMLOperator {mo} at (73,2) size 11x74
+          RenderMathMLOperator {mo} at (73,2) size 11x73
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "["
-          RenderMathMLOperator {mo} at (84,2) size 11x74
+          RenderMathMLOperator {mo} at (84,2) size 11x73
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "]"
-          RenderMathMLOperator {mo} at (95,2) size 11x74
+          RenderMathMLOperator {mo} at (95,2) size 11x73
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2308}"
-          RenderMathMLOperator {mo} at (106,2) size 11x74
+          RenderMathMLOperator {mo} at (106,2) size 11x73
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{2309}"
-          RenderMathMLOperator {mo} at (117,2) size 11x74
+          RenderMathMLOperator {mo} at (117,2) size 11x73
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230A}"
-          RenderMathMLOperator {mo} at (128,2) size 11x74
+          RenderMathMLOperator {mo} at (128,2) size 11x73
             RenderBlock (anonymous) at (0,0) size 7x16
               RenderText {#text} at (0,-45) size 7x106
                 text run at (0,-45) width 7: "\x{230B}"
@@ -294,7 +294,7 @@
             RenderBlock (anonymous) at (0,0) size 11x18
               RenderText {#text} at (0,-44) size 11x106
                 text run at (0,-44) width 11: "\x{222B}"
-          RenderMathMLOperator {mo} at (155,2) size 9x74
+          RenderMathMLOperator {mo} at (155,2) size 9x73
             RenderBlock (anonymous) at (0,0) size 4x16
               RenderText {#text} at (0,-45) size 4x106
                 text run at (0,-45) width 4: "|"

Modified: trunk/Source/WebCore/ChangeLog (202972 => 202973)


--- trunk/Source/WebCore/ChangeLog	2016-07-08 08:57:50 UTC (rev 202972)
+++ trunk/Source/WebCore/ChangeLog	2016-07-08 09:37:57 UTC (rev 202973)
@@ -1,3 +1,25 @@
+2016-07-08  Frederic Wang  <[email protected]>
+
+        Use OpenType MATH constant AxisHeight.
+        https://bugs.webkit.org/show_bug.cgi?id=133567
+
+        Reviewed by Brent Fulgham.
+
+        We make RenderMathMLOperator and RenderMathMLTable use the OpenType MATH constant AxisHeight.
+        These are the only remaining cases to handle since RenderMathMLFraction already uses that constant.
+
+        Tests: imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html
+              imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html
+
+        * rendering/mathml/RenderMathMLBlock.cpp: Make RenderMathMLTable use the math axis
+        for its vertical alignment and update a bit the comments.
+        (WebCore::axisHeight): Move the code in a static function that can be called by
+        RenderMathMLBlock and RenderMathMLTable.
+        (WebCore::RenderMathMLBlock::mathAxisHeight): Use axisHeight.
+        (WebCore::RenderMathMLTable::firstLineBaseline): Ditto.
+        * rendering/mathml/RenderMathMLOperator.cpp:
+        (WebCore::RenderMathMLOperator::stretchTo):
+
 2016-07-08  Manuel Rego Casasnovas  <[email protected]>
 
         [css-grid] Disallow repeat() in grid-template shorthand

Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp (202972 => 202973)


--- trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp	2016-07-08 08:57:50 UTC (rev 202972)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp	2016-07-08 09:37:57 UTC (rev 202973)
@@ -67,15 +67,23 @@
     return is<Element>(child.node());
 }
 
-LayoutUnit RenderMathMLBlock::mathAxisHeight() const
+static LayoutUnit axisHeight(const RenderStyle& style)
 {
-    const auto& primaryFont = style().fontCascade().primaryFont();
+    // If we have a MATH table we just return the AxisHeight constant.
+    const auto& primaryFont = style.fontCascade().primaryFont();
     if (auto* mathData = primaryFont.mathData())
         return mathData->getMathConstant(primaryFont, OpenTypeMathData::AxisHeight);
 
-    return style().fontMetrics().xHeight() / 2;
+    // Otherwise, the idea is to try and use the middle of operators as the math axis which we thus approximate by "half of the x-height".
+    // Note that Gecko has a slower but more accurate version that measures half of the height of U+2212 MINUS SIGN.
+    return style.fontMetrics().xHeight() / 2;
 }
 
+LayoutUnit RenderMathMLBlock::mathAxisHeight() const
+{
+    return axisHeight(style());
+}
+
 LayoutUnit RenderMathMLBlock::mirrorIfNeeded(LayoutUnit horizontalOffset, LayoutUnit boxWidth) const
 {
     if (style().direction() == RTL)
@@ -304,10 +312,9 @@
 
 Optional<int> RenderMathMLTable::firstLineBaseline() const
 {
-    // In legal MathML, we'll have a MathML parent. That RenderFlexibleBox parent will use our firstLineBaseline() for baseline alignment, per
-    // http://dev.w3.org/csswg/css3-flexbox/#flex-baselines. We want to vertically center an <mtable>, such as a matrix. Essentially the whole <mtable> element fits on a
-    // single line, whose baseline gives this centering. This is different than RenderTable::firstLineBoxBaseline, which returns the baseline of the first row of a <table>.
-    return (logicalHeight() + style().fontMetrics().xHeight()) / 2;
+    // By default the vertical center of <mtable> is aligned on the math axis.
+    // This is different than RenderTable::firstLineBoxBaseline, which returns the baseline of the first row of a <table>.
+    return Optional<int>(logicalHeight() / 2 + axisHeight(style()));
 }
 
 void RenderMathMLBlock::layoutItems(bool relayoutChildren)

Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp (202972 => 202973)


--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp	2016-07-08 08:57:50 UTC (rev 202972)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp	2016-07-08 09:37:57 UTC (rev 202973)
@@ -185,8 +185,7 @@
     setOperatorProperties();
     if (hasOperatorFlag(MathMLOperatorDictionary::Symmetric)) {
         // We make the operator stretch symmetrically above and below the axis.
-        // FIXME: We should read the axis from the MATH table (https://bugs.webkit.org/show_bug.cgi?id=122297). For now, we use the same value as in RenderMathMLFraction::firstLineBaseline().
-        LayoutUnit axis = style().fontMetrics().xHeight() / 2;
+        LayoutUnit axis = mathAxisHeight();
         LayoutUnit halfStretchSize = std::max(m_stretchHeightAboveBaseline - axis, m_stretchDepthBelowBaseline + axis);
         m_stretchHeightAboveBaseline = halfStretchSize + axis;
         m_stretchDepthBelowBaseline = halfStretchSize - axis;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to