Ignore:
Timestamp:
Sep 20, 2013, 8:34:19 AM (12 years ago)
Author:
[email protected]
Message:

Add valueForLength/minimumValueForLength wrappers to RenderElement.
<https://webkit.org/b/121676>

Reviewed by Antti Koivisto.

Add two inline wrappers for these functions so we don't have to pass
the RenderView everywhere.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp

    r155908 r156166  
    905905}
    906906
    907 LayoutUnit RenderFlexibleBox::computeChildMarginValue(Length margin, RenderView* view)
     907LayoutUnit RenderFlexibleBox::computeChildMarginValue(const Length& margin)
    908908{
    909909    // When resolving the margins, we use the content size for resolving percent and calc (for percents in calc expressions) margins.
    910910    // Fortunately, percent margins are always computed with respect to the block's width, even for margin-top and margin-bottom.
    911911    LayoutUnit availableSize = contentLogicalWidth();
    912     return minimumValueForLength(margin, availableSize, view);
     912    return minimumValueForLength(margin, availableSize);
    913913}
    914914
    915915void RenderFlexibleBox::computeMainAxisPreferredSizes(OrderHashSet& orderValues)
    916916{
    917     RenderView* renderView = &view();
    918917    for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
    919918        orderValues.add(child->style()->order());
     
    925924        // Also, if we're not auto sizing, we don't do a layout that computes the start/end margins.
    926925        if (isHorizontalFlow()) {
    927             child->setMarginLeft(computeChildMarginValue(child->style()->marginLeft(), renderView));
    928             child->setMarginRight(computeChildMarginValue(child->style()->marginRight(), renderView));
     926            child->setMarginLeft(computeChildMarginValue(child->style()->marginLeft()));
     927            child->setMarginRight(computeChildMarginValue(child->style()->marginRight()));
    929928        } else {
    930             child->setMarginTop(computeChildMarginValue(child->style()->marginTop(), renderView));
    931             child->setMarginBottom(computeChildMarginValue(child->style()->marginBottom(), renderView));
     929            child->setMarginTop(computeChildMarginValue(child->style()->marginTop()));
     930            child->setMarginBottom(computeChildMarginValue(child->style()->marginBottom()));
    932931        }
    933932    }
Note: See TracChangeset for help on using the changeset viewer.