<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[165461] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/165461">165461</a></dd>
<dt>Author</dt> <dd>fred.wang@free.fr</dd>
<dt>Date</dt> <dd>2014-03-11 23:46:52 -0700 (Tue, 11 Mar 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Implement MathML spacing around operators .
https://bugs.webkit.org/show_bug.cgi?id=115787
Reviewed by Chris Fleizach.
Source/WebCore:
This makes the <mo> operators use the lspace/rspace properties to
determine their spacing. The spacing is now consistent with the one
of <mfenced> and as a consequence bug 118843 is fixed. This also ensures
that the rendering of <mo> elements is updated when the form or
attributes are changed.
Tests: mathml/presentation/dir-mo.html
mathml/presentation/mo-form-dynamic.html
mathml/presentation/mo-form-minus-plus.html
mathml/presentation/mo-form.html
mathml/presentation/mo-lspace-rspace-dynamic.html
mathml/presentation/mo-lspace-rspace.html
mathml/presentation/mo-whitespaces.html
* css/mathml.css:
* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::childrenChanged):
* mathml/MathMLInlineContainerElement.h:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry):
(WebCore::RenderMathMLOperator::SetOperatorProperties):
(WebCore::RenderMathMLOperator::updateFromElement):
(WebCore::RenderMathMLOperator::updateOperatorProperties):
(WebCore::RenderMathMLOperator::updateStyle):
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::updateOperatorProperties):
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLToken.h:
LayoutTests:
Add many new tests to verify the form/lspace/rspace properties of the
<mo> element and that the whitespace of the text content is collapsed.
Update fenced-mi now that bug 118843 is fixed.
* mathml/presentation/dir-mo-expected.html: Added.
* mathml/presentation/dir-mo.html: Added.
* mathml/presentation/fenced-expected.html:
* mathml/presentation/fenced-mi-expected.html:
* mathml/presentation/mo-form-dynamic-expected.html: Added.
* mathml/presentation/mo-form-dynamic.html: Added.
* mathml/presentation/mo-form-expected.html: Added.
* mathml/presentation/mo-form-minus-plus-expected.html: Added.
* mathml/presentation/mo-form-minus-plus.html: Added.
* mathml/presentation/mo-form.html: Added.
* mathml/presentation/mo-lspace-rspace-dynamic-expected.html: Added.
* mathml/presentation/mo-lspace-rspace-dynamic.html: Added.
* mathml/presentation/mo-lspace-rspace-expected.html: Added.
* mathml/presentation/mo-lspace-rspace.html: Added.
* mathml/presentation/mo-whitespaces-expected.html: Added.
* mathml/presentation/mo-whitespaces.html: Added.
* platform/mac/mathml/presentation/mo-stretch-expected.txt: update reference.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationfencedexpectedhtml">trunk/LayoutTests/mathml/presentation/fenced-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationfencedmiexpectedhtml">trunk/LayoutTests/mathml/presentation/fenced-mi-expected.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacmathmlpresentationmostretchexpectedtxt">trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssmathmlcss">trunk/Source/WebCore/css/mathml.css</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLInlineContainerElementcpp">trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLInlineContainerElementh">trunk/Source/WebCore/mathml/MathMLInlineContainerElement.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLOperatorcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLOperatorh">trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLRowcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLRowh">trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLTokenh">trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsmathmlpresentationdirmoexpectedhtml">trunk/LayoutTests/mathml/presentation/dir-mo-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationdirmohtml">trunk/LayoutTests/mathml/presentation/dir-mo.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmoformdynamicexpectedhtml">trunk/LayoutTests/mathml/presentation/mo-form-dynamic-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmoformdynamichtml">trunk/LayoutTests/mathml/presentation/mo-form-dynamic.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmoformexpectedhtml">trunk/LayoutTests/mathml/presentation/mo-form-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmoformminusplusexpectedhtml">trunk/LayoutTests/mathml/presentation/mo-form-minus-plus-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmoformminusplushtml">trunk/LayoutTests/mathml/presentation/mo-form-minus-plus.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmoformhtml">trunk/LayoutTests/mathml/presentation/mo-form.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmolspacerspacedynamicexpectedhtml">trunk/LayoutTests/mathml/presentation/mo-lspace-rspace-dynamic-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmolspacerspacedynamichtml">trunk/LayoutTests/mathml/presentation/mo-lspace-rspace-dynamic.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmolspacerspaceexpectedhtml">trunk/LayoutTests/mathml/presentation/mo-lspace-rspace-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmolspacerspacehtml">trunk/LayoutTests/mathml/presentation/mo-lspace-rspace.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmowhitespacesexpectedhtml">trunk/LayoutTests/mathml/presentation/mo-whitespaces-expected.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationmowhitespaceshtml">trunk/LayoutTests/mathml/presentation/mo-whitespaces.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (165460 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-03-12 03:47:16 UTC (rev 165460)
+++ trunk/LayoutTests/ChangeLog        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2014-03-11 Frédéric Wang <fred.wang@free.fr>
+
+ Implement MathML spacing around operators .
+ https://bugs.webkit.org/show_bug.cgi?id=115787
+
+ Reviewed by Chris Fleizach.
+
+ Add many new tests to verify the form/lspace/rspace properties of the
+ <mo> element and that the whitespace of the text content is collapsed.
+ Update fenced-mi now that bug 118843 is fixed.
+
+ * mathml/presentation/dir-mo-expected.html: Added.
+ * mathml/presentation/dir-mo.html: Added.
+ * mathml/presentation/fenced-expected.html:
+ * mathml/presentation/fenced-mi-expected.html:
+ * mathml/presentation/mo-form-dynamic-expected.html: Added.
+ * mathml/presentation/mo-form-dynamic.html: Added.
+ * mathml/presentation/mo-form-expected.html: Added.
+ * mathml/presentation/mo-form-minus-plus-expected.html: Added.
+ * mathml/presentation/mo-form-minus-plus.html: Added.
+ * mathml/presentation/mo-form.html: Added.
+ * mathml/presentation/mo-lspace-rspace-dynamic-expected.html: Added.
+ * mathml/presentation/mo-lspace-rspace-dynamic.html: Added.
+ * mathml/presentation/mo-lspace-rspace-expected.html: Added.
+ * mathml/presentation/mo-lspace-rspace.html: Added.
+ * mathml/presentation/mo-whitespaces-expected.html: Added.
+ * mathml/presentation/mo-whitespaces.html: Added.
+ * platform/mac/mathml/presentation/mo-stretch-expected.txt: update reference.
+
</ins><span class="cx"> 2014-03-11 Manuel Rego Casasnovas <rego@igalia.com>
</span><span class="cx">
</span><span class="cx"> [CSS Grid Layout] Add layout test for anonymous grid items
</span></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationdirmoexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/dir-mo-expected.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/dir-mo-expected.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/dir-mo-expected.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>dir mo</title>
+ <meta charset="utf-8"/>
+ </head>
+ <body>
+
+ <!-- This checks prefix form in RTL mode. -->
+ _<math dir="rtl"><mo style="-webkit-margin-start: 0em; -webkit-margin-end: 0.055555555555555em;" lspace="0em" rspace="0em">+</mo><mi>x</mi></math>_
+
+ <br/>
+
+ <!-- This checks leading and trailing spaces in RTL mode. -->
+ _<math dir="rtl"><mi>x</mi><mo style="-webkit-margin-start: 1em; -webkit-margin-end: 2em;" lspace="0em" rspace="0em">+</mo><mi>y</mi></math>_
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationdirmohtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/dir-mo.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/dir-mo.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/dir-mo.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>dir mo</title>
+ <meta charset="utf-8"/>
+ </head>
+ <body>
+
+ <!-- This checks prefix form in RTL mode. -->
+ _<math dir="rtl"><mo>+</mo><mi>x</mi></math>_
+
+ <br/>
+
+ <!-- This checks leading and trailing spaces in RTL mode. -->
+ _<math dir="rtl"><mi>x</mi><mo lspace="1em" rspace="2em">+</mo><mi>y</mi></math>_
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationfencedexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/presentation/fenced-expected.html (165460 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/fenced-expected.html        2014-03-12 03:47:16 UTC (rev 165460)
+++ trunk/LayoutTests/mathml/presentation/fenced-expected.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -10,17 +10,14 @@
</span><span class="cx"> <mrow> and <mo> elements, as described in the MathML specification.
</span><span class="cx"> Note that the MathML operator dictionary defines "(" and ")" as fences,
</span><span class="cx"> so we don't need an explicit "fence" attribute on the <mo> elements.-->
</span><del>- <!-- FIXME: <mfenced> and its expanded form do not use the same spacing,
- so -webkit-margin-start and -webkit-margin-end are currently set
- explicitly below. See bug 118843. -->
</del><span class="cx"> <math>
</span><span class="cx"> <mrow>
</span><span class="cx"> <mo>(</mo>
</span><span class="cx"> <mrow>
</span><span class="cx"> <mspace width="48px" height="24px" depth="24px" mathbackground="#0f0"/>
</span><del>- <mo separator="true" style="-webkit-margin-start: 0; -webkit-margin-end: .25em;">,</mo>
</del><ins>+ <mo separator="true">,</mo>
</ins><span class="cx"> <mspace width="48px" height="24px" depth="24px" mathbackground="#0f0"/>
</span><del>- <mo separator="true" style="-webkit-margin-start: 0; -webkit-margin-end: .25em;">,</mo>
</del><ins>+ <mo separator="true">,</mo>
</ins><span class="cx"> <mspace width="48px" height="24px" depth="24px" mathbackground="#0f0"/>
</span><span class="cx"> </mrow>
</span><span class="cx"> <mo>)</mo>
</span></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationfencedmiexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/presentation/fenced-mi-expected.html (165460 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/fenced-mi-expected.html        2014-03-12 03:47:16 UTC (rev 165460)
+++ trunk/LayoutTests/mathml/presentation/fenced-mi-expected.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -10,9 +10,6 @@
</span><span class="cx"> <mrow> and <mo> elements, as described in the MathML specification.
</span><span class="cx"> The MathML operator dictionary defines '(', ')', '{', '}' as fences,
</span><span class="cx"> so we don't need an explicit "fence" attribute on the <mo> elements.-->
</span><del>- <!-- FIXME: <mfenced> and its expanded form do not use the same spacing,
- so -webkit-margin-start and -webkit-margin-end are currently set
- explicitly below. See bug 118843. -->
</del><span class="cx">
</span><span class="cx"> <p>
</span><span class="cx"> <math>
</span><span class="lines">@@ -20,9 +17,9 @@
</span><span class="cx"> <mo>(</mo>
</span><span class="cx"> <mrow>
</span><span class="cx"> <mi>x</mi>
</span><del>- <mo separator="true" style="-webkit-margin-start: 0; -webkit-margin-end: .25em;">,</mo>
</del><ins>+ <mo separator="true">,</mo>
</ins><span class="cx"> <mi>y</mi>
</span><del>- <mo separator="true" style="-webkit-margin-start: 0; -webkit-margin-end: .25em;">,</mo>
</del><ins>+ <mo separator="true">,</mo>
</ins><span class="cx"> <mi>z</mi>
</span><span class="cx"> </mrow>
</span><span class="cx"> <mo>)</mo>
</span><span class="lines">@@ -36,9 +33,9 @@
</span><span class="cx"> <mo>{</mo>
</span><span class="cx"> <mrow>
</span><span class="cx"> <mi>x</mi>
</span><del>- <mo separator="true" style="-webkit-margin-start: 0; -webkit-margin-end: .25em;">1</mo>
</del><ins>+ <mo separator="true">1</mo>
</ins><span class="cx"> <mi>y</mi>
</span><del>- <mo separator="true" style="-webkit-margin-start: 0; -webkit-margin-end: .25em;">2</mo>
</del><ins>+ <mo separator="true">2</mo>
</ins><span class="cx"> <mi>z</mi>
</span><span class="cx"> </mrow>
</span><span class="cx"> <mo>}</mo>
</span><span class="lines">@@ -52,15 +49,15 @@
</span><span class="cx"> <mo>(</mo>
</span><span class="cx"> <mrow>
</span><span class="cx"> <mi>x</mi>
</span><del>- <mo separator="true" style="-webkit-margin-start: 0; -webkit-margin-end: .25em;">1</mo>
</del><ins>+ <mo separator="true">1</mo>
</ins><span class="cx"> <mi>y</mi>
</span><del>- <mo separator="true" style="-webkit-margin-start: 0; -webkit-margin-end: .25em;">2</mo>
</del><ins>+ <mo separator="true">2</mo>
</ins><span class="cx"> <mi>z</mi>
</span><del>- <mo separator="true" style="-webkit-margin-start: 0; -webkit-margin-end: .25em;">3</mo>
</del><ins>+ <mo separator="true">3</mo>
</ins><span class="cx"> <mi>u</mi>
</span><del>- <mo separator="true" style="-webkit-margin-start: 0; -webkit-margin-end: .25em;">3</mo>
</del><ins>+ <mo separator="true">3</mo>
</ins><span class="cx"> <mi>v</mi>
</span><del>- <mo separator="true" style="-webkit-margin-start: 0; -webkit-margin-end: .25em;">3</mo>
</del><ins>+ <mo separator="true">3</mo>
</ins><span class="cx"> <mi>w</mi>
</span><span class="cx"> </mrow>
</span><span class="cx"> <mo>)</mo>
</span></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationmoformdynamicexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-form-dynamic-expected.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-form-dynamic-expected.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-form-dynamic-expected.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>form dynamic</title>
+ <meta charset="utf-8"/>
+ </head>
+ <body>
+
+ _<math><merror><mi>x</mi><mo>+</mo><mi>y</mi></merror></math>_
+ _<math><mi>x</mi><mo>+</mo><mi>y</mi></math>_
+ _<math><mphantom><mi>x</mi><mo>+</mo><mi>y</mi></mphantom></math>_
+ _<math><mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow></math>_
+ _<math><msqrt><mi>x</mi><mo>+</mo><mi>y</mi></msqrt></math>_
+ _<math><mstyle><mi>x</mi><mo>+</mo><mi>y</mi></mstyle></math>_
+
+ _<math><merror><mo>−</mo><mi>y</mi></merror></math>_
+ _<math><mo>−</mo><mi>y</mi></math>_
+ _<math><mphantom><mo>−</mo><mi>y</mi></mphantom></math>_
+ _<math><mrow><mo>−</mo><mi>y</mi></mrow></math>_
+ _<math><msqrt><mo>−</mo><mi>y</mi></msqrt></math>_
+ _<math><mstyle><mo>−</mo><mi>y</mi></mstyle></math>_
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationmoformdynamichtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-form-dynamic.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-form-dynamic.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-form-dynamic.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>form dynamic</title>
+ <meta charset="utf-8"/>
+ <script>
+ function test()
+ {
+ for (var i = 1; i <= 6; i++) {
+ var row = document.getElementById("row" + i);
+ var x = document.getElementById("x" + i);
+ x.parentNode.removeChild(x);
+ row.insertBefore(x, row.firstElementChild);
+ }
+ }
+ </script>
+ </head>
+ <body onload="test()">
+
+ <!-- This test verifies that the form of the operators (and thus their spacing) is updated when you change the child list. -->
+ <!-- The test should render the same as the static reference -->
+
+ _<math><merror id="row1"><mo>+</mo><mi>y</mi></merror></math>_
+ _<math id="row2"><mo>+</mo><mi>y</mi></math>_
+ _<math><mphantom id="row3"><mo>+</mo><mi>y</mi></mphantom></math>_
+ _<math><mrow id="row4"><mo>+</mo><mi>y</mi></mrow></math>_
+ _<math><msqrt id="row5"><mo>+</mo><mi>y</mi></msqrt></math>_
+ _<math><mstyle id="row6"><mo>+</mo><mi>y</mi></mstyle></math>_
+
+ _<math><merror><mi id="x1">x</mi><mo>−</mo><mi>y</mi></merror></math>_
+ _<math><mi id="x2">x</mi><mo>−</mo><mi>y</mi></math>_
+ _<math><mphantom><mi id="x3">x</mi><mo>−</mo><mi>y</mi></mphantom></math>_
+ _<math><mrow><mi id="x4">x</mi><mo>−</mo><mi>y</mi></mrow></math>_
+ _<math><msqrt><mi id="x5">x</mi><mo>−</mo><mi>y</mi></msqrt></math>_
+ _<math><mstyle><mi id="x6">x</mi><mo>−</mo><mi>y</mi></mstyle></math>_
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationmoformexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-form-expected.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-form-expected.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-form-expected.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>attribute form</title>
+ <meta charset="utf-8"/>
+ </head>
+ <body>
+
+ <!-- This checks the effect of @form on a prefix operator. -->
+ _<math><mo lspace="thickmathspace" rspace="thickmathspace">∇</mo></math>_
+ _<math><mo lspace="verythinmathspace" rspace="veryverythinmathspace">∇</mo></math>_
+ _<math><mo lspace="thickmathspace" rspace="thickmathspace">∇</mo></math>_
+
+ <!-- This checks the effect of @form on an infix operator. -->
+ _<math><mo lspace="mediummathspace" rspace="mediummathspace">⋉</mo></math>_
+ _<math><mo lspace="thickmathspace" rspace="thickmathspace">⋉</mo></math>_
+ _<math><mo lspace="thickmathspace" rspace="thickmathspace">⋉</mo></math>_
+
+ <!-- This checks the effect of @form on a postfix operator. -->
+ _<math><mo lspace="thickmathspace" rspace="thickmathspace">♭</mo></math>_
+ _<math><mo lspace="thickmathspace" rspace="thickmathspace">♭</mo></math>_
+ _<math><mo lspace="0em" rspace="verythinmathspace">♭</mo></math>_
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationmoformminusplusexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-form-minus-plus-expected.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-form-minus-plus-expected.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-form-minus-plus-expected.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>form</title>
+ <meta charset="utf-8"/>
+ </head>
+ <body>
+
+ <!-- These operators should have form "prefix" -->
+
+ _<math><merror><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">−</mo><mi>x</mi></merror></math>_
+ _<math><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">−</mo><mi>x</mi></math>_
+ _<math><mphantom><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">−</mo><mi>x</mi></mphantom></math>_
+ _<math><mrow><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">−</mo><mi>x</mi></mrow></math>_
+ _<math><msqrt><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">−</mo><mi>x</mi></msqrt></math>_
+ _<math><mstyle><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">−</mo><mi>x</mi></mstyle></math>_
+
+ <br/>
+
+ _<math><merror><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">+</mo><mi>x</mi></merror></math>_
+ _<math><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">+</mo><mi>x</mi></math>_
+ _<math><mphantom><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">+</mo><mi>x</mi></mphantom></math>_
+ _<math><mrow><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">+</mo><mi>x</mi></mrow></math>_
+ _<math><msqrt><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">+</mo><mi>x</mi></msqrt></math>_
+ _<math><mstyle><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">+</mo><mi>x</mi></mstyle></math>_
+
+ <br/>
+
+ _<math><merror><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">±</mo><mi>x</mi></merror></math>_
+ _<math><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">±</mo><mi>x</mi></math>_
+ _<math><mphantom><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">±</mo><mi>x</mi></mphantom></math>_
+ _<math><mrow><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">±</mo><mi>x</mi></mrow></math>_
+ _<math><msqrt><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">±</mo><mi>x</mi></msqrt></math>_
+ _<math><mstyle><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">±</mo><mi>x</mi></mstyle></math>_
+
+ <br/>
+
+ _<math><merror><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">∓</mo><mi>x</mi></merror></math>_
+ _<math><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">∓</mo><mi>x</mi></math>_
+ _<math><mphantom><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">∓</mo><mi>x</mi></mphantom></math>_
+ _<math><mrow><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">∓</mo><mi>x</mi></mrow></math>_
+ _<math><msqrt><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">∓</mo><mi>x</mi></msqrt></math>_
+ _<math><mstyle><mo form="prefix" lspace="0em" rspace="veryverythinmathspace">∓</mo><mi>x</mi></mstyle></math>_
+
+ <br/>
+
+ <!-- These operators should have form "infix" -->
+
+ _<math><merror><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">−</mo><mi>y</mi></merror></math>_
+ _<math><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">−</mo><mi>y</mi></math>_
+ _<math><mphantom><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">−</mo><mi>y</mi></mphantom></math>_
+ _<math><mrow><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">−</mo><mi>y</mi></mrow></math>_
+ _<math><msqrt><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">−</mo><mi>y</mi></msqrt></math>_
+ _<math><mstyle><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">−</mo><mi>y</mi></mstyle></math>_
+
+ <br/>
+
+ _<math><merror><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">+</mo><mi>y</mi></merror></math>_
+ _<math><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">+</mo><mi>y</mi></math>_
+ _<math><mphantom><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">+</mo><mi>y</mi></mphantom></math>_
+ _<math><mrow><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">+</mo><mi>y</mi></mrow></math>_
+ _<math><msqrt><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">+</mo><mi>y</mi></msqrt></math>_
+ _<math><mstyle><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">+</mo><mi>y</mi></mstyle></math>_
+
+ <br/>
+
+ _<math><merror><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">±</mo><mi>y</mi></merror></math>_
+ _<math><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">±</mo><mi>y</mi></math>_
+ _<math><mphantom><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">±</mo><mi>y</mi></mphantom></math>_
+ _<math><mrow><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">±</mo><mi>y</mi></mrow></math>_
+ _<math><msqrt><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">±</mo><mi>y</mi></msqrt></math>_
+ _<math><mstyle><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">±</mo><mi>y</mi></mstyle></math>_
+
+ <br/>
+
+ _<math><merror><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">∓</mo><mi>y</mi></merror></math>_
+ _<math><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">∓</mo><mi>y</mi></math>_
+ _<math><mphantom><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">∓</mo><mi>y</mi></mphantom></math>_
+ _<math><mrow><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">∓</mo><mi>y</mi></mrow></math>_
+ _<math><msqrt><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">∓</mo><mi>y</mi></msqrt></math>_
+ _<math><mstyle><mi>x</mi><mo form="infix" lspace="mediummathspace" rspace="mediummathspace">∓</mo><mi>y</mi></mstyle></math>_
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationmoformminusplushtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-form-minus-plus.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-form-minus-plus.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-form-minus-plus.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>form</title>
+ <meta charset="utf-8"/>
+ </head>
+ <body>
+
+ <!-- These operators should have form "prefix" -->
+
+ _<math><merror><mo>−</mo><mi>x</mi></merror></math>_
+ _<math><mo>−</mo><mi>x</mi></math>_
+ _<math><mphantom><mo>−</mo><mi>x</mi></mphantom></math>_
+ _<math><mrow><mo>−</mo><mi>x</mi></mrow></math>_
+ _<math><msqrt><mo>−</mo><mi>x</mi></msqrt></math>_
+ _<math><mstyle><mo>−</mo><mi>x</mi></mstyle></math>_
+
+ <br/>
+
+ _<math><merror><mo>+</mo><mi>x</mi></merror></math>_
+ _<math><mo>+</mo><mi>x</mi></math>_
+ _<math><mphantom><mo>+</mo><mi>x</mi></mphantom></math>_
+ _<math><mrow><mo>+</mo><mi>x</mi></mrow></math>_
+ _<math><msqrt><mo>+</mo><mi>x</mi></msqrt></math>_
+ _<math><mstyle><mo>+</mo><mi>x</mi></mstyle></math>_
+
+ <br/>
+
+ _<math><merror><mo>±</mo><mi>x</mi></merror></math>_
+ _<math><mo>±</mo><mi>x</mi></math>_
+ _<math><mphantom><mo>±</mo><mi>x</mi></mphantom></math>_
+ _<math><mrow><mo>±</mo><mi>x</mi></mrow></math>_
+ _<math><msqrt><mo>±</mo><mi>x</mi></msqrt></math>_
+ _<math><mstyle><mo>±</mo><mi>x</mi></mstyle></math>_
+
+ <br/>
+
+ _<math><merror><mo>∓</mo><mi>x</mi></merror></math>_
+ _<math><mo>∓</mo><mi>x</mi></math>_
+ _<math><mphantom><mo>∓</mo><mi>x</mi></mphantom></math>_
+ _<math><mrow><mo>∓</mo><mi>x</mi></mrow></math>_
+ _<math><msqrt><mo>∓</mo><mi>x</mi></msqrt></math>_
+ _<math><mstyle><mo>∓</mo><mi>x</mi></mstyle></math>_
+
+ <br/>
+
+ <!-- These operators should have form "infix" -->
+
+ _<math><merror><mi>x</mi><mo>−</mo><mi>y</mi></merror></math>_
+ _<math><mi>x</mi><mo>−</mo><mi>y</mi></math>_
+ _<math><mphantom><mi>x</mi><mo>−</mo><mi>y</mi></mphantom></math>_
+ _<math><mrow><mi>x</mi><mo>−</mo><mi>y</mi></mrow></math>_
+ _<math><msqrt><mi>x</mi><mo>−</mo><mi>y</mi></msqrt></math>_
+ _<math><mstyle><mi>x</mi><mo>−</mo><mi>y</mi></mstyle></math>_
+
+ <br/>
+
+ _<math><merror><mi>x</mi><mo>+</mo><mi>y</mi></merror></math>_
+ _<math><mi>x</mi><mo>+</mo><mi>y</mi></math>_
+ _<math><mphantom><mi>x</mi><mo>+</mo><mi>y</mi></mphantom></math>_
+ _<math><mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow></math>_
+ _<math><msqrt><mi>x</mi><mo>+</mo><mi>y</mi></msqrt></math>_
+ _<math><mstyle><mi>x</mi><mo>+</mo><mi>y</mi></mstyle></math>_
+
+ <br/>
+
+ _<math><merror><mi>x</mi><mo>±</mo><mi>y</mi></merror></math>_
+ _<math><mi>x</mi><mo>±</mo><mi>y</mi></math>_
+ _<math><mphantom><mi>x</mi><mo>±</mo><mi>y</mi></mphantom></math>_
+ _<math><mrow><mi>x</mi><mo>±</mo><mi>y</mi></mrow></math>_
+ _<math><msqrt><mi>x</mi><mo>±</mo><mi>y</mi></msqrt></math>_
+ _<math><mstyle><mi>x</mi><mo>±</mo><mi>y</mi></mstyle></math>_
+
+ <br/>
+
+ _<math><merror><mi>x</mi><mo>∓</mo><mi>y</mi></merror></math>_
+ _<math><mi>x</mi><mo>∓</mo><mi>y</mi></math>_
+ _<math><mphantom><mi>x</mi><mo>∓</mo><mi>y</mi></mphantom></math>_
+ _<math><mrow><mi>x</mi><mo>∓</mo><mi>y</mi></mrow></math>_
+ _<math><msqrt><mi>x</mi><mo>∓</mo><mi>y</mi></msqrt></math>_
+ _<math><mstyle><mi>x</mi><mo>∓</mo><mi>y</mi></mstyle></math>_
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationmoformhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-form.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-form.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-form.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>attribute form</title>
+ <meta charset="utf-8"/>
+ </head>
+ <body>
+
+ <!-- This checks the effect of @form on a prefix operator. -->
+ _<math><mo form="infix">∇</mo></math>_
+ _<math><mo form="prefix">∇</mo></math>_
+ _<math><mo form="postfix">∇</mo></math>_
+
+ <!-- This checks the effect of @form on an infix operator. -->
+ _<math><mo form="infix">⋉</mo></math>_
+ _<math><mo form="prefix">⋉</mo></math>_
+ _<math><mo form="postfix">⋉</mo></math>_
+
+ <!-- This checks the effect of @form on a postfix operator. -->
+ _<math><mo form="infix">♭</mo></math>_
+ _<math><mo form="prefix">♭</mo></math>_
+ _<math><mo form="postfix">♭</mo></math>_
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationmolspacerspacedynamicexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-lspace-rspace-dynamic-expected.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-lspace-rspace-dynamic-expected.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-lspace-rspace-dynamic-expected.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>attribute lspace rspace dynamic</title>
+ <meta charset="utf-8"/>
+ </head>
+ <body>
+
+ <math><mi>x</mi><mo lspace="3em">X</mo><mi>y</mi></math><br/>
+ <math><mi>x</mi><mo rspace="5em">X</mo><mi>y</mi></math><br/>
+ <math><mi>x</mi><mo lspace="3em" rspace="5em">X</mo><mi>y</mi></math><br/>
+ <math><mi>x</mi><mo rspace="5em">X</mo><mi>y</mi></math><br/>
+ <math><mi>x</mi><mo lspace="3em">X</mo><mi>y</mi></math><br/>
+ <math><mi>x</mi><mo>X</mo><mi>y</mi></math>
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationmolspacerspacedynamichtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-lspace-rspace-dynamic.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-lspace-rspace-dynamic.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-lspace-rspace-dynamic.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>attribute lspace rspace dynamic</title>
+ <meta charset="utf-8"/>
+ <script>
+ function test()
+ {
+ document.getElementById("mo1").setAttribute("lspace", "3em");
+ document.getElementById("mo2").setAttribute("rspace", "5em");
+ document.getElementById("mo3").setAttribute("lspace", "3em");
+ document.getElementById("mo3").setAttribute("rspace", "5em");
+ document.getElementById("mo4").removeAttribute("lspace");
+ document.getElementById("mo5").removeAttribute("rspace");
+ document.getElementById("mo6").removeAttribute("lspace");
+ document.getElementById("mo6").removeAttribute("rspace");
+ }
+ </script>
+ </head>
+ <body onload="test()">
+
+ <!-- This tests adding/removing lspace/rspace. This should render the same as the static reference. -->
+ <math><mi>x</mi><mo id="mo1">X</mo><mi>y</mi></math><br/>
+ <math><mi>x</mi><mo id="mo2">X</mo><mi>y</mi></math><br/>
+ <math><mi>x</mi><mo id="mo3">X</mo><mi>y</mi></math><br/>
+ <math><mi>x</mi><mo id="mo4" lspace="3em" rspace="5em">X</mo><mi>y</mi></math><br/>
+ <math><mi>x</mi><mo id="mo5" lspace="3em" rspace="5em">X</mo><mi>y</mi></math><br/>
+ <math><mi>x</mi><mo id="mo6" lspace="3em" rspace="5em">X</mo><mi>y</mi></math>
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationmolspacerspaceexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-lspace-rspace-expected.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-lspace-rspace-expected.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-lspace-rspace-expected.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>attribute lspace rspace</title>
+ <meta charset="utf-8"/>
+ </head>
+ <body>
+
+ <!-- These operators are not from the operator dictionary, the default is spacing is lspace = rspace = thickmathspace = 5/18em. -->
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 0.27777777777777em; -webkit-margin-end: 0.27777777777777em;">X</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 1em; -webkit-margin-end: 0.27777777777777em;">X</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 0.27777777777777em; -webkit-margin-end: 2em;">X</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 3em; -webkit-margin-end: 4em;">X</mo><mi>y</mi></math>
+
+ <br/>
+
+ <!-- Same with multi-char <mo lspace="0em" rspace="0em">. -->
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 0.27777777777777em; -webkit-margin-end: 0.27777777777777em;">XXX</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 1em; -webkit-margin-end: 0.27777777777777em;">XXX</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 0.27777777777777em; -webkit-margin-end: 2em;">XXX</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 3em; -webkit-margin-end: 4em;">XXX</mo><mi>y</mi></math>
+
+ <br/>
+
+ <!-- This should have the default spacing from operator dictionary, that is rspace = rspace = mediummathspace = 4/18em. -->
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 0.22222222222222em; -webkit-margin-end: 0.22222222222222em;">+</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 1em; -webkit-margin-end: 0.22222222222222em;">+</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 0.22222222222222em; -webkit-margin-end: 2em;">+</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 3em; -webkit-margin-end: 4em;">+</mo><mi>y</mi></math>
+
+ <br/>
+
+ <!-- Same with an explicit form="prefix". The default is now lspace=0 and rspace = veryverythinmathspace = 1/18em -->
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 0em; -webkit-margin-end: 0.055555555555555em;">+</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 1em; -webkit-margin-end: 0.055555555555555em;">+</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 0em; -webkit-margin-end: 2em;">+</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="0em" rspace="0em" style="-webkit-margin-start: 3em; -webkit-margin-end: 4em;">+</mo><mi>y</mi></math>
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationmolspacerspacehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-lspace-rspace.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-lspace-rspace.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-lspace-rspace.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>attribute lspace rspace</title>
+ <meta charset="utf-8"/>
+ </head>
+ <body>
+
+ <!-- These operators are not from the operator dictionary, the default is spacing is lspace = rspace = thickmathspace = 5/18em. -->
+ <math><mi>x</mi><mo>X</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="1em">X</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo rspace="2em">X</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="3em" rspace="4em">X</mo><mi>y</mi></math>
+
+ <br/>
+
+ <!-- Same with multi-char <mo>. -->
+ <math><mi>x</mi><mo>XXX</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="1em">XXX</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo rspace="2em">XXX</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="3em" rspace="4em">XXX</mo><mi>y</mi></math>
+
+ <br/>
+
+ <!-- This should have the default spacing from operator dictionary, that is rspace = rspace = mediummathspace = 4/18em. -->
+ <math><mi>x</mi><mo>+</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="1em">+</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo rspace="2em">+</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo lspace="3em" rspace="4em" >+</mo><mi>y</mi></math>
+
+ <br/>
+
+ <!-- Same with an explicit form="prefix". The default is now lspace=0 and rspace = veryverythinmathspace = 1/18em -->
+ <math><mi>x</mi><mo form="prefix">+</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo form="prefix" lspace="1em">+</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo form="prefix" rspace="2em">+</mo><mi>y</mi></math>
+ <math><mi>x</mi><mo form="prefix" lspace="3em" rspace="4em" >+</mo><mi>y</mi></math>
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationmowhitespacesexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-whitespaces-expected.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-whitespaces-expected.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-whitespaces-expected.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>mo whitespaces</title>
+ <meta charset="utf-8"/>
+ </head>
+ <body>
+
+ <math><mo>(</mo><mi>x</mi><mo>+</mo><mi>y</mi><mo>)</mo></math>
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationmowhitespaceshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/mathml/presentation/mo-whitespaces.html (0 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/mo-whitespaces.html         (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mo-whitespaces.html        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+<!doctype html>
+<html>
+ <head>
+ <title>mo whitespaces</title>
+ <meta charset="utf-8"/>
+ </head>
+ <body>
+
+ <!-- This test verifies that leading and trailing spaces are ignored. -->
+
+ <math><mo>&#x20;&#x9;&#xA;&#xD;(&#x20;&#x9;&#xA;&#xD;</mo><mi>x</mi><mo>&#x20;&#x9;&#xA;&#xD;+&#x20;&#x9;&#xA;&#xD;</mo><mi>y</mi><mo>&#x20;&#x9;&#xA;&#xD;)&#x20;&#x9;&#xA;&#xD;</mo></math>
+
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacmathmlpresentationmostretchexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt (165460 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt        2014-03-12 03:47:16 UTC (rev 165460)
+++ trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -3,379 +3,379 @@
</span><span class="cx"> layer at (0,0) size 800x260
</span><span class="cx"> RenderBlock {HTML} at (0,0) size 800x260
</span><span class="cx"> RenderBody {BODY} at (8,8) size 784x244
</span><del>- RenderMathMLMath {math} at (0,0) size 195x25 [padding: 0 1 0 1]
- RenderMathMLRow {mrow} at (1,0) size 193x25
- RenderMathMLOperator {mo} at (1,5) size 8x14
</del><ins>+ RenderMathMLMath {math} at (0,0) size 126x25 [padding: 0 1 0 1]
+ RenderMathMLRow {mrow} at (1,0) size 124x25
+ RenderMathMLOperator {mo} at (0,5) size 7x14
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "("
</span><del>- RenderMathMLOperator {mo} at (13,5) size 8x14
</del><ins>+ RenderMathMLOperator {mo} at (7,5) size 7x14
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: ")"
</span><del>- RenderMathMLOperator {mo} at (26,5) size 11x14
</del><ins>+ RenderMathMLOperator {mo} at (14,5) size 10x14
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx"> RenderText at (0,-6) size 8x24
</span><span class="cx"> text run at (0,-6) width 8: "{"
</span><del>- RenderMathMLOperator {mo} at (43,5) size 11x14
</del><ins>+ RenderMathMLOperator {mo} at (24,5) size 10x14
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx"> RenderText at (0,-6) size 8x24
</span><span class="cx"> text run at (0,-6) width 8: "}"
</span><del>- RenderMathMLOperator {mo} at (59,5) size 8x14
</del><ins>+ RenderMathMLOperator {mo} at (34,5) size 7x14
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "["
</span><del>- RenderMathMLOperator {mo} at (72,5) size 8x14
</del><ins>+ RenderMathMLOperator {mo} at (41,5) size 7x14
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "]"
</span><del>- RenderMathMLOperator {mo} at (86,4) size 9x16
</del><ins>+ RenderMathMLOperator {mo} at (48,4) size 8x16
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2308}"
</span><del>- RenderMathMLOperator {mo} at (100,4) size 9x16
</del><ins>+ RenderMathMLOperator {mo} at (56,4) size 8x16
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2309}"
</span><del>- RenderMathMLOperator {mo} at (115,4) size 8x16
</del><ins>+ RenderMathMLOperator {mo} at (64,4) size 8x16
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{230A}"
</span><del>- RenderMathMLOperator {mo} at (129,4) size 9x16
</del><ins>+ RenderMathMLOperator {mo} at (72,4) size 8x16
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{230B}"
</span><del>- RenderMathMLOperator {mo} at (143,2) size 12x20
</del><ins>+ RenderMathMLOperator {mo} at (80,2) size 12x20
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 11x20
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 7x20
</span><span class="cx"> RenderText at (0,-3) size 7x24
</span><span class="cx"> text run at (0,-3) width 7: "\x{222B}"
</span><del>- RenderMathMLOperator {mo} at (161,0) size 4x25
- RenderMathMLBlock (anonymous, flex) at (0,0) size 3x12
</del><ins>+ RenderMathMLOperator {mo} at (91,0) size 8x25
+ RenderMathMLBlock (anonymous, flex) at (1,0) size 4x12
</ins><span class="cx"> RenderBlock (anonymous) at (0,0) size 3x12
</span><span class="cx"> RenderText at (0,-6) size 3x24
</span><span class="cx"> text run at (0,-6) width 3: "|"
</span><del>- RenderMathMLOperator {mo} at (170,4) size 9x16
</del><ins>+ RenderMathMLOperator {mo} at (98,4) size 9x16
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2016}"
</span><del>- RenderMathMLOperator {mo} at (183,4) size 9x16
- RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</del><ins>+ RenderMathMLOperator {mo} at (106,4) size 18x16
+ RenderMathMLBlock (anonymous, flex) at (4,0) size 9x16
</ins><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2225}"
</span><del>- RenderText {#text} at (194,2) size 5x18
- text run at (194,2) width 5: " "
</del><ins>+ RenderText {#text} at (125,2) size 5x18
+ text run at (125,2) width 5: " "
</ins><span class="cx"> RenderBR {BR} at (0,0) size 0x0
</span><del>- RenderMathMLMath {math} at (0,24) size 199x143 [padding: 0 1 0 1]
- RenderMathMLRow {mrow} at (1,0) size 197x143
- RenderMathMLOperator {mo} at (1,0) size 8x143
</del><ins>+ RenderMathMLMath {math} at (0,24) size 126x143 [padding: 0 1 0 1]
+ RenderMathMLRow {mrow} at (1,0) size 124x143
+ RenderMathMLOperator {mo} at (0,0) size 7x143
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "("
</span><del>- RenderMathMLOperator {mo} at (13,0) size 8x143
</del><ins>+ RenderMathMLOperator {mo} at (7,0) size 7x143
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: ")"
</span><del>- RenderMathMLOperator {mo} at (26,0) size 11x143
</del><ins>+ RenderMathMLOperator {mo} at (14,0) size 10x143
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx"> RenderText at (0,-6) size 8x24
</span><span class="cx"> text run at (0,-6) width 8: "{"
</span><del>- RenderMathMLOperator {mo} at (43,0) size 11x143
</del><ins>+ RenderMathMLOperator {mo} at (24,0) size 10x143
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx"> RenderText at (0,-6) size 8x24
</span><span class="cx"> text run at (0,-6) width 8: "}"
</span><del>- RenderMathMLOperator {mo} at (59,0) size 8x143
</del><ins>+ RenderMathMLOperator {mo} at (34,0) size 7x143
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "["
</span><del>- RenderMathMLOperator {mo} at (72,0) size 8x143
</del><ins>+ RenderMathMLOperator {mo} at (41,0) size 7x143
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "]"
</span><del>- RenderMathMLOperator {mo} at (86,0) size 9x143
</del><ins>+ RenderMathMLOperator {mo} at (48,0) size 8x143
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2308}"
</span><del>- RenderMathMLOperator {mo} at (100,0) size 9x143
</del><ins>+ RenderMathMLOperator {mo} at (56,0) size 8x143
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2309}"
</span><del>- RenderMathMLOperator {mo} at (115,0) size 8x143
</del><ins>+ RenderMathMLOperator {mo} at (64,0) size 8x143
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{230A}"
</span><del>- RenderMathMLOperator {mo} at (129,0) size 9x143
</del><ins>+ RenderMathMLOperator {mo} at (72,0) size 8x143
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{230B}"
</span><del>- RenderMathMLOperator {mo} at (143,0) size 12x143
</del><ins>+ RenderMathMLOperator {mo} at (80,0) size 12x143
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 11x20
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 7x20
</span><span class="cx"> RenderText at (0,-3) size 7x24
</span><span class="cx"> text run at (0,-3) width 7: "\x{222B}"
</span><del>- RenderMathMLOperator {mo} at (161,0) size 4x143
- RenderMathMLBlock (anonymous, flex) at (0,0) size 3x12
</del><ins>+ RenderMathMLOperator {mo} at (91,0) size 8x143
+ RenderMathMLBlock (anonymous, flex) at (1,0) size 4x12
</ins><span class="cx"> RenderBlock (anonymous) at (0,0) size 3x12
</span><span class="cx"> RenderText at (0,-6) size 3x24
</span><span class="cx"> text run at (0,-6) width 3: "|"
</span><del>- RenderMathMLOperator {mo} at (170,0) size 9x76
</del><ins>+ RenderMathMLOperator {mo} at (98,0) size 9x76
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2016}"
</span><del>- RenderMathMLOperator {mo} at (184,0) size 9x76
- RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</del><ins>+ RenderMathMLOperator {mo} at (106,0) size 18x76
+ RenderMathMLBlock (anonymous, flex) at (4,0) size 9x16
</ins><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2225}"
</span><del>- RenderMathMLSpace {mspace} at (196,0) size 1x76
- RenderText {#text} at (198,85) size 5x18
- text run at (198,85) width 5: " "
- RenderMathMLMath {math} at (202,49) size 199x93 [padding: 0 1 0 1]
- RenderMathMLRow {mrow} at (1,0) size 197x93
- RenderMathMLOperator {mo} at (1,0) size 8x93
</del><ins>+ RenderMathMLSpace {mspace} at (123,0) size 1x76
+ RenderText {#text} at (125,85) size 5x18
+ text run at (125,85) width 5: " "
+ RenderMathMLMath {math} at (129,49) size 126x93 [padding: 0 1 0 1]
+ RenderMathMLRow {mrow} at (1,0) size 124x93
+ RenderMathMLOperator {mo} at (0,0) size 7x93
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "("
</span><del>- RenderMathMLOperator {mo} at (13,0) size 8x93
</del><ins>+ RenderMathMLOperator {mo} at (7,0) size 7x93
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: ")"
</span><del>- RenderMathMLOperator {mo} at (26,0) size 11x93
</del><ins>+ RenderMathMLOperator {mo} at (14,0) size 10x93
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx"> RenderText at (0,-6) size 8x24
</span><span class="cx"> text run at (0,-6) width 8: "{"
</span><del>- RenderMathMLOperator {mo} at (43,0) size 11x93
</del><ins>+ RenderMathMLOperator {mo} at (24,0) size 10x93
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx"> RenderText at (0,-6) size 8x24
</span><span class="cx"> text run at (0,-6) width 8: "}"
</span><del>- RenderMathMLOperator {mo} at (59,0) size 8x93
</del><ins>+ RenderMathMLOperator {mo} at (34,0) size 7x93
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "["
</span><del>- RenderMathMLOperator {mo} at (72,0) size 8x93
</del><ins>+ RenderMathMLOperator {mo} at (41,0) size 7x93
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "]"
</span><del>- RenderMathMLOperator {mo} at (86,0) size 9x93
</del><ins>+ RenderMathMLOperator {mo} at (48,0) size 8x93
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2308}"
</span><del>- RenderMathMLOperator {mo} at (100,0) size 9x93
</del><ins>+ RenderMathMLOperator {mo} at (56,0) size 8x93
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2309}"
</span><del>- RenderMathMLOperator {mo} at (115,0) size 8x93
</del><ins>+ RenderMathMLOperator {mo} at (64,0) size 8x93
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{230A}"
</span><del>- RenderMathMLOperator {mo} at (129,0) size 9x93
</del><ins>+ RenderMathMLOperator {mo} at (72,0) size 8x93
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{230B}"
</span><del>- RenderMathMLOperator {mo} at (143,0) size 12x93
</del><ins>+ RenderMathMLOperator {mo} at (80,0) size 12x93
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 11x20
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 7x20
</span><span class="cx"> RenderText at (0,-3) size 7x24
</span><span class="cx"> text run at (0,-3) width 7: "\x{222B}"
</span><del>- RenderMathMLOperator {mo} at (161,0) size 4x93
- RenderMathMLBlock (anonymous, flex) at (0,0) size 3x12
</del><ins>+ RenderMathMLOperator {mo} at (91,0) size 8x93
+ RenderMathMLBlock (anonymous, flex) at (1,0) size 4x12
</ins><span class="cx"> RenderBlock (anonymous) at (0,0) size 3x12
</span><span class="cx"> RenderText at (0,-6) size 3x24
</span><span class="cx"> text run at (0,-6) width 3: "|"
</span><del>- RenderMathMLOperator {mo} at (170,0) size 9x51
</del><ins>+ RenderMathMLOperator {mo} at (98,0) size 9x51
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2016}"
</span><del>- RenderMathMLOperator {mo} at (184,0) size 9x51
- RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</del><ins>+ RenderMathMLOperator {mo} at (106,0) size 18x51
+ RenderMathMLBlock (anonymous, flex) at (4,0) size 9x16
</ins><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2225}"
</span><del>- RenderMathMLSpace {mspace} at (196,0) size 1x51
- RenderText {#text} at (400,85) size 5x18
- text run at (400,85) width 5: " "
- RenderMathMLMath {math} at (404,79) size 199x33 [padding: 0 1 0 1]
- RenderMathMLRow {mrow} at (1,0) size 197x33
- RenderMathMLOperator {mo} at (1,0) size 8x33
</del><ins>+ RenderMathMLSpace {mspace} at (123,0) size 1x51
+ RenderText {#text} at (254,85) size 5x18
+ text run at (254,85) width 5: " "
+ RenderMathMLMath {math} at (258,79) size 126x33 [padding: 0 1 0 1]
+ RenderMathMLRow {mrow} at (1,0) size 124x33
+ RenderMathMLOperator {mo} at (0,0) size 7x33
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "("
</span><del>- RenderMathMLOperator {mo} at (13,0) size 8x33
</del><ins>+ RenderMathMLOperator {mo} at (7,0) size 7x33
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: ")"
</span><del>- RenderMathMLOperator {mo} at (26,9) size 11x14
</del><ins>+ RenderMathMLOperator {mo} at (14,9) size 10x14
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx"> RenderText at (0,-6) size 8x24
</span><span class="cx"> text run at (0,-6) width 8: "{"
</span><del>- RenderMathMLOperator {mo} at (43,9) size 11x14
</del><ins>+ RenderMathMLOperator {mo} at (24,9) size 10x14
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx"> RenderText at (0,-6) size 8x24
</span><span class="cx"> text run at (0,-6) width 8: "}"
</span><del>- RenderMathMLOperator {mo} at (59,0) size 8x33
</del><ins>+ RenderMathMLOperator {mo} at (34,0) size 7x33
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "["
</span><del>- RenderMathMLOperator {mo} at (72,0) size 8x33
</del><ins>+ RenderMathMLOperator {mo} at (41,0) size 7x33
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "]"
</span><del>- RenderMathMLOperator {mo} at (86,0) size 9x33
</del><ins>+ RenderMathMLOperator {mo} at (48,0) size 8x33
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2308}"
</span><del>- RenderMathMLOperator {mo} at (100,0) size 9x33
</del><ins>+ RenderMathMLOperator {mo} at (56,0) size 8x33
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2309}"
</span><del>- RenderMathMLOperator {mo} at (115,0) size 8x33
</del><ins>+ RenderMathMLOperator {mo} at (64,0) size 8x33
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{230A}"
</span><del>- RenderMathMLOperator {mo} at (129,0) size 9x33
</del><ins>+ RenderMathMLOperator {mo} at (72,0) size 8x33
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{230B}"
</span><del>- RenderMathMLOperator {mo} at (143,6) size 12x20
</del><ins>+ RenderMathMLOperator {mo} at (80,6) size 12x20
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 11x20
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 7x20
</span><span class="cx"> RenderText at (0,-3) size 7x24
</span><span class="cx"> text run at (0,-3) width 7: "\x{222B}"
</span><del>- RenderMathMLOperator {mo} at (161,0) size 4x33
- RenderMathMLBlock (anonymous, flex) at (0,0) size 3x12
</del><ins>+ RenderMathMLOperator {mo} at (91,0) size 8x33
+ RenderMathMLBlock (anonymous, flex) at (1,0) size 4x12
</ins><span class="cx"> RenderBlock (anonymous) at (0,0) size 3x12
</span><span class="cx"> RenderText at (0,-6) size 3x24
</span><span class="cx"> text run at (0,-6) width 3: "|"
</span><del>- RenderMathMLOperator {mo} at (170,8) size 9x16
</del><ins>+ RenderMathMLOperator {mo} at (98,8) size 9x16
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2016}"
</span><del>- RenderMathMLOperator {mo} at (184,8) size 9x16
- RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</del><ins>+ RenderMathMLOperator {mo} at (106,8) size 18x16
+ RenderMathMLBlock (anonymous, flex) at (4,0) size 9x16
</ins><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2225}"
</span><del>- RenderMathMLSpace {mspace} at (196,0) size 1x21
- RenderText {#text} at (602,85) size 5x18
- text run at (602,85) width 5: " "
</del><ins>+ RenderMathMLSpace {mspace} at (123,0) size 1x21
+ RenderText {#text} at (383,85) size 5x18
+ text run at (383,85) width 5: " "
</ins><span class="cx"> RenderBR {BR} at (0,0) size 0x0
</span><del>- RenderMathMLMath {math} at (0,166) size 211x79 [padding: 0 1 0 1]
- RenderMathMLSquareRoot {msqrt} at (1,0) size 209x79 [intrinsic padding: 3 0 3 12]
- RenderMathMLRow (anonymous) at (12,3) size 197x73
- RenderMathMLOperator {mo} at (1,0) size 8x73
</del><ins>+ RenderMathMLMath {math} at (0,166) size 138x79 [padding: 0 1 0 1]
+ RenderMathMLSquareRoot {msqrt} at (1,0) size 136x79 [intrinsic padding: 3 0 3 12]
+ RenderMathMLRow (anonymous) at (12,3) size 124x73
+ RenderMathMLOperator {mo} at (0,0) size 7x73
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "("
</span><del>- RenderMathMLOperator {mo} at (13,0) size 8x73
</del><ins>+ RenderMathMLOperator {mo} at (7,0) size 7x73
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: ")"
</span><del>- RenderMathMLOperator {mo} at (26,0) size 11x73
</del><ins>+ RenderMathMLOperator {mo} at (14,0) size 10x73
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx"> RenderText at (0,-6) size 8x24
</span><span class="cx"> text run at (0,-6) width 8: "{"
</span><del>- RenderMathMLOperator {mo} at (43,0) size 11x73
</del><ins>+ RenderMathMLOperator {mo} at (24,0) size 10x73
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 10x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x14
</span><span class="cx"> RenderText at (0,-6) size 8x24
</span><span class="cx"> text run at (0,-6) width 8: "}"
</span><del>- RenderMathMLOperator {mo} at (59,0) size 8x73
</del><ins>+ RenderMathMLOperator {mo} at (34,0) size 7x73
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "["
</span><del>- RenderMathMLOperator {mo} at (72,0) size 8x73
</del><ins>+ RenderMathMLOperator {mo} at (41,0) size 7x73
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 7x14
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 5x14
</span><span class="cx"> RenderText at (0,-6) size 5x24
</span><span class="cx"> text run at (0,-6) width 5: "]"
</span><del>- RenderMathMLOperator {mo} at (86,0) size 9x73
</del><ins>+ RenderMathMLOperator {mo} at (48,0) size 8x73
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2308}"
</span><del>- RenderMathMLOperator {mo} at (100,0) size 9x73
</del><ins>+ RenderMathMLOperator {mo} at (56,0) size 8x73
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2309}"
</span><del>- RenderMathMLOperator {mo} at (115,0) size 8x73
</del><ins>+ RenderMathMLOperator {mo} at (64,0) size 8x73
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{230A}"
</span><del>- RenderMathMLOperator {mo} at (129,0) size 9x73
</del><ins>+ RenderMathMLOperator {mo} at (72,0) size 8x73
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{230B}"
</span><del>- RenderMathMLOperator {mo} at (143,0) size 12x73
</del><ins>+ RenderMathMLOperator {mo} at (80,0) size 12x73
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 11x20
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 7x20
</span><span class="cx"> RenderText at (0,-3) size 7x24
</span><span class="cx"> text run at (0,-3) width 7: "\x{222B}"
</span><del>- RenderMathMLOperator {mo} at (161,0) size 4x73
- RenderMathMLBlock (anonymous, flex) at (0,0) size 3x12
</del><ins>+ RenderMathMLOperator {mo} at (91,0) size 8x73
+ RenderMathMLBlock (anonymous, flex) at (1,0) size 4x12
</ins><span class="cx"> RenderBlock (anonymous) at (0,0) size 3x12
</span><span class="cx"> RenderText at (0,-6) size 3x24
</span><span class="cx"> text run at (0,-6) width 3: "|"
</span><del>- RenderMathMLOperator {mo} at (170,0) size 9x41
</del><ins>+ RenderMathMLOperator {mo} at (98,0) size 9x41
</ins><span class="cx"> RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2016}"
</span><del>- RenderMathMLOperator {mo} at (184,0) size 9x41
- RenderMathMLBlock (anonymous, flex) at (0,0) size 8x16
</del><ins>+ RenderMathMLOperator {mo} at (106,0) size 18x41
+ RenderMathMLBlock (anonymous, flex) at (4,0) size 9x16
</ins><span class="cx"> RenderBlock (anonymous) at (0,0) size 8x16
</span><span class="cx"> RenderText at (0,-5) size 8x24
</span><span class="cx"> text run at (0,-5) width 8: "\x{2225}"
</span><del>- RenderMathMLSpace {mspace} at (196,0) size 1x41
</del><ins>+ RenderMathMLSpace {mspace} at (123,0) size 1x41
</ins><span class="cx"> RenderText {#text} at (0,0) size 0x0
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165460 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-12 03:47:16 UTC (rev 165460)
+++ trunk/Source/WebCore/ChangeLog        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2014-03-11 Frédéric Wang <fred.wang@free.fr>
+
+ Implement MathML spacing around operators .
+ https://bugs.webkit.org/show_bug.cgi?id=115787
+
+ Reviewed by Chris Fleizach.
+
+ This makes the <mo> operators use the lspace/rspace properties to
+ determine their spacing. The spacing is now consistent with the one
+ of <mfenced> and as a consequence bug 118843 is fixed. This also ensures
+ that the rendering of <mo> elements is updated when the form or
+ attributes are changed.
+
+ Tests: mathml/presentation/dir-mo.html
+ mathml/presentation/mo-form-dynamic.html
+ mathml/presentation/mo-form-minus-plus.html
+ mathml/presentation/mo-form.html
+ mathml/presentation/mo-lspace-rspace-dynamic.html
+ mathml/presentation/mo-lspace-rspace.html
+ mathml/presentation/mo-whitespaces.html
+
+ * css/mathml.css:
+ * mathml/MathMLInlineContainerElement.cpp:
+ (WebCore::MathMLInlineContainerElement::childrenChanged):
+ * mathml/MathMLInlineContainerElement.h:
+ * rendering/mathml/RenderMathMLOperator.cpp:
+ (WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry):
+ (WebCore::RenderMathMLOperator::SetOperatorProperties):
+ (WebCore::RenderMathMLOperator::updateFromElement):
+ (WebCore::RenderMathMLOperator::updateOperatorProperties):
+ (WebCore::RenderMathMLOperator::updateStyle):
+ * rendering/mathml/RenderMathMLOperator.h:
+ * rendering/mathml/RenderMathMLRow.cpp:
+ (WebCore::RenderMathMLRow::updateOperatorProperties):
+ * rendering/mathml/RenderMathMLRow.h:
+ * rendering/mathml/RenderMathMLToken.h:
+
</ins><span class="cx"> 2014-03-11 Brent Fulgham <bfulgham@apple.com>
</span><span class="cx">
</span><span class="cx"> Get the incomplete WebVTT Regions code to build again.
</span></span></pre></div>
<a id="trunkSourceWebCorecssmathmlcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/mathml.css (165460 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/mathml.css        2014-03-12 03:47:16 UTC (rev 165460)
+++ trunk/Source/WebCore/css/mathml.css        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -105,18 +105,6 @@
</span><span class="cx"> -webkit-margin-start: 0.14em; /* This is larger than 0.1em because the child's font-size is smaller than the <msubsup>'s. */
</span><span class="cx"> }
</span><span class="cx">
</span><del>-/* FIXME: For a RenderMathMLOperator's margin-start and margin-end, or for a MathML "embellished operator", check the operator's lspace and rspace attributes,
- and the MathML operator dictionary. */
-math > mo, mrow > mo, msqrt > mo, mtd > mo {
- -webkit-margin-start: 0.2em;
- -webkit-margin-end: 0.2em;
-}
-math > mo:first-child, mrow > mo:first-child, msqrt > mo:first-child, mtd > mo:first-child,
-math > mo:last-child, mrow > mo:last-child, msqrt > mo:last-child, mtd > mo:last-child {
- -webkit-margin-start: 0.1em;
- -webkit-margin-end: 0.1em;
-}
-
</del><span class="cx"> mroot {
</span><span class="cx"> position: relative;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLInlineContainerElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp (165460 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp        2014-03-12 03:47:16 UTC (rev 165460)
+++ trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -55,6 +55,20 @@
</span><span class="cx"> return adoptRef(new MathMLInlineContainerElement(tagName, document));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void MathMLInlineContainerElement::childrenChanged(const ChildChange& change)
+{
+ if (renderer()) {
+ if (renderer()->isRenderMathMLRow())
+ toRenderMathMLRow(renderer())->updateOperatorProperties();
+ else if (hasLocalName(mathTag) || hasLocalName(msqrtTag)) {
+ auto childRenderer = renderer()->firstChild();
+ if (childRenderer && childRenderer->isRenderMathMLRow())
+ toRenderMathMLRow(childRenderer)->updateOperatorProperties();
+ }
+ }
+ MathMLElement::childrenChanged(change);
+}
+
</ins><span class="cx"> RenderPtr<RenderElement> MathMLInlineContainerElement::createElementRenderer(PassRef<RenderStyle> style)
</span><span class="cx"> {
</span><span class="cx"> if (hasLocalName(annotation_xmlTag))
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLInlineContainerElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLInlineContainerElement.h (165460 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLInlineContainerElement.h        2014-03-12 03:47:16 UTC (rev 165460)
+++ trunk/Source/WebCore/mathml/MathMLInlineContainerElement.h        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> MathMLInlineContainerElement(const QualifiedName& tagName, Document&);
</span><ins>+ void childrenChanged(const ChildChange&);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> virtual RenderPtr<RenderElement> createElementRenderer(PassRef<RenderStyle>) override;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLOperatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp (165460 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp        2014-03-12 03:47:16 UTC (rev 165460)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -1160,8 +1160,8 @@
</span><span class="cx"> m_operatorFlags = entry->flags;
</span><span class="cx">
</span><span class="cx"> // Leading and trailing space is specified as multiple of 1/18em.
</span><del>- m_leadingSpace = entry->lspace * style().fontSize() / 18;
- m_trailingSpace = entry->rspace * style().fontSize() / 18;
</del><ins>+ m_leadingSpace = entry->lspace * style().font().size() / 18;
+ m_trailingSpace = entry->rspace * style().font().size() / 18;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderMathMLOperator::SetOperatorProperties()
</span><span class="lines">@@ -1195,9 +1195,9 @@
</span><span class="cx"> m_operatorFlags &= MathMLOperatorDictionary::Fence | MathMLOperatorDictionary::Separator; // This resets all but the Fence and Separator properties.
</span><span class="cx"> else
</span><span class="cx"> m_operatorFlags = 0; // This resets all the operator properties.
</span><del>- m_leadingSpace = 5 * style().fontSize() / 18; // This sets leading space to "thickmathspace".
- m_trailingSpace = 5 * style().fontSize() / 18; // This sets trailing space to "thickmathspace".
- m_minSize = style().fontSize(); // This sets minsize to "1em".
</del><ins>+ m_leadingSpace = 5 * style().font().size() / 18; // This sets leading space to "thickmathspace".
+ m_trailingSpace = 5 * style().font().size() / 18; // This sets trailing space to "thickmathspace".
+ m_minSize = style().font().size(); // This sets minsize to "1em".
</ins><span class="cx"> m_maxSize = intMaxForLayoutUnit; // This sets maxsize to "infinity".
</span><span class="cx">
</span><span class="cx"> if (m_operator) {
</span><span class="lines">@@ -1237,20 +1237,6 @@
</span><span class="cx"> if (maxsize != "infinity")
</span><span class="cx"> parseMathMLLength(maxsize, m_maxSize, &style(), false);
</span><span class="cx"> }
</span><del>-
- // FIXME: this should be removed when operator spacing is implemented (https://bugs.webkit.org/show_bug.cgi?id=115787). At the moment spacing for normal <mo> elements is handled in mathml.css and mfenced uses the arbitrary constants below.
- if (isFencedOperator()) {
- if (hasOperatorFlag(MathMLOperatorDictionary::Fence)) {
- m_leadingSpace = 0.1f * style().fontSize();
- m_trailingSpace = 0.1f * style().fontSize();
- } else if (hasOperatorFlag(MathMLOperatorDictionary::Separator)) {
- m_leadingSpace = 0;
- m_trailingSpace = 0.25f * style().fontSize();
- }
- } else {
- m_leadingSpace = 0;
- m_trailingSpace = 0;
- }
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool RenderMathMLOperator::isChildAllowed(const RenderObject&, const RenderStyle&) const
</span><span class="lines">@@ -1374,6 +1360,20 @@
</span><span class="cx"> rebuildTokenContent(element().textContent());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void RenderMathMLOperator::updateFromElement()
+{
+ SetOperatorProperties();
+ RenderMathMLToken::updateFromElement();
+}
+
+void RenderMathMLOperator::updateOperatorProperties()
+{
+ SetOperatorProperties();
+ if (!isEmpty())
+ updateStyle();
+ setNeedsLayoutAndPrefWidthsRecalc();
+}
+
</ins><span class="cx"> bool RenderMathMLOperator::shouldAllowStretching(UChar& stretchedCharacter)
</span><span class="cx"> {
</span><span class="cx"> if (!hasOperatorFlag(MathMLOperatorDictionary::Stretchy))
</span><span class="lines">@@ -1427,6 +1427,8 @@
</span><span class="cx"> m_isStretched = false;
</span><span class="cx">
</span><span class="cx"> // We add spacing around the operator.
</span><ins>+ // FIXME: The spacing should be added to the whole embellished operator (https://bugs.webkit.org/show_bug.cgi?id=124831).
+ // FIXME: The spacing should only be added inside (perhaps inferred) mrow (http://www.w3.org/TR/MathML/chapter3.html#presm.opspacing).
</ins><span class="cx"> const auto& wrapper = toRenderElement(firstChild());
</span><span class="cx"> auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(&style(), FLEX);
</span><span class="cx"> newStyle.get().setMarginStart(Length(m_leadingSpace, Fixed));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLOperatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h (165460 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2014-03-12 03:47:16 UTC (rev 165460)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -49,7 +49,6 @@
</span><span class="cx"> struct Entry {
</span><span class="cx"> UChar character;
</span><span class="cx"> Form form;
</span><del>- // FIXME: spacing around <mo> operators is not implemented yet (https://bugs.webkit.org/show_bug.cgi?id=115787).
</del><span class="cx"> unsigned short lspace;
</span><span class="cx"> unsigned short rspace;
</span><span class="cx"> unsigned short flags;
</span><span class="lines">@@ -81,6 +80,7 @@
</span><span class="cx">
</span><span class="cx"> void updateTokenContent(const String& operatorString);
</span><span class="cx"> void updateTokenContent() override final;
</span><ins>+ void updateOperatorProperties();
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> virtual const char* renderName() const override { return isAnonymous() ? "RenderMathMLOperator (anonymous)" : "RenderMathMLOperator"; }
</span><span class="lines">@@ -93,6 +93,7 @@
</span><span class="cx"> virtual int firstLineBaseline() const override;
</span><span class="cx"> virtual RenderMathMLOperator* unembellishedOperator() override { return this; }
</span><span class="cx"> void rebuildTokenContent(const String& operatorString);
</span><ins>+ void updateFromElement() override;
</ins><span class="cx">
</span><span class="cx"> bool shouldAllowStretching(UChar& characterForStretching);
</span><span class="cx"> StretchyCharacter* findAcceptableStretchyCharacter(UChar);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp (165460 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp        2014-03-12 03:47:16 UTC (rev 165460)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -55,6 +55,18 @@
</span><span class="cx"> return newMRow;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void RenderMathMLRow::updateOperatorProperties()
+{
+ for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
+ if (child->isRenderMathMLBlock()) {
+ auto renderOperator = toRenderMathMLBlock(child)->unembellishedOperator();
+ if (renderOperator)
+ renderOperator->updateOperatorProperties();
+ }
+ }
+ setNeedsLayoutAndPrefWidthsRecalc();
+}
+
</ins><span class="cx"> void RenderMathMLRow::layout()
</span><span class="cx"> {
</span><span class="cx"> int stretchHeightAboveBaseline = 0, stretchDepthBelowBaseline = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h (165460 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h        2014-03-12 03:47:16 UTC (rev 165460)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> RenderMathMLRow(Document&, PassRef<RenderStyle>);
</span><span class="cx">
</span><span class="cx"> static RenderPtr<RenderMathMLRow> createAnonymousWithParentRenderer(RenderMathMLRoot&);
</span><ins>+ void updateOperatorProperties();
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> virtual void layout();
</span><span class="lines">@@ -49,6 +50,8 @@
</span><span class="cx"> virtual const char* renderName() const override { return isAnonymous() ? "RenderMathMLRow (anonymous)" : "RenderMathMLRow"; }
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+RENDER_OBJECT_TYPE_CASTS(RenderMathMLRow, isRenderMathMLRow())
+
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(MATHML)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLTokenh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.h (165460 => 165461)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.h        2014-03-12 03:47:16 UTC (rev 165460)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.h        2014-03-12 06:46:52 UTC (rev 165461)
</span><span class="lines">@@ -45,13 +45,13 @@
</span><span class="cx"> virtual bool isChildAllowed(const RenderObject&, const RenderStyle&) const override { return true; };
</span><span class="cx"> virtual void addChild(RenderObject* newChild, RenderObject* beforeChild) override;
</span><span class="cx"> virtual void updateTokenContent();
</span><ins>+ void updateFromElement() override;
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> void createWrapperIfNeeded();
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> virtual const char* renderName() const override { return isAnonymous() ? "RenderMathMLToken (anonymous)" : "RenderMathMLToken"; }
</span><del>- void updateFromElement() override;
</del><span class="cx"> virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
</span><span class="cx"> virtual void updateStyle();
</span><span class="cx"> };
</span></span></pre>
</div>
</div>
</body>
</html>