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

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

Issue 1421423005: [css-flexbox] Fix min-size: auto for a non-auto flex basis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 5 years, 1 month 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
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 bool updateAutoMarginsInCrossAxis(LayoutBox& child, LayoutUnit availableAlig nmentSpace); 143 bool updateAutoMarginsInCrossAxis(LayoutBox& child, LayoutUnit availableAlig nmentSpace);
144 void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&); 144 void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&);
145 LayoutUnit clientLogicalBottomAfterRepositioning(); 145 LayoutUnit clientLogicalBottomAfterRepositioning();
146 146
147 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent, c onst LayoutBox& child); 147 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent, c onst LayoutBox& child);
148 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit lineCr ossAxisExtent, const LayoutBox& child); 148 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit lineCr ossAxisExtent, const LayoutBox& child);
149 LayoutUnit marginBoxAscentForChild(const LayoutBox& child); 149 LayoutUnit marginBoxAscentForChild(const LayoutBox& child);
150 150
151 LayoutUnit computeChildMarginValue(Length margin); 151 LayoutUnit computeChildMarginValue(Length margin);
152 void prepareOrderIteratorAndMargins(); 152 void prepareOrderIteratorAndMargins();
153 LayoutUnit adjustChildSizeForMinAndMax(const LayoutBox& child, LayoutUnit ch ildSize, bool childShrunk = false); 153 LayoutUnit adjustChildSizeForMinAndMax(const LayoutBox& child, LayoutUnit ch ildSize);
154 // The hypothetical main size of an item is the flex base size clamped accor ding to its min and max main size properties 154 // The hypothetical main size of an item is the flex base size clamped accor ding to its min and max main size properties
155 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s umFlexBaseSize, double& totalFlexGrow, double& totalWeightedFlexShrink, LayoutUn it& sumHypotheticalMainSize, bool relayoutChildren); 155 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s umFlexBaseSize, double& totalFlexGrow, double& totalWeightedFlexShrink, LayoutUn it& sumHypotheticalMainSize, bool relayoutChildren);
156 156
157 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit & availableFreeSpace, double& totalFlexGrow, double& totalWeightedFlexShrink, In flexibleFlexItemSize&, Vector<LayoutUnit, 16>& childSizes); 157 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit & availableFreeSpace, double& totalFlexGrow, double& totalWeightedFlexShrink, In flexibleFlexItemSize&, Vector<LayoutUnit, 16>& childSizes);
158 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa ce, double& totalFlexGrow, double& totalWeightedFlexShrink, InflexibleFlexItemSi ze&); 158 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa ce, double& totalFlexGrow, double& totalWeightedFlexShrink, InflexibleFlexItemSi ze&);
159 159
160 void resetAutoMarginsAndLogicalTopInCrossAxis(LayoutBox& child); 160 void resetAutoMarginsAndLogicalTopInCrossAxis(LayoutBox& child);
161 void setOverrideMainAxisSizeForChild(LayoutBox& child, LayoutUnit childPrefe rredSize); 161 void setOverrideMainAxisSizeForChild(LayoutBox& child, LayoutUnit childPrefe rredSize);
162 void prepareChildForPositionedLayout(LayoutBox& child, LayoutUnit mainAxisOf fset, LayoutUnit crossAxisOffset, PositionedLayoutMode); 162 void prepareChildForPositionedLayout(LayoutBox& child, LayoutUnit mainAxisOf fset, LayoutUnit crossAxisOffset, PositionedLayoutMode);
163 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; 163 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const;
(...skipping 12 matching lines...) Expand all
176 176
177 mutable OrderIterator m_orderIterator; 177 mutable OrderIterator m_orderIterator;
178 int m_numberOfInFlowChildrenOnFirstLine; 178 int m_numberOfInFlowChildrenOnFirstLine;
179 }; 179 };
180 180
181 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); 181 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox());
182 182
183 } // namespace blink 183 } // namespace blink
184 184
185 #endif // LayoutFlexibleBox_h 185 #endif // LayoutFlexibleBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698