Replace WTF::move with WTFMove
[WebKit-https.git] / Source / WebCore / rendering / mathml / RenderMathMLUnderOver.cpp
index de46931..b0c34c0 100644 (file)
@@ -38,8 +38,8 @@ namespace WebCore {
 
 using namespace MathMLNames;
     
-RenderMathMLUnderOver::RenderMathMLUnderOver(Element& element, PassRef<RenderStyle> style)
-    : RenderMathMLBlock(element, WTF::move(style))
+RenderMathMLUnderOver::RenderMathMLUnderOver(Element& element, Ref<RenderStyle>&& style)
+    : RenderMathMLBlock(element, WTFMove(style))
 {
     // Determine what kind of under/over expression we have by element name
     if (element.hasTagName(MathMLNames::munderTag))
@@ -60,14 +60,14 @@ RenderMathMLOperator* RenderMathMLUnderOver::unembellishedOperator()
     return downcast<RenderMathMLBlock>(*base).unembellishedOperator();
 }
 
-int RenderMathMLUnderOver::firstLineBaseline() const
+Optional<int> RenderMathMLUnderOver::firstLineBaseline() const
 {
     RenderBox* base = firstChildBox();
     if (!base)
-        return -1;
-    LayoutUnit baseline = base->firstLineBaseline();
-    if (baseline != -1)
-        baseline += base->logicalTop();
+        return Optional<int>();
+    Optional<int> baseline = base->firstLineBaseline();
+    if (baseline)
+        baseline.value() += static_cast<int>(base->logicalTop());
     return baseline;
 }
 
@@ -80,8 +80,10 @@ void RenderMathMLUnderOver::layout()
         if (child->needsLayout()) {
             if (is<RenderMathMLBlock>(child)) {
                 if (auto renderOperator = downcast<RenderMathMLBlock>(*child).unembellishedOperator()) {
-                    renderOperator->resetStretchSize();
-                    renderOperators.append(renderOperator);
+                    if (!renderOperator->isVertical()) {
+                        renderOperator->resetStretchSize();
+                        renderOperators.append(renderOperator);
+                    }
                 }
             }