Title: [161482] trunk/Source/WebCore
Revision
161482
Author
akl...@apple.com
Date
2014-01-07 22:42:50 -0800 (Tue, 07 Jan 2014)

Log Message

createAnonymousMathMLBlock() should return RenderPtr.
<https://webkit.org/b/126583>

Reviewed by Antti Koivisto.

* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::createAnonymousMathMLBlock):

    Make this return a RenderPtr<RenderMathMLBlock> and removed the
    EDisplay argument since it was always using the default (FLEX.)

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

    Updated for the new createAnonymousMathMLBlock() signature.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (161481 => 161482)


--- trunk/Source/WebCore/ChangeLog	2014-01-08 05:45:55 UTC (rev 161481)
+++ trunk/Source/WebCore/ChangeLog	2014-01-08 06:42:50 UTC (rev 161482)
@@ -1,3 +1,22 @@
+2014-01-07  Andreas Kling  <akl...@apple.com>
+
+        createAnonymousMathMLBlock() should return RenderPtr.
+        <https://webkit.org/b/126583>
+
+        Reviewed by Antti Koivisto.
+
+        * rendering/mathml/RenderMathMLBlock.h:
+        * rendering/mathml/RenderMathMLBlock.cpp:
+        (WebCore::RenderMathMLBlock::createAnonymousMathMLBlock):
+
+            Make this return a RenderPtr<RenderMathMLBlock> and removed the
+            EDisplay argument since it was always using the default (FLEX.)
+
+        * rendering/mathml/RenderMathMLFraction.cpp:
+        (WebCore::RenderMathMLFraction::addChild):
+
+            Updated for the new createAnonymousMathMLBlock() signature.
+
 2014-01-07  Eric Carlson  <eric.carl...@apple.com>
 
         Teach MediaSessionManager to manage interruptions

Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp (161481 => 161482)


--- trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp	2014-01-08 05:45:55 UTC (rev 161481)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp	2014-01-08 06:42:50 UTC (rev 161482)
@@ -60,9 +60,9 @@
     return child.node() && isElement(*child.node());
 }
 
-RenderMathMLBlock* RenderMathMLBlock::createAnonymousMathMLBlock(EDisplay display)
+RenderPtr<RenderMathMLBlock> RenderMathMLBlock::createAnonymousMathMLBlock()
 {
-    RenderMathMLBlock* newBlock = new RenderMathMLBlock(document(), RenderStyle::createAnonymousStyleWithDisplay(&style(), display));
+    RenderPtr<RenderMathMLBlock> newBlock = createRenderer<RenderMathMLBlock>(document(), RenderStyle::createAnonymousStyleWithDisplay(&style(), FLEX));
     newBlock->initializeStyle();
     return newBlock;
 }

Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h (161481 => 161482)


--- trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h	2014-01-08 05:45:55 UTC (rev 161481)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h	2014-01-08 06:42:50 UTC (rev 161482)
@@ -62,7 +62,7 @@
 #endif
     
     // Create a new RenderMathMLBlock, with a new style inheriting from this->style().
-    RenderMathMLBlock* createAnonymousMathMLBlock(EDisplay = FLEX);
+    RenderPtr<RenderMathMLBlock> createAnonymousMathMLBlock();
     
     void setIgnoreInAccessibilityTree(bool flag) { m_ignoreInAccessibilityTree = flag; }
     bool ignoreInAccessibilityTree() const { return m_ignoreInAccessibilityTree; }

Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp (161481 => 161482)


--- trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp	2014-01-08 05:45:55 UTC (rev 161481)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp	2014-01-08 06:42:50 UTC (rev 161482)
@@ -90,13 +90,13 @@
 void RenderMathMLFraction::addChild(RenderObject* child, RenderObject* /* beforeChild */)
 {
     if (isEmpty()) {
-        RenderMathMLBlock* numeratorWrapper = createAnonymousMathMLBlock();
-        RenderMathMLBlock::addChild(numeratorWrapper);
-        fixChildStyle(numeratorWrapper);
+        RenderPtr<RenderMathMLBlock> numeratorWrapper = createAnonymousMathMLBlock();
+        fixChildStyle(numeratorWrapper.get());
+        RenderMathMLBlock::addChild(numeratorWrapper.leakPtr());
         
-        RenderMathMLBlock* denominatorWrapper = createAnonymousMathMLBlock();
-        RenderMathMLBlock::addChild(denominatorWrapper);
-        fixChildStyle(denominatorWrapper);
+        RenderPtr<RenderMathMLBlock> denominatorWrapper = createAnonymousMathMLBlock();
+        fixChildStyle(denominatorWrapper.get());
+        RenderMathMLBlock::addChild(denominatorWrapper.leakPtr());
     }
     
     if (firstChild()->isEmpty())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to