Title: [161493] trunk/Source/WebCore
- Revision
- 161493
- Author
- [email protected]
- Date
- 2014-01-08 03:20:11 -0800 (Wed, 08 Jan 2014)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (161492 => 161493)
--- trunk/Source/WebCore/ChangeLog 2014-01-08 10:58:37 UTC (rev 161492)
+++ trunk/Source/WebCore/ChangeLog 2014-01-08 11:20:11 UTC (rev 161493)
@@ -1,3 +1,24 @@
+2014-01-08 Andreas Kling <[email protected]>
+
+ 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 <[email protected]>
AX: Make roleValue() return DescriptionListRole for <dl> elements
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp (161492 => 161493)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp 2014-01-08 10:58:37 UTC (rev 161492)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp 2014-01-08 11:20:11 UTC (rev 161493)
@@ -163,7 +163,7 @@
// 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)
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp (161492 => 161493)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp 2014-01-08 10:58:37 UTC (rev 161492)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp 2014-01-08 11:20:11 UTC (rev 161493)
@@ -32,6 +32,7 @@
#include "MathMLNames.h"
#include "RenderIterator.h"
#include "RenderMathMLOperator.h"
+#include "RenderMathMLRoot.h"
namespace WebCore {
@@ -47,10 +48,9 @@
{
}
-// 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;
}
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h (161492 => 161493)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h 2014-01-08 10:58:37 UTC (rev 161492)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h 2014-01-08 11:20:11 UTC (rev 161493)
@@ -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();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes