void RenderMathMLFenced::makeFences() { RenderPtr<RenderMathMLOperator> openFence = createMathMLOperator(m_open, MathMLOperatorDictionary::Prefix, MathMLOperatorDictionary::Fence); RenderMathMLOperator* openFencePtr = openFence.get(); RenderMathMLRow::addChild(openFence.leakPtr(), firstChild()); RenderPtr<RenderMathMLOperator> closeFence = createMathMLOperator(m_close, MathMLOperatorDictionary::Postfix, MathMLOperatorDictionary::Fence); m_closeFenceRenderer = closeFence.get(); RenderMathMLRow::addChild(closeFence.leakPtr()); openFencePtr->updateFromElement(); m_closeFenceRenderer->updateFromElement(); }
void RenderMathMLFraction::addChild(RenderObject* child, RenderObject* /* beforeChild */) { if (isEmpty()) { RenderPtr<RenderMathMLBlock> numeratorWrapper = createAnonymousMathMLBlock(); fixChildStyle(numeratorWrapper.get()); RenderMathMLBlock::addChild(numeratorWrapper.leakPtr()); RenderPtr<RenderMathMLBlock> denominatorWrapper = createAnonymousMathMLBlock(); fixChildStyle(denominatorWrapper.get()); RenderMathMLBlock::addChild(denominatorWrapper.leakPtr()); } if (firstChild()->isEmpty()) downcast<RenderElement>(*firstChild()).addChild(child); else downcast<RenderElement>(*lastChild()).addChild(child); updateFromElement(); }
RenderPtr<RenderElement> SVGMaskElement::createElementRenderer(Ref<RenderStyle>&& style) { RenderPtr<RenderElement> maskRenderer = createRenderer<RenderSVGResourceMasker>(*this, WTF::move(style)); // Pass along existing render layer clients. for (auto* clientLayer : m_clientLayers) static_cast<RenderSVGResourceMasker*>(maskRenderer.get())->addClientRenderLayer(clientLayer); return maskRenderer; }