Changeset 107473 in webkit


Ignore:
Timestamp:
Feb 10, 2012 8:28:26 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

MathML internals - use createXXX() function naming, ASSERT()s
https://bugs.webkit.org/show_bug.cgi?id=78384

Patch by David Barton <Dave Barton> on 2012-02-10
Reviewed by Eric Seidel.

Standard RefPtr function naming uses "createXXX" instead of "makeXXX".
I also added a couple of ASSERT()s.

No new tests.

  • rendering/mathml/RenderMathMLBlock.cpp:

(WebCore::RenderMathMLBlock::createBlockStyle):

  • rendering/mathml/RenderMathMLBlock.h:

(RenderMathMLBlock):

  • rendering/mathml/RenderMathMLFenced.cpp:

(WebCore::RenderMathMLFenced::createOperatorStyle):
(WebCore::RenderMathMLFenced::makeFences):
(WebCore::RenderMathMLFenced::addChild):

  • rendering/mathml/RenderMathMLFenced.h:

(RenderMathMLFenced):

  • rendering/mathml/RenderMathMLFraction.cpp:

(WebCore::RenderMathMLFraction::addChild):

  • rendering/mathml/RenderMathMLRoot.cpp:

(WebCore::RenderMathMLRoot::addChild):

  • rendering/mathml/RenderMathMLSubSup.cpp:

(WebCore::RenderMathMLSubSup::RenderMathMLSubSup):

  • rendering/mathml/RenderMathMLUnderOver.cpp:

(WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver):
(WebCore::RenderMathMLUnderOver::addChild):

