Changeset 225148 in webkit


Ignore:
Timestamp:
Nov 26, 2017 2:13:08 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Cleanup code for RenderMathMLUnderOver::layoutBlock
https://bugs.webkit.org/show_bug.cgi?id=179681

Patch by Minsheng Liu <lambda@liu.ms> on 2017-11-26
Reviewed by Frédéric Wang.

The patch removes some unnecessary calls to layoutIfNeeds() and guards the change
with assertion. Since there is no behavior change, no new tests are required.

  • rendering/mathml/RenderMathMLUnderOver.cpp:

(WebCore::RenderMathMLUnderOver::stretchHorizontalOperatorsAndLayoutChildren):
(WebCore::RenderMathMLUnderOver::layoutBlock):
(WebCore::RenderMathMLUnderOver::computeOperatorsHorizontalStretch): Deleted.

  • rendering/mathml/RenderMathMLUnderOver.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r225147 r225148  
     12017-11-26  Minsheng Liu  <lambda@liu.ms>
     2
     3        Cleanup code for RenderMathMLUnderOver::layoutBlock
     4        https://bugs.webkit.org/show_bug.cgi?id=179681
     5
     6        Reviewed by Frédéric Wang.
     7
     8        The patch removes some unnecessary calls to layoutIfNeeds() and guards the change
     9        with assertion. Since there is no behavior change, no new tests are required.
     10
     11        * rendering/mathml/RenderMathMLUnderOver.cpp:
     12        (WebCore::RenderMathMLUnderOver::stretchHorizontalOperatorsAndLayoutChildren):
     13        (WebCore::RenderMathMLUnderOver::layoutBlock):
     14        (WebCore::RenderMathMLUnderOver::computeOperatorsHorizontalStretch): Deleted.
     15        * rendering/mathml/RenderMathMLUnderOver.h:
     16
    1172017-11-26  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp

    r224894 r225148  
    5151}
    5252
    53 void RenderMathMLUnderOver::computeOperatorsHorizontalStretch()
     53void RenderMathMLUnderOver::stretchHorizontalOperatorsAndLayoutChildren()
    5454{
    5555    LayoutUnit stretchWidth = 0;
     
    262262    recomputeLogicalWidth();
    263263
    264     computeOperatorsHorizontalStretch();
    265 
    266     base().layoutIfNeeded();
    267     if (m_scriptType == Under || m_scriptType == UnderOver)
    268         under().layoutIfNeeded();
    269     if (m_scriptType == Over || m_scriptType == UnderOver)
    270         over().layoutIfNeeded();
    271 
     264    stretchHorizontalOperatorsAndLayoutChildren();
     265
     266    ASSERT(!base().needsLayout());
     267    ASSERT(m_scriptType == Over || !under().needsLayout());
     268    ASSERT(m_scriptType == Under || !over().needsLayout());
     269   
    272270    LayoutUnit logicalWidth = base().logicalWidth();
    273271    if (m_scriptType == Under || m_scriptType == UnderOver)
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h

    r224537 r225148  
    4949    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
    5050
    51     void computeOperatorsHorizontalStretch();
     51    void stretchHorizontalOperatorsAndLayoutChildren();
    5252    bool isValid() const;
    5353    bool shouldMoveLimits();
Note: See TracChangeset for help on using the changeset viewer.