Changeset 156166 in webkit for trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
- Timestamp:
- Sep 20, 2013, 8:34:19 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r155908 r156166 905 905 } 906 906 907 LayoutUnit RenderFlexibleBox::computeChildMarginValue( Length margin, RenderView* view)907 LayoutUnit RenderFlexibleBox::computeChildMarginValue(const Length& margin) 908 908 { 909 909 // When resolving the margins, we use the content size for resolving percent and calc (for percents in calc expressions) margins. 910 910 // Fortunately, percent margins are always computed with respect to the block's width, even for margin-top and margin-bottom. 911 911 LayoutUnit availableSize = contentLogicalWidth(); 912 return minimumValueForLength(margin, availableSize , view);912 return minimumValueForLength(margin, availableSize); 913 913 } 914 914 915 915 void RenderFlexibleBox::computeMainAxisPreferredSizes(OrderHashSet& orderValues) 916 916 { 917 RenderView* renderView = &view();918 917 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) { 919 918 orderValues.add(child->style()->order()); … … 925 924 // Also, if we're not auto sizing, we don't do a layout that computes the start/end margins. 926 925 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())); 929 928 } 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())); 932 931 } 933 932 }
Note:
See TracChangeset
for help on using the changeset viewer.