<!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>[179511] branches/safari-600.5-branch</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/179511">179511</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2015-02-02 16:18:15 -0800 (Mon, 02 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/178777">r178777</a>. rdar://problem/19670611</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6005branchLayoutTestsChangeLog">branches/safari-600.5-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari6005branchLayoutTestsplatformmacmathmlopentypeopentypestretchyhorizontalexpectedtxt">branches/safari-600.5-branch/LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreChangeLog">branches/safari-600.5-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6005branchSourceWebCorerenderingmathmlRenderMathMLOperatorcpp">branches/safari-600.5-branch/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorerenderingmathmlRenderMathMLOperatorh">branches/safari-600.5-branch/Source/WebCore/rendering/mathml/RenderMathMLOperator.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorerenderingmathmlRenderMathMLUnderOvercpp">branches/safari-600.5-branch/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari6005branchLayoutTestsmathmlopentypemunderoverwindowresizeexpectedtxt">branches/safari-600.5-branch/LayoutTests/mathml/opentype/munderover-window-resize-expected.txt</a></li>
<li><a href="#branchessafari6005branchLayoutTestsmathmlopentypemunderoverwindowresizehtml">branches/safari-600.5-branch/LayoutTests/mathml/opentype/munderover-window-resize.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6005branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/LayoutTests/ChangeLog (179510 => 179511)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/LayoutTests/ChangeLog        2015-02-02 23:53:26 UTC (rev 179510)
+++ branches/safari-600.5-branch/LayoutTests/ChangeLog        2015-02-03 00:18:15 UTC (rev 179511)
</span><span class="lines">@@ -1,5 +1,33 @@
</span><span class="cx"> 2015-01-20  Babak Shafiei  &lt;bshafiei@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r174540.
+
+    2014-10-09  Said Abou-Hallawa  &lt;sabouhallawa@apple.com&gt;
+
+            RenderMathMLUnderOver adds spacing to the child operator indefinitely when zooming or resizing the window.
+            https://bugs.webkit.org/show_bug.cgi?id=137330
+
+            Reviewed by Darin Adler, Daniel Bates.
+
+            When the alignment is center, which is the common case for math, changing the size of
+            an object affects the position of this object also.  We need to confirm that zooming or
+            resizing the window should not affect the rectangle of the over/under math object operator.  
+
+            * mathml/opentype/munderover-window-resize-expected.txt: Added.
+            * mathml/opentype/munderover-window-resize.html: Added.
+            New test with many under and over math objects.  After loading the page, the window is resized and
+            the view is zoomed in and out to make sure the layout of these under and over objects were not changed.
+            * platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt:
+            This test was wrong because of the spacing issue. The page has two &lt;mover&gt; math objects at the beginning.
+            Each of them has an &lt;mspace&gt; child. The width of the first &lt;mspace&gt; is 1em while the width of the second
+            &lt;mspace&gt; is 2em. The font size is 10pt. So it is expected to have the first one 10 pixels and the second 
+            to be 20 pixels. In the test, the width of the first is 22 and the width of the second is 32.
+            I do expect this test to fail on other platforms since they have the same mistake which is now fixed. I am
+            going to submit the mac expected version only and when it fails I am going to collect the result and submit
+            another patch for the other platforms expected files.
+
+2015-01-20  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
</ins><span class="cx">         Merge r171941.
</span><span class="cx"> 
</span><span class="cx">     2014-07-30  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6005branchLayoutTestsmathmlopentypemunderoverwindowresizeexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-600.5-branch/LayoutTests/mathml/opentype/munderover-window-resize-expected.txt (0 => 179511)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/LayoutTests/mathml/opentype/munderover-window-resize-expected.txt                                (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/mathml/opentype/munderover-window-resize-expected.txt        2015-02-03 00:18:15 UTC (rev 179511)
</span><span class="lines">@@ -0,0 +1,220 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x40
+  RenderBlock {HTML} at (0,0) size 800x40
+    RenderBody {BODY} at (8,8) size 784x22
+      RenderBlock {DIV} at (0,0) size 784x22
+        RenderMathMLMath {math} at (0,0) size 784x22 [padding: 0 1 0 1]
+          RenderMathMLRow {mrow} at (268,4) size 26x16
+            RenderMathMLScripts {mmultiscripts} at (0,0) size 26x16
+              Base Wrapper at (8,0) size 9x16 [padding: 2 0 4 0]
+                RenderMathMLToken {mi} at (0,2) size 8x9 [padding: 0 1 0 0]
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 7x9
+                    RenderBlock (anonymous) at (0,0) size 7x9
+                      RenderText {#text} at (0,3) size 7x10
+                        text run at (0,3) width 7: &quot;C&quot;
+              SubSupPair Wrapper at (16,0) size 10x16
+                RenderMathMLBlock (flex) {none} at (0,15) size 0x0
+                RenderMathMLToken {mi} at (0,0) size 9x7 [padding: 0 1 0 0]
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x7
+                    RenderBlock (anonymous) at (0,0) size 8x7
+                      RenderText {#text} at (0,2) size 8x8
+                        text run at (0,2) width 8: &quot;16&quot;
+              RenderMathMLBlock (flex) {mprescripts} at (25,0) size 0x16
+              SubSupPair Wrapper at (0,0) size 9x16
+                RenderMathMLToken {mi} at (4,8) size 5x8 [padding: 0 1 0 0]
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x7
+                    RenderBlock (anonymous) at (0,0) size 4x7
+                      RenderText {#text} at (0,2) size 4x8
+                        text run at (0,2) width 4: &quot;5&quot;
+                RenderMathMLToken {mi} at (0,0) size 9x7 [padding: 0 1 0 0]
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x7
+                    RenderBlock (anonymous) at (0,0) size 8x7
+                      RenderText {#text} at (0,2) size 8x8
+                        text run at (0,2) width 8: &quot;10&quot;
+          RenderMathMLSpace {mspace} at (293,14) size 6x0
+          RenderMathMLRow {mrow} at (298,6) size 40x14
+            RenderMathMLToken {mn} at (0,0) size 6x9
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 6x9
+                RenderBlock (anonymous) at (0,0) size 6x9
+                  RenderText {#text} at (0,3) size 6x10
+                    text run at (0,3) width 6: &quot;2&quot;
+            RenderMathMLOperator {mo} at (6,8) size 0x1
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 0x1
+                RenderBlock (anonymous) at (0,0) size 0x1
+                  RenderText at (0,-5) size 0x10
+                    text run at (0,-5) width 0: &quot;\x{2062}&quot;
+            RenderMathMLScripts {msub} at (6,0) size 11x14
+              Base Wrapper at (0,0) size 7x14 [padding: 0 0 4 0]
+                RenderMathMLToken {mi} at (0,0) size 7x9
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 7x9
+                    RenderBlock (anonymous) at (0,0) size 7x9
+                      RenderText {#text} at (0,3) size 7x10
+                        text run at (0,3) width 7: &quot;H&quot;
+              SubSupPair Wrapper at (7,0) size 4x14
+                RenderMathMLToken {mn} at (0,6) size 4x8
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x7
+                    RenderBlock (anonymous) at (0,0) size 4x7
+                      RenderText {#text} at (0,2) size 4x8
+                        text run at (0,2) width 4: &quot;2&quot;
+            RenderMathMLOperator {mo} at (17,2) size 11x7
+              RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
+                RenderBlock (anonymous) at (0,0) size 6x7
+                  RenderText at (0,1) size 6x10
+                    text run at (0,1) width 6: &quot;+&quot;
+            RenderMathMLScripts {msub} at (27,0) size 13x14
+              Base Wrapper at (0,0) size 8x14 [padding: 0 0 4 0]
+                RenderMathMLToken {mi} at (0,0) size 8x9
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
+                    RenderBlock (anonymous) at (0,0) size 8x9
+                      RenderText {#text} at (0,3) size 8x10
+                        text run at (0,3) width 8: &quot;O&quot;
+              SubSupPair Wrapper at (8,0) size 4x14
+                RenderMathMLToken {mn} at (0,6) size 4x8
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x7
+                    RenderBlock (anonymous) at (0,0) size 4x7
+                      RenderText {#text} at (0,2) size 4x8
+                        text run at (0,2) width 4: &quot;2&quot;
+          RenderMathMLUnderOver {mover} at (338,1) size 22x14
+            RenderMathMLOperator {mo} at (0,7) size 22x7
+              RenderMathMLBlock (anonymous, flex) at (2,0) size 17x7
+                RenderBlock (anonymous) at (0,0) size 10x7
+                  RenderText at (0,1) size 10x10
+                    text run at (0,1) width 10: &quot;\x{2192}&quot;
+            RenderMathMLRow {mrow} at (2,0) size 17x7
+              RenderMathMLToken {mi} at (0,0) size 8x6 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 7x6
+                  RenderBlock (anonymous) at (0,0) size 7x6
+                    RenderText {#text} at (0,1) size 7x8
+                      text run at (0,1) width 7: &quot;m&quot;
+              RenderMathMLOperator {mo} at (7,4) size 4x3
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 2x3
+                  RenderBlock (anonymous) at (0,0) size 2x3
+                    RenderText at (0,-3) size 2x8
+                      text run at (0,-3) width 2: &quot;,&quot;
+              RenderMathMLToken {mi} at (11,0) size 5x6 [padding: 0 1 0 0]
+                RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
+                  RenderBlock (anonymous) at (0,0) size 4x6
+                    RenderText {#text} at (0,1) size 4x8
+                      text run at (0,1) width 4: &quot;n&quot;
+          RenderMathMLRow {mrow} at (359,6) size 27x14
+            RenderMathMLToken {mn} at (0,0) size 6x9
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 6x9
+                RenderBlock (anonymous) at (0,0) size 6x9
+                  RenderText {#text} at (0,3) size 6x10
+                    text run at (0,3) width 6: &quot;2&quot;
+            RenderMathMLOperator {mo} at (6,8) size 0x1
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 0x1
+                RenderBlock (anonymous) at (0,0) size 0x1
+                  RenderText at (0,-5) size 0x10
+                    text run at (0,-5) width 0: &quot;\x{2062}&quot;
+            RenderMathMLScripts {msub} at (6,0) size 11x14
+              Base Wrapper at (0,0) size 7x14 [padding: 0 0 4 0]
+                RenderMathMLToken {mi} at (0,0) size 7x9
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 7x9
+                    RenderBlock (anonymous) at (0,0) size 7x9
+                      RenderText {#text} at (0,3) size 7x10
+                        text run at (0,3) width 7: &quot;H&quot;
+              SubSupPair Wrapper at (7,0) size 4x14
+                RenderMathMLToken {mn} at (0,6) size 4x8
+                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x7
+                    RenderBlock (anonymous) at (0,0) size 4x7
+                      RenderText {#text} at (0,2) size 4x8
+                        text run at (0,2) width 4: &quot;2&quot;
+            RenderMathMLOperator {mo} at (17,8) size 0x1
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 0x1
+                RenderBlock (anonymous) at (0,0) size 0x1
+                  RenderText at (0,-5) size 0x10
+                    text run at (0,-5) width 0: &quot;\x{2062}&quot;
+            RenderMathMLToken {mi} at (17,0) size 9x9 [padding: 0 1 0 0]
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
+                RenderBlock (anonymous) at (0,0) size 8x9
+                  RenderText {#text} at (0,3) size 8x10
+                    text run at (0,3) width 8: &quot;O&quot;
+          RenderMathMLSpace {mspace} at (385,14) size 6x0
+          RenderMathMLRow {mrow} at (390,6) size 9x9
+            RenderMathMLToken {mi} at (0,0) size 8x9 [padding: 0 1 0 0]
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 7x9
+                RenderBlock (anonymous) at (0,0) size 7x9
+                  RenderText {#text} at (0,3) size 7x10
+                    text run at (0,3) width 7: &quot;A&quot;
+          RenderMathMLUnderOver {munderover} at (398,3) size 21x19
+            RenderMathMLOperator {mo} at (0,6) size 21x6
+              RenderMathMLBlock (anonymous, flex) at (2,0) size 16x6
+                RenderBlock (anonymous) at (0,0) size 9x6
+                  RenderText at (0,0) size 9x10
+                    text run at (0,0) width 9: &quot;\x{2194}&quot;
+            RenderMathMLToken {mi} at (7,12) size 6x7 [padding: 0 1 0 0]
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 4x7
+                RenderBlock (anonymous) at (0,0) size 4x7
+                  RenderText {#text} at (0,2) size 4x8
+                    text run at (0,2) width 4: &quot;b&quot;
+            RenderMathMLToken {mn} at (8,0) size 5x6
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
+                RenderBlock (anonymous) at (0,0) size 4x6
+                  RenderText {#text} at (0,1) size 4x8
+                    text run at (0,1) width 4: &quot;a&quot;
+          RenderMathMLRow {mrow} at (418,6) size 9x9
+            RenderMathMLToken {mi} at (0,0) size 8x9 [padding: 0 1 0 0]
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 7x9
+                RenderBlock (anonymous) at (0,0) size 7x9
+                  RenderText {#text} at (0,3) size 7x10
+                    text run at (0,3) width 7: &quot;B&quot;
+          RenderMathMLSpace {mspace} at (426,14) size 6x0
+          RenderMathMLRow {mrow} at (431,6) size 9x9
+            RenderMathMLToken {mi} at (0,0) size 8x9 [padding: 0 1 0 0]
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 7x9
+                RenderBlock (anonymous) at (0,0) size 7x9
+                  RenderText {#text} at (0,3) size 7x10
+                    text run at (0,3) width 7: &quot;A&quot;
+          RenderMathMLUnderOver {munderover} at (439,1) size 22x21
+            RenderMathMLOperator {mo} at (0,6) size 22x8
+              RenderMathMLBlock (anonymous, flex) at (2,0) size 17x8
+                RenderBlock (anonymous) at (0,0) size 10x8
+                  RenderText at (0,2) size 10x10
+                    text run at (0,2) width 10: &quot;\x{21C4}&quot;
+            RenderMathMLToken {mi} at (8,14) size 5x7 [padding: 0 1 0 0]
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 4x7
+                RenderBlock (anonymous) at (0,0) size 4x7
+                  RenderText {#text} at (0,2) size 4x8
+                    text run at (0,2) width 4: &quot;0&quot;
+            RenderMathMLToken {mn} at (8,0) size 5x6
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
+                RenderBlock (anonymous) at (0,0) size 4x6
+                  RenderText {#text} at (0,1) size 4x8
+                    text run at (0,1) width 4: &quot;a&quot;
+          RenderMathMLRow {mrow} at (460,6) size 9x9
+            RenderMathMLToken {mi} at (0,0) size 8x9 [padding: 0 1 0 0]
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 7x9
+                RenderBlock (anonymous) at (0,0) size 7x9
+                  RenderText {#text} at (0,3) size 7x10
+                    text run at (0,3) width 7: &quot;B&quot;
+          RenderMathMLSpace {mspace} at (468,14) size 6x0
+          RenderMathMLRow {mrow} at (473,6) size 9x9
+            RenderMathMLToken {mi} at (0,0) size 8x9 [padding: 0 1 0 0]
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 7x9
+                RenderBlock (anonymous) at (0,0) size 7x9
+                  RenderText {#text} at (0,3) size 7x10
+                    text run at (0,3) width 7: &quot;A&quot;
+          RenderMathMLUnderOver {munderover} at (481,0) size 27x22
+            RenderMathMLOperator {mo} at (0,7) size 27x8
+              RenderMathMLBlock (anonymous, flex) at (2,0) size 22x8
+                RenderBlock (anonymous) at (0,0) size 10x8
+                  RenderText at (0,2) size 10x10
+                    text run at (0,2) width 10: &quot;\x{21C4}&quot;
+            RenderMathMLToken {mn} at (6,15) size 14x7
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 13x7
+                RenderBlock (anonymous) at (0,0) size 13x7
+                  RenderText {#text} at (0,2) size 13x8
+                    text run at (0,2) width 13: &quot;0\x{B0}C&quot;
+            RenderMathMLToken {mn} at (2,0) size 22x7
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 21x7
+                RenderBlock (anonymous) at (0,0) size 21x7
+                  RenderText {#text} at (0,2) size 21x8
+                    text run at (0,2) width 21: &quot;100\x{B0}C&quot;
+          RenderMathMLRow {mrow} at (507,6) size 9x9
+            RenderMathMLToken {mi} at (0,0) size 8x9 [padding: 0 1 0 0]
+              RenderMathMLBlock (anonymous, flex) at (0,0) size 7x9
+                RenderBlock (anonymous) at (0,0) size 7x9
+                  RenderText {#text} at (0,3) size 7x10
+                    text run at (0,3) width 7: &quot;B&quot;
</ins></span></pre></div>
<a id="branchessafari6005branchLayoutTestsmathmlopentypemunderoverwindowresizehtml"></a>
<div class="addfile"><h4>Added: branches/safari-600.5-branch/LayoutTests/mathml/opentype/munderover-window-resize.html (0 => 179511)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/LayoutTests/mathml/opentype/munderover-window-resize.html                                (rev 0)
+++ branches/safari-600.5-branch/LayoutTests/mathml/opentype/munderover-window-resize.html        2015-02-03 00:18:15 UTC (rev 179511)
</span><span class="lines">@@ -0,0 +1,110 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Open Type MATH - under-over operator&lt;/title&gt;
+  &lt;meta charset=&quot;utf-8&quot;&gt;
+  &lt;style type=&quot;text/css&quot;&gt;
+    /* This font is taken from Mozilla's test suite. */
+    @font-face {
+      font-family: stretchy;
+      src: url(&quot;stretchy.woff&quot;);
+    }
+    math {
+      font-family: stretchy;
+      font-size: 10px;
+    }
+  &lt;/style&gt;
+&lt;body&gt;
+&lt;div&gt;
+  &lt;math display='block'&gt;
+    &lt;mrow&gt;
+      &lt;mmultiscripts&gt;
+        &lt;mi&gt;C&lt;/mi&gt;
+        &lt;none/&gt;
+        &lt;mi&gt;16&lt;/mi&gt;
+        &lt;mprescripts/&gt;
+        &lt;mi&gt;5&lt;/mi&gt;
+        &lt;mi&gt;10&lt;/mi&gt;
+      &lt;/mmultiscripts&gt;
+    &lt;/mrow&gt;
+    &lt;mspace width=&quot;0.5em&quot;/&gt;
+    &lt;mrow&gt;
+      &lt;mn&gt;2&lt;/mn&gt;
+      &lt;mo&gt;&amp;InvisibleTimes;&lt;/mo&gt;
+      &lt;msub&gt;
+        &lt;mi&gt;H&lt;/mi&gt;
+        &lt;mn&gt;2&lt;/mn&gt;
+      &lt;/msub&gt;
+      &lt;mo&gt;+&lt;/mo&gt;
+      &lt;msub&gt;
+        &lt;mi&gt;O&lt;/mi&gt;
+        &lt;mn&gt;2&lt;/mn&gt;
+      &lt;/msub&gt;
+    &lt;/mrow&gt;
+    &lt;mover&gt;
+      &lt;mo&gt;&amp;#x02192;&lt;/mo&gt;
+      &lt;mrow&gt;
+        &lt;mi&gt;m&lt;/mi&gt;
+        &lt;mo&gt;,&lt;/mo&gt;
+        &lt;mi&gt;n&lt;/mi&gt;
+      &lt;/mrow&gt;
+    &lt;/mover&gt;
+    &lt;mrow&gt;
+      &lt;mn&gt;2&lt;/mn&gt;
+      &lt;mo&gt;&amp;InvisibleTimes;&lt;/mo&gt;
+      &lt;msub&gt;
+        &lt;mi&gt;H&lt;/mi&gt;
+        &lt;mn&gt;2&lt;/mn&gt;
+      &lt;/msub&gt;
+      &lt;mo&gt;&amp;InvisibleTimes;&lt;/mo&gt;
+      &lt;mi&gt;O&lt;/mi&gt;
+    &lt;/mrow&gt;
+    &lt;mspace width=&quot;0.5em&quot;/&gt;
+    &lt;mrow&gt;
+      &lt;mi&gt;A&lt;/mi&gt;
+    &lt;/mrow&gt;
+    &lt;munderover&gt;
+      &lt;mo&gt;&amp;#x02194;&lt;/mo&gt;
+      &lt;mi&gt;b&lt;/mi&gt;
+      &lt;mn&gt;a&lt;/mn&gt;
+    &lt;/munderover&gt;
+    &lt;mrow&gt;
+      &lt;mi&gt;B&lt;/mi&gt;
+    &lt;/mrow&gt;
+    &lt;mspace width=&quot;0.5em&quot;/&gt;
+    &lt;mrow&gt;
+      &lt;mi&gt;A&lt;/mi&gt;
+    &lt;/mrow&gt;
+    &lt;munderover&gt;
+      &lt;mo&gt;&amp;#x021C4;&lt;/mo&gt;
+      &lt;mi&gt;0&lt;/mi&gt;
+      &lt;mn&gt;a&lt;/mn&gt;
+    &lt;/munderover&gt;
+    &lt;mrow&gt;
+      &lt;mi&gt;B&lt;/mi&gt;
+    &lt;/mrow&gt;
+    &lt;mspace width=&quot;0.5em&quot;/&gt;
+    &lt;mrow&gt;
+      &lt;mi&gt;A&lt;/mi&gt;
+    &lt;/mrow&gt;
+    &lt;munderover&gt;
+      &lt;mo&gt;&amp;#x021C4;&lt;/mo&gt;
+      &lt;mn&gt;0&amp;#x000B0;C&lt;/mn&gt;
+      &lt;mn&gt;100&amp;#x000B0;C&lt;/mn&gt;
+    &lt;/munderover&gt;
+    &lt;mrow&gt;
+      &lt;mi&gt;B&lt;/mi&gt;
+    &lt;/mrow&gt;
+  &lt;/math&gt;
+&lt;/div&gt;
+&lt;script&gt;
+        for (var zoom = 110; zoom &lt;= 200; zoom += 10) {
+        document.body.style.zoom = zoom + &quot;%&quot;;
+        }
+    document.body.style.zoom=&quot;100%&quot;;
+    var width = window.outerWidth;
+    window.resizeTo(250, window.outerHeight); 
+    window.resizeTo(width, window.outerHeight);
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari6005branchLayoutTestsplatformmacmathmlopentypeopentypestretchyhorizontalexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt (179510 => 179511)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt        2015-02-02 23:53:26 UTC (rev 179510)
+++ branches/safari-600.5-branch/LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt        2015-02-03 00:18:15 UTC (rev 179511)
</span><span class="lines">@@ -7,8 +7,8 @@
</span><span class="cx">         RenderMathMLMath {math} at (0,3) size 18x22 [padding: 0 1 0 1]
</span><span class="cx">           RenderMathMLRow {mstyle} at (1,0) size 16x22
</span><span class="cx">             RenderMathMLUnderOver {mover} at (0,0) size 16x22
</span><del>-              RenderMathMLOperator {mo} at (-6,1) size 27x21
-                RenderMathMLBlock (anonymous, flex) at (2,0) size 22x4
</del><ins>+              RenderMathMLOperator {mo} at (0,1) size 16x21
+                RenderMathMLBlock (anonymous, flex) at (2,0) size 11x4
</ins><span class="cx">                   RenderBlock (anonymous) at (0,0) size 2x4
</span><span class="cx">                     RenderText at (0,-3) size 2x10
</span><span class="cx">                       text run at (0,-3) width 2: &quot;\x{219C}&quot;
</span><span class="lines">@@ -18,8 +18,8 @@
</span><span class="cx">         RenderMathMLMath {math} at (0,3) size 28x22 [padding: 0 1 0 1]
</span><span class="cx">           RenderMathMLRow {mstyle} at (1,0) size 26x22
</span><span class="cx">             RenderMathMLUnderOver {mover} at (0,0) size 26x22
</span><del>-              RenderMathMLOperator {mo} at (-6,1) size 38x21
-                RenderMathMLBlock (anonymous, flex) at (2,0) size 32x4
</del><ins>+              RenderMathMLOperator {mo} at (0,1) size 26x21
+                RenderMathMLBlock (anonymous, flex) at (2,0) size 22x4
</ins><span class="cx">                   RenderBlock (anonymous) at (0,0) size 2x4
</span><span class="cx">                     RenderText at (0,-3) size 2x10
</span><span class="cx">                       text run at (0,-3) width 2: &quot;\x{219C}&quot;
</span><span class="lines">@@ -29,8 +29,8 @@
</span><span class="cx">         RenderMathMLMath {math} at (0,0) size 158x42 [padding: 0 1 0 1]
</span><span class="cx">           RenderMathMLRow {mstyle} at (1,0) size 156x42
</span><span class="cx">             RenderMathMLUnderOver {mover} at (0,0) size 156x42
</span><del>-              RenderMathMLOperator {mo} at (-3,1) size 162x41
-                RenderMathMLBlock (anonymous, flex) at (2,0) size 157x4
</del><ins>+              RenderMathMLOperator {mo} at (0,1) size 156x41
+                RenderMathMLBlock (anonymous, flex) at (2,0) size 151x4
</ins><span class="cx">                   RenderBlock (anonymous) at (0,0) size 2x4
</span><span class="cx">                     RenderText at (0,-3) size 2x10
</span><span class="cx">                       text run at (0,-3) width 2: &quot;\x{219C}&quot;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/ChangeLog (179510 => 179511)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/ChangeLog        2015-02-02 23:53:26 UTC (rev 179510)
+++ branches/safari-600.5-branch/Source/WebCore/ChangeLog        2015-02-03 00:18:15 UTC (rev 179511)
</span><span class="lines">@@ -1,5 +1,48 @@
</span><span class="cx"> 2015-01-20  Babak Shafiei  &lt;bshafiei@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r174540.
+
+    2014-10-09  Said Abou-Hallawa  &lt;sabouhallawa@apple.com&gt;
+
+            RenderMathMLUnderOver adds spacing to the child operator indefinitely when resizing the window.
+            https://bugs.webkit.org/show_bug.cgi?id=137330
+
+            Reviewed by Darin Adler.
+
+            The layout for the &lt;mundercover&gt; math object happens in two separate passes. The first pass runs
+            the layout for the two children and then calculates the maximum child width.  It then sets the 
+            stretch size for the math operator child.  And finally it runs the second layout pass by calling
+            the base class layout() function. The base class function then runs the layout for the children
+            rendering blocks.  In the operator child function computePreferredLogicalWidths(), the stretch 
+            size is used to adjust the width (or the height) of the operator. Then it adds the leading and
+            trailing spaces and the total will be the operator child width.
+
+            When resizing or zooming the window, the render objects are just invalidated but marked as 'needs-
+            Layout'.  The problem is happening because the stretch size of the math operator is not reset
+            before running the layout.  The old logical width (or height) of the the math operator child which
+            is equal to the stretch size plus the leading and trailing spaces for is compared with the glyph
+            size if the old logical width ( or height) is larger, it is set to be the stretch size.  When it
+            is used again because of invalidation, new leading and trailing spaces are included in the new
+            logical width.  So with every zooming-in or out or window resizing, new leading and trailing 
+            spaces are added to the logical width of the math operator child or the math &lt;munderober&gt; object.
+
+            Ensure the stretch size of the math operator render object is reset before running its layout.
+            Running the layout means either the page is just loaded or it's invalidated which means, no 
+            layout stall data should be used.
+
+            Test: mathml/opentype/munderover-window-resize.html
+
+            * rendering/mathml/RenderMathMLOperator.cpp:
+            (WebCore::RenderMathMLOperator::resetStretchSize):
+            * rendering/mathml/RenderMathMLOperator.h:
+            resetStretchSize() sets the stretch size to its original value when the class is created.
+            * rendering/mathml/RenderMathMLUnderOver.cpp:
+            (WebCore::RenderMathMLUnderOver::layout):
+            Make sure the operator stretch size is reset before calling its layout. Also make sure the new 
+            maximum stretch size to the operator objects that were invalid and needsLayout.
+
+2015-01-20  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
</ins><span class="cx">         Merge r173071.
</span><span class="cx"> 
</span><span class="cx">     2014-08-27  Enrica Casucci  &lt;enrica@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorerenderingmathmlRenderMathMLOperatorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp (179510 => 179511)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp        2015-02-02 23:53:26 UTC (rev 179510)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp        2015-02-03 00:18:15 UTC (rev 179511)
</span><span class="lines">@@ -1308,6 +1308,15 @@
</span><span class="cx">     updateStyle();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RenderMathMLOperator::resetStretchSize()
+{
+    if (m_isVertical) {
+        m_stretchHeightAboveBaseline = 0;
+        m_stretchDepthBelowBaseline = 0;
+    } else
+        m_stretchWidth = 0;
+}
+
</ins><span class="cx"> FloatRect RenderMathMLOperator::boundsForGlyph(const GlyphData&amp; data) const
</span><span class="cx"> {
</span><span class="cx">     return data.fontData-&gt;boundsForGlyph(data.glyph);
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorerenderingmathmlRenderMathMLOperatorh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/rendering/mathml/RenderMathMLOperator.h (179510 => 179511)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2015-02-02 23:53:26 UTC (rev 179510)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/mathml/RenderMathMLOperator.h        2015-02-03 00:18:15 UTC (rev 179511)
</span><span class="lines">@@ -66,6 +66,7 @@
</span><span class="cx">     virtual void stretchTo(LayoutUnit heightAboveBaseline, LayoutUnit depthBelowBaseline);
</span><span class="cx">     void stretchTo(LayoutUnit width);
</span><span class="cx">     LayoutUnit stretchSize() const { return m_isVertical ? m_stretchHeightAboveBaseline + m_stretchDepthBelowBaseline : m_stretchWidth; }
</span><ins>+    void resetStretchSize();
</ins><span class="cx">     
</span><span class="cx">     bool hasOperatorFlag(MathMLOperatorDictionary::Flag flag) const { return m_operatorFlags &amp; flag; }
</span><span class="cx">     // FIXME: The displaystyle property is not implemented (https://bugs.webkit.org/show_bug.cgi?id=118737).
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorerenderingmathmlRenderMathMLUnderOvercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp (179510 => 179511)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp        2015-02-02 23:53:26 UTC (rev 179510)
+++ branches/safari-600.5-branch/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp        2015-02-03 00:18:15 UTC (rev 179511)
</span><span class="lines">@@ -74,9 +74,20 @@
</span><span class="cx"> void RenderMathMLUnderOver::layout()
</span><span class="cx"> {
</span><span class="cx">     LayoutUnit stretchWidth = 0;
</span><ins>+    Vector&lt;RenderMathMLOperator*, 2&gt; renderOperators;
+
</ins><span class="cx">     for (RenderObject* child = firstChild(); child; child = child-&gt;nextSibling()) {
</span><del>-        if (child-&gt;needsLayout())
</del><ins>+        if (child-&gt;needsLayout()) {
+            if (child-&gt;isRenderMathMLBlock()) {
+                if (auto renderOperator = toRenderMathMLBlock(child)-&gt;unembellishedOperator()) {
+                    renderOperator-&gt;resetStretchSize();
+                    renderOperators.append(renderOperator);
+                }
+            }
+
</ins><span class="cx">             toRenderElement(child)-&gt;layout();
</span><ins>+        }
+
</ins><span class="cx">         // Skipping the embellished op does not work for nested structures like
</span><span class="cx">         // &lt;munder&gt;&lt;mover&gt;&lt;mo&gt;_&lt;/mo&gt;...&lt;/mover&gt; &lt;mo&gt;_&lt;/mo&gt;&lt;/munder&gt;.
</span><span class="cx">         if (child-&gt;isBox())
</span><span class="lines">@@ -84,10 +95,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Set the sizes of (possibly embellished) stretchy operator children.
</span><del>-    for (auto&amp; child : childrenOfType&lt;RenderMathMLBlock&gt;(*this)) {
-        if (auto renderOperator = child.unembellishedOperator())
-            renderOperator-&gt;stretchTo(stretchWidth);
-    }
</del><ins>+    for (auto&amp; renderOperator : renderOperators)
+        renderOperator-&gt;stretchTo(stretchWidth);
</ins><span class="cx"> 
</span><span class="cx">     RenderMathMLBlock::layout();
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>