Changeset 161482 in webkit


Ignore:
Timestamp:
Jan 7, 2014 10:42:50 PM (10 years ago)
Author:
akling@apple.com
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.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r161481 r161482  
     12014-01-07  Andreas Kling  <akling@apple.com>
     2
     3        createAnonymousMathMLBlock() should return RenderPtr.
     4        <https://webkit.org/b/126583>
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * rendering/mathml/RenderMathMLBlock.h:
     9        * rendering/mathml/RenderMathMLBlock.cpp:
     10        (WebCore::RenderMathMLBlock::createAnonymousMathMLBlock):
     11
     12            Make this return a RenderPtr<RenderMathMLBlock> and removed the
     13            EDisplay argument since it was always using the default (FLEX.)
     14
     15        * rendering/mathml/RenderMathMLFraction.cpp:
     16        (WebCore::RenderMathMLFraction::addChild):
     17
     18            Updated for the new createAnonymousMathMLBlock() signature.
     19
    1202014-01-07  Eric Carlson  <eric.carlson@apple.com>
    221
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp

    r158163 r161482  
    6161}
    6262
    63 RenderMathMLBlock* RenderMathMLBlock::createAnonymousMathMLBlock(EDisplay display)
    64 {
    65     RenderMathMLBlock* newBlock = new RenderMathMLBlock(document(), RenderStyle::createAnonymousStyleWithDisplay(&style(), display));
     63RenderPtr<RenderMathMLBlock> RenderMathMLBlock::createAnonymousMathMLBlock()
     64{
     65    RenderPtr<RenderMathMLBlock> newBlock = createRenderer<RenderMathMLBlock>(document(), RenderStyle::createAnonymousStyleWithDisplay(&style(), FLEX));
    6666    newBlock->initializeStyle();
    6767    return newBlock;
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h

    r159794 r161482  
    6363   
    6464    // Create a new RenderMathMLBlock, with a new style inheriting from this->style().
    65     RenderMathMLBlock* createAnonymousMathMLBlock(EDisplay = FLEX);
     65    RenderPtr<RenderMathMLBlock> createAnonymousMathMLBlock();
    6666   
    6767    void setIgnoreInAccessibilityTree(bool flag) { m_ignoreInAccessibilityTree = flag; }
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp

    r158163 r161482  
    9191{
    9292    if (isEmpty()) {
    93         RenderMathMLBlock* numeratorWrapper = createAnonymousMathMLBlock();
    94         RenderMathMLBlock::addChild(numeratorWrapper);
    95         fixChildStyle(numeratorWrapper);
     93        RenderPtr<RenderMathMLBlock> numeratorWrapper = createAnonymousMathMLBlock();
     94        fixChildStyle(numeratorWrapper.get());
     95        RenderMathMLBlock::addChild(numeratorWrapper.leakPtr());
    9696       
    97         RenderMathMLBlock* denominatorWrapper = createAnonymousMathMLBlock();
    98         RenderMathMLBlock::addChild(denominatorWrapper);
    99         fixChildStyle(denominatorWrapper);
     97        RenderPtr<RenderMathMLBlock> denominatorWrapper = createAnonymousMathMLBlock();
     98        fixChildStyle(denominatorWrapper.get());
     99        RenderMathMLBlock::addChild(denominatorWrapper.leakPtr());
    100100    }
    101101   
Note: See TracChangeset for help on using the changeset viewer.