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

Side by Side Diff: Source/core/layout/LayoutFlexibleBox.h

Issue 1098593002: [css-flexbox] Performance optimization: Only apply min-width: auto when flex-shrinking an item (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comment Created 5 years, 8 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
« no previous file with comments | « no previous file | Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&); 137 void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&);
138 LayoutUnit clientLogicalBottomAfterRepositioning(); 138 LayoutUnit clientLogicalBottomAfterRepositioning();
139 void appendChildFrameRects(ChildFrameRects&); 139 void appendChildFrameRects(ChildFrameRects&);
140 140
141 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent, L ayoutBox& child); 141 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent, L ayoutBox& child);
142 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit lineCr ossAxisExtent, LayoutBox& child); 142 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit lineCr ossAxisExtent, LayoutBox& child);
143 LayoutUnit marginBoxAscentForChild(LayoutBox& child); 143 LayoutUnit marginBoxAscentForChild(LayoutBox& child);
144 144
145 LayoutUnit computeChildMarginValue(Length margin); 145 LayoutUnit computeChildMarginValue(Length margin);
146 void prepareOrderIteratorAndMargins(); 146 void prepareOrderIteratorAndMargins();
147 LayoutUnit adjustChildSizeForMinAndMax(LayoutBox& child, LayoutUnit childSiz e); 147 LayoutUnit adjustChildSizeForMinAndMax(LayoutBox& child, LayoutUnit childSiz e, bool childShrunk = false);
148 // The hypothetical main size of an item is the flex base size clamped accor ding to its min and max main size properties 148 // The hypothetical main size of an item is the flex base size clamped accor ding to its min and max main size properties
149 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s umFlexBaseSize, double& totalFlexGrow, double& totalWeightedFlexShrink, LayoutUn it& sumHypotheticalMainSize, bool relayoutChildren); 149 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s umFlexBaseSize, double& totalFlexGrow, double& totalWeightedFlexShrink, LayoutUn it& sumHypotheticalMainSize, bool relayoutChildren);
150 150
151 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit & availableFreeSpace, double& totalFlexGrow, double& totalWeightedFlexShrink, In flexibleFlexItemSize&, Vector<LayoutUnit, 16>& childSizes); 151 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit & availableFreeSpace, double& totalFlexGrow, double& totalWeightedFlexShrink, In flexibleFlexItemSize&, Vector<LayoutUnit, 16>& childSizes);
152 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa ce, double& totalFlexGrow, double& totalWeightedFlexShrink, InflexibleFlexItemSi ze&); 152 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa ce, double& totalFlexGrow, double& totalWeightedFlexShrink, InflexibleFlexItemSi ze&);
153 153
154 void resetAutoMarginsAndLogicalTopInCrossAxis(LayoutBox& child); 154 void resetAutoMarginsAndLogicalTopInCrossAxis(LayoutBox& child);
155 void setOverrideMainAxisSizeForChild(LayoutBox& child, LayoutUnit childPrefe rredSize); 155 void setOverrideMainAxisSizeForChild(LayoutBox& child, LayoutUnit childPrefe rredSize);
156 void prepareChildForPositionedLayout(LayoutBox& child, LayoutUnit mainAxisOf fset, LayoutUnit crossAxisOffset, PositionedLayoutMode); 156 void prepareChildForPositionedLayout(LayoutBox& child, LayoutUnit mainAxisOf fset, LayoutUnit crossAxisOffset, PositionedLayoutMode);
157 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; 157 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const;
(...skipping 10 matching lines...) Expand all
168 168
169 mutable OrderIterator m_orderIterator; 169 mutable OrderIterator m_orderIterator;
170 int m_numberOfInFlowChildrenOnFirstLine; 170 int m_numberOfInFlowChildrenOnFirstLine;
171 }; 171 };
172 172
173 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); 173 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox());
174 174
175 } // namespace blink 175 } // namespace blink
176 176
177 #endif // LayoutFlexibleBox_h 177 #endif // LayoutFlexibleBox_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698