Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: Source/core/rendering/RenderFlexibleBox.h

Issue 129633004: Avoid unnecessary forced layout of flex items when stretching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 LayoutUnit computeChildMarginValue(Length margin); 138 LayoutUnit computeChildMarginValue(Length margin);
139 void prepareOrderIteratorAndMargins(); 139 void prepareOrderIteratorAndMargins();
140 LayoutUnit adjustChildSizeForMinAndMax(RenderBox*, LayoutUnit childSize); 140 LayoutUnit adjustChildSizeForMinAndMax(RenderBox*, LayoutUnit childSize);
141 // The hypothetical main size of an item is the flex base size clamped accor ding to its min and max main size properties 141 // The hypothetical main size of an item is the flex base size clamped accor ding to its min and max main size properties
142 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s umFlexBaseSize, double& totalFlexGrow, double& totalWeightedFlexShrink, LayoutUn it& sumHypotheticalMainSize, bool& hasInfiniteLineLength); 142 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s umFlexBaseSize, double& totalFlexGrow, double& totalWeightedFlexShrink, LayoutUn it& sumHypotheticalMainSize, bool& hasInfiniteLineLength);
143 143
144 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit & availableFreeSpace, double& totalFlexGrow, double& totalWeightedFlexShrink, In flexibleFlexItemSize&, Vector<LayoutUnit>& childSizes, bool hasInfiniteLineLengt h); 144 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit & availableFreeSpace, double& totalFlexGrow, double& totalWeightedFlexShrink, In flexibleFlexItemSize&, Vector<LayoutUnit>& childSizes, bool hasInfiniteLineLengt h);
145 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa ce, double& totalFlexGrow, double& totalWeightedFlexShrink, InflexibleFlexItemSi ze&, bool hasInfiniteLineLength); 145 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa ce, double& totalFlexGrow, double& totalWeightedFlexShrink, InflexibleFlexItemSi ze&, bool hasInfiniteLineLength);
146 146
147 void resetAutoMarginsAndLogicalTopInCrossAxis(RenderBox*); 147 void resetAutoMarginsAndLogicalTopInCrossAxis(RenderBox*);
148 bool needToStretchChild(RenderBox*);
149 void setLogicalOverrideSize(RenderBox* child, LayoutUnit childPreferredSize) ; 148 void setLogicalOverrideSize(RenderBox* child, LayoutUnit childPreferredSize) ;
150 void prepareChildForPositionedLayout(RenderBox* child, LayoutUnit mainAxisOf fset, LayoutUnit crossAxisOffset, PositionedLayoutMode); 149 void prepareChildForPositionedLayout(RenderBox* child, LayoutUnit mainAxisOf fset, LayoutUnit crossAxisOffset, PositionedLayoutMode);
151 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; 150 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const;
152 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt emList&, const Vector<LayoutUnit>& childSizes, LayoutUnit availableFreeSpace, bo ol relayoutChildren, Vector<LineContext>&); 151 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt emList&, const Vector<LayoutUnit>& childSizes, LayoutUnit availableFreeSpace, bo ol relayoutChildren, Vector<LineContext>&);
153 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff set, LayoutUnit availableFreeSpace); 152 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff set, LayoutUnit availableFreeSpace);
154 void alignFlexLines(Vector<LineContext>&); 153 void alignFlexLines(Vector<LineContext>&);
155 void alignChildren(const Vector<LineContext>&); 154 void alignChildren(const Vector<LineContext>&);
156 void applyStretchAlignmentToChild(RenderBox*, LayoutUnit lineCrossAxisExtent ); 155 void applyStretchAlignmentToChild(RenderBox*, LayoutUnit lineCrossAxisExtent );
157 void flipForRightToLeftColumn(); 156 void flipForRightToLeftColumn();
158 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar tEdge); 157 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar tEdge);
159 158
160 mutable OrderIterator m_orderIterator; 159 mutable OrderIterator m_orderIterator;
161 int m_numberOfInFlowChildrenOnFirstLine; 160 int m_numberOfInFlowChildrenOnFirstLine;
162 }; 161 };
163 162
164 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFlexibleBox, isFlexibleBox()); 163 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFlexibleBox, isFlexibleBox());
165 164
166 } // namespace WebCore 165 } // namespace WebCore
167 166
168 #endif // RenderFlexibleBox_h 167 #endif // RenderFlexibleBox_h
OLDNEW
« no previous file with comments | « PerformanceTests/flexbox-with-stretch-layout.html ('k') | Source/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698