Changeset 156798 in webkit


Ignore:
Timestamp:
Oct 2, 2013 2:44:11 PM (11 years ago)
Author:
zoltan@webkit.org
Message:

[CSS Shapes] Move ShapeInsideInfo::updateSegmentsForLine implementations into the cpp
https://bugs.webkit.org/show_bug.cgi?id=122236

Reviewed by Oliver Hunt.

There is no reason for updateSegmentsForLine methods to be inline. I moved them to the cpp.

No new tests, no behavior change.

  • rendering/shapes/ShapeInsideInfo.cpp:

(WebCore::ShapeInsideInfo::updateSegmentsForLine):

  • rendering/shapes/ShapeInsideInfo.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r156795 r156798  
     12013-10-02  Zoltan Horvath  <zoltan@webkit.org>
     2
     3        [CSS Shapes] Move ShapeInsideInfo::updateSegmentsForLine implementations into the cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=122236
     5
     6        Reviewed by Oliver Hunt.
     7
     8        There is no reason for updateSegmentsForLine methods to be inline. I moved them to the cpp.
     9
     10        No new tests, no behavior change.
     11
     12        * rendering/shapes/ShapeInsideInfo.cpp:
     13        (WebCore::ShapeInsideInfo::updateSegmentsForLine):
     14        * rendering/shapes/ShapeInsideInfo.h:
     15
    1162013-10-02  Andreas Kling  <akling@apple.com>
    217
  • trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.cpp

    r156022 r156798  
    6060}
    6161
     62bool ShapeInsideInfo::updateSegmentsForLine(LayoutSize lineOffset, LayoutUnit lineHeight)
     63{
     64    m_segmentRanges.clear();
     65    bool result = updateSegmentsForLine(lineOffset.height(), lineHeight);
     66    for (size_t i = 0; i < m_segments.size(); i++) {
     67        m_segments[i].logicalLeft -= lineOffset.width();
     68        m_segments[i].logicalRight -= lineOffset.width();
     69    }
     70    return result;
     71}
     72
     73bool ShapeInsideInfo::updateSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight)
     74{
     75    ASSERT(lineHeight >= 0);
     76    m_shapeLineTop = lineTop - logicalTopOffset();
     77    m_lineHeight = lineHeight;
     78    m_segments.clear();
     79    m_segmentRanges.clear();
     80
     81    if (lineOverlapsShapeBounds())
     82        m_segments = computeSegmentsForLine(lineTop, lineHeight);
     83
     84    return m_segments.size();
     85}
     86
    6287bool ShapeInsideInfo::adjustLogicalLineTop(float minSegmentWidth)
    6388{
  • trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.h

    r156618 r156798  
    7070    static bool isEnabledFor(const RenderBlock* renderer);
    7171
    72     bool updateSegmentsForLine(LayoutSize lineOffset, LayoutUnit lineHeight)
    73     {
    74         m_segmentRanges.clear();
    75         bool result = updateSegmentsForLine(lineOffset.height(), lineHeight);
    76         for (size_t i = 0; i < m_segments.size(); i++) {
    77             m_segments[i].logicalLeft -= lineOffset.width();
    78             m_segments[i].logicalRight -= lineOffset.width();
    79         }
    80         return result;
    81     }
    82 
    83     bool updateSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight)
    84     {
    85         ASSERT(lineHeight >= 0);
    86         m_shapeLineTop = lineTop - logicalTopOffset();
    87         m_lineHeight = lineHeight;
    88         m_segments.clear();
    89         m_segmentRanges.clear();
    90 
    91         if (lineOverlapsShapeBounds())
    92             m_segments = computeSegmentsForLine(lineTop, lineHeight);
    93 
    94         return m_segments.size();
    95     }
     72    bool updateSegmentsForLine(LayoutSize lineOffset, LayoutUnit lineHeight);
     73    bool updateSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight);
    9674
    9775    bool hasSegments() const
Note: See TracChangeset for help on using the changeset viewer.