Location:
trunk/Source/WebCore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r107472 r107473  
     12012-02-10  David Barton  <dbarton@mathscribe.com>
     2
     3        MathML internals - use createXXX() function naming, ASSERT()s
     4        https://bugs.webkit.org/show_bug.cgi?id=78384
     5
     6        Reviewed by Eric Seidel.
     7
     8        Standard RefPtr function naming uses "createXXX" instead of "makeXXX".
     9        I also added a couple of ASSERT()s.
     10
     11        No new tests.
     12
     13        * rendering/mathml/RenderMathMLBlock.cpp:
     14        (WebCore::RenderMathMLBlock::createBlockStyle):
     15        * rendering/mathml/RenderMathMLBlock.h:
     16        (RenderMathMLBlock):
     17        * rendering/mathml/RenderMathMLFenced.cpp:
     18        (WebCore::RenderMathMLFenced::createOperatorStyle):
     19        (WebCore::RenderMathMLFenced::makeFences):
     20        (WebCore::RenderMathMLFenced::addChild):
     21        * rendering/mathml/RenderMathMLFenced.h:
     22        (RenderMathMLFenced):
     23        * rendering/mathml/RenderMathMLFraction.cpp:
     24        (WebCore::RenderMathMLFraction::addChild):
     25        * rendering/mathml/RenderMathMLRoot.cpp:
     26        (WebCore::RenderMathMLRoot::addChild):
     27        * rendering/mathml/RenderMathMLSubSup.cpp:
     28        (WebCore::RenderMathMLSubSup::RenderMathMLSubSup):
     29        * rendering/mathml/RenderMathMLUnderOver.cpp:
     30        (WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver):
     31        (WebCore::RenderMathMLUnderOver::addChild):
     32
    1332012-02-10  Dan Bernstein  <mitz@apple.com>
    234
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp

    r107296 r107473  
    5050}
    5151
    52 PassRefPtr<RenderStyle> RenderMathMLBlock::makeBlockStyle()
     52PassRefPtr<RenderStyle> RenderMathMLBlock::createBlockStyle()
    5353{
    5454    RefPtr<RenderStyle> newStyle = RenderStyle::create();
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h

    r107019 r107473  
    7171        return 0;
    7272    }
    73     virtual PassRefPtr<RenderStyle> makeBlockStyle();
     73    virtual PassRefPtr<RenderStyle> createBlockStyle();
    7474
    7575private:
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp

    r107263 r107473  
    8181}
    8282
    83 PassRefPtr<RenderStyle> RenderMathMLFenced::makeOperatorStyle()
     83PassRefPtr<RenderStyle> RenderMathMLFenced::createOperatorStyle()
    8484{
    8585    RefPtr<RenderStyle> newStyle = RenderStyle::create();
     
    9393{
    9494    RenderObject* openFence = new (renderArena()) RenderMathMLOperator(node(), m_open);
    95     openFence->setStyle(makeOperatorStyle());
     95    openFence->setStyle(createOperatorStyle());
    9696    RenderBlock::addChild(openFence, firstChild());
    9797    RenderObject* closeFence = new (renderArena()) RenderMathMLOperator(node(), m_close);
    98     closeFence->setStyle(makeOperatorStyle());
     98    closeFence->setStyle(createOperatorStyle());
    9999    RenderBlock::addChild(closeFence);
    100100}
     
    123123               
    124124            RenderObject* separatorObj = new (renderArena()) RenderMathMLOperator(node(), separator);
    125             separatorObj->setStyle(makeOperatorStyle());
     125            separatorObj->setStyle(createOperatorStyle());
    126126            RenderBlock::addChild(separatorObj, lastChild());
    127127        }
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.h

    r107263 r107473  
    4242    virtual const char* renderName() const { return "RenderMathMLFenced"; }
    4343
    44     PassRefPtr<RenderStyle> makeOperatorStyle();
     44    PassRefPtr<RenderStyle> createOperatorStyle();
    4545    void makeFences();
    4646   
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp

    r107296 r107473  
    102102{
    103103    RenderBlock* row = new (renderArena()) RenderMathMLBlock(node());
    104     RefPtr<RenderStyle> rowStyle = makeBlockStyle();
     104    RefPtr<RenderStyle> rowStyle = createBlockStyle();
    105105   
    106106    rowStyle->setTextAlign(CENTER);
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp

    r107296 r107473  
    7575        // Add a block for the index
    7676        RenderBlock* block = new (renderArena()) RenderBlock(node());
    77         RefPtr<RenderStyle> indexStyle = makeBlockStyle();
     77        RefPtr<RenderStyle> indexStyle = createBlockStyle();
    7878        indexStyle->setDisplay(INLINE_BLOCK);
    7979        block->setStyle(indexStyle.release());
     
    8383        // this is the base, so wrap it so we can pad it
    8484        block = new (renderArena()) RenderBlock(node());
    85         RefPtr<RenderStyle> baseStyle = makeBlockStyle();
     85        RefPtr<RenderStyle> baseStyle = createBlockStyle();
    8686        baseStyle->setDisplay(INLINE_BLOCK);
    8787        baseStyle->setPaddingLeft(Length(5 * gRadicalWidth , Percent));
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp

    r107263 r107473  
    4444    , m_scripts(0)
    4545{
    46     // Determine what kind of under/over expression we have by element name
     46    // Determine what kind of sub/sup expression we have by element name
    4747    if (element->hasLocalName(MathMLNames::msubTag))
    4848        m_kind = Sub;
    4949    else if (element->hasLocalName(MathMLNames::msupTag))
    5050        m_kind = Sup;
    51     else if (element->hasLocalName(MathMLNames::msubsupTag))
     51    else {
     52        ASSERT(element->hasLocalName(MathMLNames::msubsupTag));
    5253        m_kind = SubSup;
    53     else
    54         m_kind = SubSup;
     54    }
    5555}
    5656
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp

    r107263 r107473  
    4343{
    4444    // Determine what kind of under/over expression we have by element name
    45    
    4645    if (element->hasLocalName(MathMLNames::munderTag))
    4746        m_kind = Under;
    4847    else if (element->hasLocalName(MathMLNames::moverTag))
    4948        m_kind = Over;
    50     else if (element->hasLocalName(MathMLNames::munderoverTag))
     49    else {
     50        ASSERT(element->hasLocalName(MathMLNames::munderoverTag));
    5151        m_kind = UnderOver;
    52     else
    53         m_kind = Under;
    54    
     52    }
    5553}
    5654
     
    5856{   
    5957    RenderMathMLBlock* row = new (renderArena()) RenderMathMLBlock(node());
    60     RefPtr<RenderStyle> rowStyle = makeBlockStyle();
     58    RefPtr<RenderStyle> rowStyle = createBlockStyle();
    6159    row->setStyle(rowStyle.release());
    6260    row->setIsAnonymous(true);
Note: See TracChangeset for help on using the changeset viewer.