Commit 7d018216 authored by akling@apple.com's avatar akling@apple.com

RenderMathMLRow::createAnonymousWithParentRenderer() should return RenderPtr.

<https://webkit.org/b/126631>

Reviewed by Antti Koivisto.

* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::createAnonymousWithParentRenderer):

    Tweak to return RenderPtr<RenderMathMLRow> and removed comment(!)
    about how this should return a smart pointer. Also take the
    parent renderer as a RenderMathMLRoot& instead of a RenderObject*
    since that's all we ever pass.

* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::addChild):

    Updated for new createAnonymousWithParentRenderer() signature.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 12d4ac46
2014-01-08 Andreas Kling <akling@apple.com>
RenderMathMLRow::createAnonymousWithParentRenderer() should return RenderPtr.
<https://webkit.org/b/126631>
Reviewed by Antti Koivisto.
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::createAnonymousWithParentRenderer):
Tweak to return RenderPtr<RenderMathMLRow> and removed comment(!)
about how this should return a smart pointer. Also take the
parent renderer as a RenderMathMLRoot& instead of a RenderObject*
since that's all we ever pass.
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::addChild):
Updated for new createAnonymousWithParentRenderer() signature.
2014-01-08 Mario Sanchez Prada <mario.prada@samsung.com>
AX: Make roleValue() return DescriptionListRole for <dl> elements
......@@ -163,7 +163,7 @@ void RenderMathMLRoot::addChild(RenderObject* newChild, RenderObject* beforeChil
// Insert an implicit <mrow> for <mroot> as well as <msqrt>, to ensure firstChild() will have a box
// to measure and store a glyph-based height for preferredLogicalHeightAfterSizing.
if (!firstChild())
RenderMathMLBlock::addChild(RenderMathMLRow::createAnonymousWithParentRenderer(this));
RenderMathMLBlock::addChild(RenderMathMLRow::createAnonymousWithParentRenderer(*this).leakPtr());
// An <mroot>'s index has { position: absolute }.
if (newChild->style().position() == AbsolutePosition)
......
......@@ -32,6 +32,7 @@
#include "MathMLNames.h"
#include "RenderIterator.h"
#include "RenderMathMLOperator.h"
#include "RenderMathMLRoot.h"
namespace WebCore {
......@@ -47,10 +48,9 @@ RenderMathMLRow::RenderMathMLRow(Document& document, PassRef<RenderStyle> style)
{
}
// FIXME: Change all these createAnonymous... routines to return a PassOwnPtr<>.
RenderMathMLRow* RenderMathMLRow::createAnonymousWithParentRenderer(const RenderObject* parent)
RenderPtr<RenderMathMLRow> RenderMathMLRow::createAnonymousWithParentRenderer(RenderMathMLRoot& parent)
{
RenderMathMLRow* newMRow = new RenderMathMLRow(parent->document(), RenderStyle::createAnonymousStyleWithDisplay(&parent->style(), FLEX));
RenderPtr<RenderMathMLRow> newMRow = createRenderer<RenderMathMLRow>(parent.document(), RenderStyle::createAnonymousStyleWithDisplay(&parent.style(), FLEX));
newMRow->initializeStyle();
return newMRow;
}
......
......@@ -31,13 +31,15 @@
#include "RenderMathMLBlock.h"
namespace WebCore {
class RenderMathMLRoot;
class RenderMathMLRow : public RenderMathMLBlock {
public:
RenderMathMLRow(Element&, PassRef<RenderStyle>);
RenderMathMLRow(Document&, PassRef<RenderStyle>);
static RenderMathMLRow* createAnonymousWithParentRenderer(const RenderObject*);
static RenderPtr<RenderMathMLRow> createAnonymousWithParentRenderer(RenderMathMLRoot&);
protected:
virtual void layout();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment