RenderMathMLOperator* RenderMathMLFenced::createMathMLOperator(UChar uChar) { RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), FLEX); newStyle->setFlexDirection(FlowColumn); newStyle->setPaddingRight(Length(static_cast<int>(gOperatorPadding * style()->fontSize()), Fixed)); RenderMathMLOperator* newOperator = new (renderArena()) RenderMathMLOperator(node() /* "almost anonymous" */, uChar); newOperator->setStyle(newStyle.release()); return newOperator; }
RenderMathMLOperator* RenderMathMLFenced::createMathMLOperator(UChar uChar, RenderMathMLOperator::OperatorType operatorType) { RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), FLEX); newStyle->setFlexDirection(FlowColumn); newStyle->setMarginEnd(Length((operatorType == RenderMathMLOperator::Fence ? gFenceMarginEms : gSeparatorMarginEndEms) * style()->fontSize(), Fixed)); if (operatorType == RenderMathMLOperator::Fence) newStyle->setMarginStart(Length(gFenceMarginEms * style()->fontSize(), Fixed)); RenderMathMLOperator* newOperator = new (renderArena()) RenderMathMLOperator(toElement(node()), uChar); newOperator->setOperatorType(operatorType); newOperator->setStyle(newStyle.release()); return newOperator; }
RenderMathMLOperator* RenderMathMLFenced::createMathMLOperator(UChar uChar, RenderMathMLOperator::OperatorType operatorType) { auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), FLEX); newStyle.get().setFlexDirection(FlowColumn); newStyle.get().setMarginEnd(Length((operatorType == RenderMathMLOperator::Fence ? gFenceMarginEms : gSeparatorMarginEndEms) * style()->fontSize(), Fixed)); if (operatorType == RenderMathMLOperator::Fence) newStyle.get().setMarginStart(Length(gFenceMarginEms * style()->fontSize(), Fixed)); RenderMathMLOperator* newOperator = new RenderMathMLOperator(element(), uChar); newOperator->setOperatorType(operatorType); newOperator->setStyle(std::move(newStyle)); return newOperator; }