<!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>[202441] trunk/Source/WebCore</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/202441">202441</a></dd>
<dt>Author</dt> <dd>fred.wang@free.fr</dd>
<dt>Date</dt> <dd>2016-06-24 13:17:15 -0700 (Fri, 24 Jun 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Use auto* for MathML elements and renderers when possible
https://bugs.webkit.org/show_bug.cgi?id=159090
Patch by Frederic Wang <fwang@igalia.com> on 2016-06-24
Reviewed by Alex Christensen.
No new tests, behavior is unchanged.
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::attributeChanged):
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::getSelectedActionChildAndIndex):
(WebCore::MathMLSelectElement::getSelectedActionChild):
(WebCore::MathMLSelectElement::getSelectedSemanticsChild):
(WebCore::MathMLSelectElement::updateSelectedChild):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::isValid):
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::layoutBlock):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::isValid):
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::firstLineBaseline):
(WebCore::RenderMathMLRow::computeLineVerticalStretch):
(WebCore::RenderMathMLRow::computePreferredLogicalWidths):
(WebCore::RenderMathMLRow::layoutRowItems):
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::unembellishedOperator):
(WebCore::RenderMathMLScripts::getBaseAndScripts):
(WebCore::RenderMathMLScripts::computePreferredLogicalWidths):
(WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded):
(WebCore::RenderMathMLScripts::layoutBlock):
(WebCore::RenderMathMLScripts::firstLineBaseline):
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::firstLineBaseline):
(WebCore::RenderMathMLUnderOver::isValid):
(WebCore::RenderMathMLUnderOver::over):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLElementcpp">trunk/Source/WebCore/mathml/MathMLElement.cpp</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLSelectElementcpp">trunk/Source/WebCore/mathml/MathMLSelectElement.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLFractioncpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLMenclosecpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLRootcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLRowcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLScriptscpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLUnderOvercpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (202440 => 202441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-06-24 20:14:31 UTC (rev 202440)
+++ trunk/Source/WebCore/ChangeLog        2016-06-24 20:17:15 UTC (rev 202441)
</span><span class="lines">@@ -1,3 +1,42 @@
</span><ins>+2016-06-24 Frederic Wang <fwang@igalia.com>
+
+ Use auto* for MathML elements and renderers when possible
+ https://bugs.webkit.org/show_bug.cgi?id=159090
+
+ Reviewed by Alex Christensen.
+
+ No new tests, behavior is unchanged.
+
+ * mathml/MathMLElement.cpp:
+ (WebCore::MathMLElement::attributeChanged):
+ * mathml/MathMLSelectElement.cpp:
+ (WebCore::MathMLSelectElement::getSelectedActionChildAndIndex):
+ (WebCore::MathMLSelectElement::getSelectedActionChild):
+ (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
+ (WebCore::MathMLSelectElement::updateSelectedChild):
+ * rendering/mathml/RenderMathMLFraction.cpp:
+ (WebCore::RenderMathMLFraction::isValid):
+ * rendering/mathml/RenderMathMLMenclose.cpp:
+ (WebCore::RenderMathMLMenclose::layoutBlock):
+ * rendering/mathml/RenderMathMLRoot.cpp:
+ (WebCore::RenderMathMLRoot::isValid):
+ * rendering/mathml/RenderMathMLRow.cpp:
+ (WebCore::RenderMathMLRow::firstLineBaseline):
+ (WebCore::RenderMathMLRow::computeLineVerticalStretch):
+ (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
+ (WebCore::RenderMathMLRow::layoutRowItems):
+ * rendering/mathml/RenderMathMLScripts.cpp:
+ (WebCore::RenderMathMLScripts::unembellishedOperator):
+ (WebCore::RenderMathMLScripts::getBaseAndScripts):
+ (WebCore::RenderMathMLScripts::computePreferredLogicalWidths):
+ (WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded):
+ (WebCore::RenderMathMLScripts::layoutBlock):
+ (WebCore::RenderMathMLScripts::firstLineBaseline):
+ * rendering/mathml/RenderMathMLUnderOver.cpp:
+ (WebCore::RenderMathMLUnderOver::firstLineBaseline):
+ (WebCore::RenderMathMLUnderOver::isValid):
+ (WebCore::RenderMathMLUnderOver::over):
+
</ins><span class="cx"> 2016-06-24 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove unused and static return value from InspectorStyle::populateAllProperties
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLElement.cpp (202440 => 202441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLElement.cpp        2016-06-24 20:14:31 UTC (rev 202440)
+++ trunk/Source/WebCore/mathml/MathMLElement.cpp        2016-06-24 20:17:15 UTC (rev 202441)
</span><span class="lines">@@ -298,7 +298,7 @@
</span><span class="cx"> void MathMLElement::attributeChanged(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& newValue, AttributeModificationReason reason)
</span><span class="cx"> {
</span><span class="cx"> if (isSemanticAnnotation() && (name == MathMLNames::srcAttr || name == MathMLNames::encodingAttr)) {
</span><del>- Element* parent = parentElement();
</del><ins>+ auto* parent = parentElement();
</ins><span class="cx"> if (is<MathMLElement>(parent) && parent->hasTagName(semanticsTag))
</span><span class="cx"> downcast<MathMLElement>(*parent).updateSelectedChild();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLSelectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLSelectElement.cpp (202440 => 202441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLSelectElement.cpp        2016-06-24 20:14:31 UTC (rev 202440)
+++ trunk/Source/WebCore/mathml/MathMLSelectElement.cpp        2016-06-24 20:17:15 UTC (rev 202441)
</span><span class="lines">@@ -118,7 +118,7 @@
</span><span class="cx"> int selection = fastGetAttribute(MathMLNames::selectionAttr).toInt();
</span><span class="cx"> int i;
</span><span class="cx"> for (i = 1; i < selection; i++) {
</span><del>- Element* nextChild = selectedChild->nextElementSibling();
</del><ins>+ auto* nextChild = selectedChild->nextElementSibling();
</ins><span class="cx"> if (!nextChild)
</span><span class="cx"> break;
</span><span class="cx"> selectedChild = nextChild;
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(hasTagName(mactionTag));
</span><span class="cx">
</span><del>- Element* child = firstElementChild();
</del><ins>+ auto* child = firstElementChild();
</ins><span class="cx"> if (!child)
</span><span class="cx"> return child;
</span><span class="cx">
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(hasTagName(semanticsTag));
</span><span class="cx">
</span><del>- Element* child = firstElementChild();
</del><ins>+ auto* child = firstElementChild();
</ins><span class="cx"> if (!child)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="lines">@@ -197,7 +197,7 @@
</span><span class="cx">
</span><span class="cx"> void MathMLSelectElement::updateSelectedChild()
</span><span class="cx"> {
</span><del>- Element* newSelectedChild = hasTagName(mactionTag) ? getSelectedActionChild() : getSelectedSemanticsChild();
</del><ins>+ auto* newSelectedChild = hasTagName(mactionTag) ? getSelectedActionChild() : getSelectedSemanticsChild();
</ins><span class="cx">
</span><span class="cx"> if (m_selectedChild == newSelectedChild)
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLFractioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp (202440 => 202441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp        2016-06-24 20:14:31 UTC (rev 202440)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp        2016-06-24 20:17:15 UTC (rev 202441)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx"> {
</span><span class="cx"> // Verify whether the list of children is valid:
</span><span class="cx"> // <mfrac> numerator denominator </mfrac>
</span><del>- RenderBox* child = firstChildBox();
</del><ins>+ auto* child = firstChildBox();
</ins><span class="cx"> if (!child)
</span><span class="cx"> return false;
</span><span class="cx"> child = child->nextSiblingBox();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLMenclosecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp (202440 => 202441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp        2016-06-24 20:14:31 UTC (rev 202440)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp        2016-06-24 20:17:15 UTC (rev 202441)
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx"> m_ascent = topSpace + contentAscent;
</span><span class="cx"> LayoutUnit descent = contentDescent + bottomSpace;
</span><span class="cx"> LayoutPoint contentLocation(leftSpace, m_ascent - contentAscent);
</span><del>- for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox())
</del><ins>+ for (auto* child = firstChildBox(); child; child = child->nextSiblingBox())
</ins><span class="cx"> child->setLocation(child->location() + contentLocation);
</span><span class="cx">
</span><span class="cx"> setLogicalHeight(m_ascent + descent);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp (202440 => 202441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp        2016-06-24 20:14:31 UTC (rev 202440)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp        2016-06-24 20:17:15 UTC (rev 202441)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> ASSERT(m_kind == RootWithIndex);
</span><del>- RenderBox* child = firstChildBox();
</del><ins>+ auto* child = firstChildBox();
</ins><span class="cx"> if (!child)
</span><span class="cx"> return false;
</span><span class="cx"> child = child->nextSiblingBox();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp (202440 => 202441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp        2016-06-24 20:14:31 UTC (rev 202440)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp        2016-06-24 20:17:15 UTC (rev 202441)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">
</span><span class="cx"> Optional<int> RenderMathMLRow::firstLineBaseline() const
</span><span class="cx"> {
</span><del>- RenderBox* baselineChild = firstChildBox();
</del><ins>+ auto* baselineChild = firstChildBox();
</ins><span class="cx"> if (!baselineChild)
</span><span class="cx"> return Optional<int>();
</span><span class="cx">
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">
</span><span class="cx"> void RenderMathMLRow::computeLineVerticalStretch(LayoutUnit& ascent, LayoutUnit& descent)
</span><span class="cx"> {
</span><del>- for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
</del><ins>+ for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
</ins><span class="cx"> if (is<RenderMathMLBlock>(child)) {
</span><span class="cx"> auto* renderOperator = downcast<RenderMathMLBlock>(child)->unembellishedOperator();
</span><span class="cx"> if (renderOperator && renderOperator->hasOperatorFlag(MathMLOperatorDictionary::Stretchy))
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx"> m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0;
</span><span class="cx">
</span><span class="cx"> LayoutUnit preferredWidth = 0;
</span><del>- for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox())
</del><ins>+ for (auto* child = firstChildBox(); child; child = child->nextSiblingBox())
</ins><span class="cx"> preferredWidth += child->maxPreferredLogicalWidth() + child->marginLogicalWidth();
</span><span class="cx">
</span><span class="cx"> m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = preferredWidth + borderAndPaddingLogicalWidth();
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx"> // We first stretch the vertical operators.
</span><span class="cx"> // For inline formulas, we can then calculate the logical width.
</span><span class="cx"> LayoutUnit width = borderAndPaddingStart();
</span><del>- for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
</del><ins>+ for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
</ins><span class="cx"> if (child->isOutOfFlowPositioned())
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="lines">@@ -138,7 +138,7 @@
</span><span class="cx"> LayoutUnit maxAscent = 0, maxDescent = 0; // Used baseline alignment.
</span><span class="cx"> LayoutUnit horizontalOffset = borderAndPaddingStart();
</span><span class="cx"> bool shouldFlipHorizontal = !style().isLeftToRightDirection();
</span><del>- for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
</del><ins>+ for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
</ins><span class="cx"> if (child->isOutOfFlowPositioned()) {
</span><span class="cx"> child->containingBlock()->insertPositionedObject(*child);
</span><span class="cx"> continue;
</span><span class="lines">@@ -168,7 +168,7 @@
</span><span class="cx"> if (shouldFlipHorizontal && centerBlockOffset > 0)
</span><span class="cx"> centerBlockOffset = -centerBlockOffset;
</span><span class="cx">
</span><del>- for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
</del><ins>+ for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
</ins><span class="cx"> LayoutUnit ascent = ascentForChild(*child);
</span><span class="cx"> LayoutUnit startOffset = maxAscent - ascent;
</span><span class="cx"> child->setLocation(child->location() + LayoutPoint(centerBlockOffset, startOffset));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLScriptscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp (202440 => 202441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp        2016-06-24 20:14:31 UTC (rev 202440)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp        2016-06-24 20:17:15 UTC (rev 202441)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">
</span><span class="cx"> RenderMathMLOperator* RenderMathMLScripts::unembellishedOperator()
</span><span class="cx"> {
</span><del>- RenderBox* base = firstChildBox();
</del><ins>+ auto base = firstChildBox();
</ins><span class="cx"> if (!is<RenderMathMLBlock>(base))
</span><span class="cx"> return nullptr;
</span><span class="cx"> return downcast<RenderMathMLBlock>(base)->unembellishedOperator();
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx"> firstPostScript = base->nextSiblingBox();
</span><span class="cx"> if (!firstPostScript || isPrescriptDelimiter(*firstPostScript))
</span><span class="cx"> return false;
</span><del>- RenderBox* superScript = firstPostScript->nextSiblingBox();
</del><ins>+ auto superScript = firstPostScript->nextSiblingBox();
</ins><span class="cx"> return superScript && !isPrescriptDelimiter(*superScript) && !superScript->nextSiblingBox();
</span><span class="cx"> }
</span><span class="cx"> case Multiscripts: {
</span><span class="lines">@@ -118,7 +118,7 @@
</span><span class="cx"> // b) That the list of prescripts can be grouped into pairs of subscript/superscript.
</span><span class="cx"> // c) That there is at most one <mprescripts/>.
</span><span class="cx"> bool numberOfScriptIsEven = true;
</span><del>- for (RenderBox* script = base->nextSiblingBox(); script; script = script->nextSiblingBox()) {
</del><ins>+ for (auto script = base->nextSiblingBox(); script; script = script->nextSiblingBox()) {
</ins><span class="cx"> if (isPrescriptDelimiter(*script)) {
</span><span class="cx"> // This is a <mprescripts/>. Let's check 2a) and 2c).
</span><span class="cx"> if (!numberOfScriptIsEven || firstPreScript)
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx"> case SubSup:
</span><span class="cx"> case Multiscripts: {
</span><span class="cx"> RenderBox* supScript;
</span><del>- for (RenderBox* subScript = firstPreScript; subScript; subScript = supScript->nextSiblingBox()) {
</del><ins>+ for (auto* subScript = firstPreScript; subScript; subScript = supScript->nextSiblingBox()) {
</ins><span class="cx"> supScript = subScript->nextSiblingBox();
</span><span class="cx"> ASSERT(supScript);
</span><span class="cx"> LayoutUnit subSupPairWidth = std::max(subScript->maxPreferredLogicalWidth(), supScript->maxPreferredLogicalWidth());
</span><span class="lines">@@ -186,7 +186,7 @@
</span><span class="cx"> m_maxPreferredLogicalWidth += subSupPairWidth + space;
</span><span class="cx"> }
</span><span class="cx"> m_maxPreferredLogicalWidth += base->maxPreferredLogicalWidth();
</span><del>- for (RenderBox* subScript = firstPostScript; subScript && !isPrescriptDelimiter(*subScript); subScript = supScript->nextSiblingBox()) {
</del><ins>+ for (auto* subScript = firstPostScript; subScript && !isPrescriptDelimiter(*subScript); subScript = supScript->nextSiblingBox()) {
</ins><span class="cx"> supScript = subScript->nextSiblingBox();
</span><span class="cx"> ASSERT(supScript);
</span><span class="cx"> LayoutUnit subSupPairWidth = std::max(std::max(LayoutUnit(0), subScript->maxPreferredLogicalWidth() - baseItalicCorrection), supScript->maxPreferredLogicalWidth());
</span><span class="lines">@@ -266,7 +266,7 @@
</span><span class="cx"> case SubSup:
</span><span class="cx"> case Multiscripts: {
</span><span class="cx"> RenderBox* supScript;
</span><del>- for (RenderBox* subScript = script; subScript && !isPrescriptDelimiter(*subScript); subScript = supScript->nextSiblingBox()) {
</del><ins>+ for (auto* subScript = script; subScript && !isPrescriptDelimiter(*subScript); subScript = supScript->nextSiblingBox()) {
</ins><span class="cx"> supScript = subScript->nextSiblingBox();
</span><span class="cx"> ASSERT(supScript);
</span><span class="cx"> subScript->layoutIfNeeded();
</span><span class="lines">@@ -368,7 +368,7 @@
</span><span class="cx">
</span><span class="cx"> // Calculate the logical width.
</span><span class="cx"> LayoutUnit logicalWidth = 0;
</span><del>- for (RenderBox* subScript = firstPreScript; subScript; subScript = supScript->nextSiblingBox()) {
</del><ins>+ for (auto* subScript = firstPreScript; subScript; subScript = supScript->nextSiblingBox()) {
</ins><span class="cx"> supScript = subScript->nextSiblingBox();
</span><span class="cx"> ASSERT(supScript);
</span><span class="cx"> LayoutUnit subSupPairWidth = std::max(subScript->logicalWidth(), supScript->logicalWidth());
</span><span class="lines">@@ -375,7 +375,7 @@
</span><span class="cx"> logicalWidth += subSupPairWidth + space;
</span><span class="cx"> }
</span><span class="cx"> logicalWidth += base->logicalWidth();
</span><del>- for (RenderBox* subScript = firstPostScript; subScript && !isPrescriptDelimiter(*subScript); subScript = supScript->nextSiblingBox()) {
</del><ins>+ for (auto* subScript = firstPostScript; subScript && !isPrescriptDelimiter(*subScript); subScript = supScript->nextSiblingBox()) {
</ins><span class="cx"> supScript = subScript->nextSiblingBox();
</span><span class="cx"> ASSERT(supScript);
</span><span class="cx"> LayoutUnit subSupPairWidth = std::max(std::max(LayoutUnit(0), subScript->logicalWidth() - baseItalicCorrection), supScript->logicalWidth());
</span><span class="lines">@@ -383,7 +383,7 @@
</span><span class="cx"> }
</span><span class="cx"> setLogicalWidth(logicalWidth);
</span><span class="cx">
</span><del>- for (RenderBox* subScript = firstPreScript; subScript; subScript = supScript->nextSiblingBox()) {
</del><ins>+ for (auto* subScript = firstPreScript; subScript; subScript = supScript->nextSiblingBox()) {
</ins><span class="cx"> supScript = subScript->nextSiblingBox();
</span><span class="cx"> ASSERT(supScript);
</span><span class="cx"> LayoutUnit subSupPairWidth = std::max(subScript->logicalWidth(), supScript->logicalWidth());
</span><span class="lines">@@ -398,7 +398,7 @@
</span><span class="cx"> LayoutPoint baseLocation(mirrorIfNeeded(horizontalOffset, *base), ascent - baseAscent);
</span><span class="cx"> base->setLocation(baseLocation);
</span><span class="cx"> horizontalOffset += base->logicalWidth();
</span><del>- for (RenderBox* subScript = firstPostScript; subScript && !isPrescriptDelimiter(*subScript); subScript = supScript->nextSiblingBox()) {
</del><ins>+ for (auto* subScript = firstPostScript; subScript && !isPrescriptDelimiter(*subScript); subScript = supScript->nextSiblingBox()) {
</ins><span class="cx"> supScript = subScript->nextSiblingBox();
</span><span class="cx"> ASSERT(supScript);
</span><span class="cx"> LayoutUnit subAscent = ascentForChild(*subScript);
</span><span class="lines">@@ -420,7 +420,7 @@
</span><span class="cx"> Optional<int> RenderMathMLScripts::firstLineBaseline() const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!needsLayout());
</span><del>- RenderBox* base = firstChildBox();
</del><ins>+ auto* base = firstChildBox();
</ins><span class="cx"> if (!base)
</span><span class="cx"> return Optional<int>();
</span><span class="cx"> return Optional<int>(static_cast<int>(lroundf(ascentForChild(*base) + base->logicalTop())));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLUnderOvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp (202440 => 202441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp        2016-06-24 20:14:31 UTC (rev 202440)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp        2016-06-24 20:17:15 UTC (rev 202441)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">
</span><span class="cx"> Optional<int> RenderMathMLUnderOver::firstLineBaseline() const
</span><span class="cx"> {
</span><del>- RenderBox* base = firstChildBox();
</del><ins>+ auto* base = firstChildBox();
</ins><span class="cx"> if (!base)
</span><span class="cx"> return Optional<int>();
</span><span class="cx">
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> // <munder> base under </munder>
</span><span class="cx"> // <mover> base over </mover>
</span><span class="cx"> // <munderover> base under over </munderover>
</span><del>- RenderBox* child = firstChildBox();
</del><ins>+ auto* child = firstChildBox();
</ins><span class="cx"> if (!child)
</span><span class="cx"> return false;
</span><span class="cx"> child = child->nextSiblingBox();
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isValid());
</span><span class="cx"> ASSERT(m_scriptType == Over || m_scriptType == UnderOver);
</span><del>- RenderBox* secondChild = firstChildBox()->nextSiblingBox();
</del><ins>+ auto* secondChild = firstChildBox()->nextSiblingBox();
</ins><span class="cx"> return m_scriptType == Over ? *secondChild : *secondChild->nextSiblingBox();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>