Changeset 83679 in webkit


Ignore:
Timestamp:
Apr 12, 2011 6:35:24 PM (13 years ago)
Author:
yael.aharon@nokia.com
Message:

Rename onEndChain and make it a static method.
https://bugs.webkit.org/show_bug.cgi?id=58403

Reviewed by Eric Seidel.

No new tests since this is refactoring only.

  • rendering/InlineFlowBox.cpp:

(WebCore::isLastChildForRenderer):
(WebCore::InlineFlowBox::determineSpacingForFlowBoxes):

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

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83676 r83679  
     12011-04-12  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Rename onEndChain and make it a static method.
     6        https://bugs.webkit.org/show_bug.cgi?id=58403
     7
     8        No new tests since this is refactoring only.
     9
     10        * rendering/InlineFlowBox.cpp:
     11        (WebCore::isLastChildForRenderer):
     12        (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
     13        * rendering/InlineFlowBox.h:
     14
    1152011-04-12  Eric Carlson  <eric.carlson@apple.com>
    216
  • trunk/Source/WebCore/rendering/InlineFlowBox.cpp

    r83638 r83679  
    253253}
    254254
    255 bool InlineFlowBox::onEndChain(RenderObject* endObject)
    256 {
    257     if (!endObject)
     255static inline bool isLastChildForRenderer(RenderObject* ancestor, RenderObject* child)
     256{
     257    if (!child)
    258258        return false;
    259259   
    260     if (endObject == renderer())
     260    if (child == ancestor)
    261261        return true;
    262262
    263     RenderObject* curr = endObject;
     263    RenderObject* curr = child;
    264264    RenderObject* parent = curr->parent();
    265265    while (parent && (!parent->isRenderBlock() || parent->isInline())) {
    266266        if (parent->lastChild() != curr)
    267267            return false;
    268         if (parent == renderer())
     268        if (parent == ancestor)
    269269            return true;
    270270           
     
    310310        if (!lineBoxList->lastLineBox()->isConstructed()) {
    311311            RenderInline* inlineFlow = toRenderInline(renderer());
    312             bool isLastObjectOnLine = !isAnsectorAndWithinBlock(renderer(), logicallyLastRunRenderer) || (onEndChain(logicallyLastRunRenderer) && !isLogicallyLastRunWrapped);
     312            bool isLastObjectOnLine = !isAnsectorAndWithinBlock(renderer(), logicallyLastRunRenderer) || (isLastChildForRenderer(renderer(), logicallyLastRunRenderer) && !isLogicallyLastRunWrapped);
    313313
    314314            // We include the border under these conditions:
  • trunk/Source/WebCore/rendering/InlineFlowBox.h

    r83638 r83679  
    162162    void determineSpacingForFlowBoxes(bool lastLine, bool isLogicallyLastRunWrapped, RenderObject* logicallyLastRunRenderer);
    163163    int getFlowSpacingLogicalWidth();
    164     bool onEndChain(RenderObject* endObject);
    165164    float placeBoxesInInlineDirection(float logicalLeft, bool& needsWordSpacing, GlyphOverflowAndFallbackFontsMap&);
    166165    void computeLogicalBoxHeights(RootInlineBox*, int& maxPositionTop, int& maxPositionBottom,
Note: See TracChangeset for help on using the changeset viewer.