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

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

Issue 2096943004: [css-flexbox] Correctly implement freezing of inflexible items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ... Created 4 years, 5 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
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit lineCr ossAxisExtent, const LayoutBox& child); 165 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit lineCr ossAxisExtent, const LayoutBox& child);
166 LayoutUnit marginBoxAscentForChild(const LayoutBox& child); 166 LayoutUnit marginBoxAscentForChild(const LayoutBox& child);
167 167
168 LayoutUnit computeChildMarginValue(Length margin); 168 LayoutUnit computeChildMarginValue(Length margin);
169 void prepareOrderIteratorAndMargins(); 169 void prepareOrderIteratorAndMargins();
170 LayoutUnit adjustChildSizeForMinAndMax(const LayoutBox& child, LayoutUnit ch ildSize); 170 LayoutUnit adjustChildSizeForMinAndMax(const LayoutBox& child, LayoutUnit ch ildSize);
171 LayoutUnit adjustChildSizeForAspectRatioCrossAxisMinAndMax(const LayoutBox& child, LayoutUnit childSize); 171 LayoutUnit adjustChildSizeForAspectRatioCrossAxisMinAndMax(const LayoutBox& child, LayoutUnit childSize);
172 // The hypothetical main size of an item is the flex base size clamped accor ding to its min and max main size properties 172 // The hypothetical main size of an item is the flex base size clamped accor ding to its min and max main size properties
173 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s umFlexBaseSize, double& totalFlexGrow, double& totalFlexShrink, double& totalWei ghtedFlexShrink, LayoutUnit& sumHypotheticalMainSize, bool relayoutChildren); 173 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s umFlexBaseSize, double& totalFlexGrow, double& totalFlexShrink, double& totalWei ghtedFlexShrink, LayoutUnit& sumHypotheticalMainSize, bool relayoutChildren);
174 174
175 bool resolveFlexibleLengths(FlexSign, OrderedFlexItemList&, LayoutUnit avail ableFreeSpace, LayoutUnit& remainingFreeSpace, double& totalFlexGrow, double& to talFlexShrink, double& totalWeightedFlexShrink); 175 void freezeInflexibleItems(FlexSign, OrderedFlexItemList& children, LayoutUn it& remainingFreeSpace, double& totalFlexGrow, double& totalFlexShrink, double& totalWeightedFlexShrink);
176 bool resolveFlexibleLengths(FlexSign, OrderedFlexItemList&, LayoutUnit initi alFreeSpace, LayoutUnit& remainingFreeSpace, double& totalFlexGrow, double& tota lFlexShrink, double& totalWeightedFlexShrink);
176 void freezeViolations(Vector<FlexItem*>&, LayoutUnit& availableFreeSpace, do uble& totalFlexGrow, double& totalFlexShrink, double& totalWeightedFlexShrink); 177 void freezeViolations(Vector<FlexItem*>&, LayoutUnit& availableFreeSpace, do uble& totalFlexGrow, double& totalFlexShrink, double& totalWeightedFlexShrink);
177 178
178 void resetAutoMarginsAndLogicalTopInCrossAxis(LayoutBox& child); 179 void resetAutoMarginsAndLogicalTopInCrossAxis(LayoutBox& child);
179 void setOverrideMainAxisSizeForChild(LayoutBox& child, LayoutUnit childPrefe rredSize); 180 void setOverrideMainAxisSizeForChild(LayoutBox& child, LayoutUnit childPrefe rredSize);
180 void prepareChildForPositionedLayout(LayoutBox& child); 181 void prepareChildForPositionedLayout(LayoutBox& child);
181 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; 182 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const;
182 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt emList&, LayoutUnit availableFreeSpace, bool relayoutChildren, SubtreeLayoutScop e&, Vector<LineContext>&); 183 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt emList&, LayoutUnit availableFreeSpace, bool relayoutChildren, SubtreeLayoutScop e&, Vector<LineContext>&);
183 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff set, LayoutUnit availableFreeSpace); 184 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff set, LayoutUnit availableFreeSpace);
184 void alignFlexLines(Vector<LineContext>&); 185 void alignFlexLines(Vector<LineContext>&);
185 void alignChildren(const Vector<LineContext>&); 186 void alignChildren(const Vector<LineContext>&);
(...skipping 13 matching lines...) Expand all
199 200
200 mutable OrderIterator m_orderIterator; 201 mutable OrderIterator m_orderIterator;
201 int m_numberOfInFlowChildrenOnFirstLine; 202 int m_numberOfInFlowChildrenOnFirstLine;
202 }; 203 };
203 204
204 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); 205 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox());
205 206
206 } // namespace blink 207 } // namespace blink
207 208
208 #endif // LayoutFlexibleBox_h 209 #endif // LayoutFlexibleBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698