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

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

Issue 331203002: Blink doesn't honor percent heights on children of "align-self:stretch" flex items in a fixed-height (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderFlexibleBox.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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 void prepareOrderIteratorAndMargins(); 142 void prepareOrderIteratorAndMargins();
143 LayoutUnit adjustChildSizeForMinAndMax(RenderBox& child, LayoutUnit childSiz e); 143 LayoutUnit adjustChildSizeForMinAndMax(RenderBox& child, LayoutUnit childSiz e);
144 // The hypothetical main size of an item is the flex base size clamped accor ding to its min and max main size properties 144 // The hypothetical main size of an item is the flex base size clamped accor ding to its min and max main size properties
145 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s umFlexBaseSize, double& totalFlexGrow, double& totalWeightedFlexShrink, LayoutUn it& sumHypotheticalMainSize, bool& hasInfiniteLineLength, bool relayoutChildren) ; 145 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s umFlexBaseSize, double& totalFlexGrow, double& totalWeightedFlexShrink, LayoutUn it& sumHypotheticalMainSize, bool& hasInfiniteLineLength, bool relayoutChildren) ;
146 146
147 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit & availableFreeSpace, double& totalFlexGrow, double& totalWeightedFlexShrink, In flexibleFlexItemSize&, Vector<LayoutUnit, 16>& childSizes, bool hasInfiniteLineL ength); 147 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit & availableFreeSpace, double& totalFlexGrow, double& totalWeightedFlexShrink, In flexibleFlexItemSize&, Vector<LayoutUnit, 16>& childSizes, bool hasInfiniteLineL ength);
148 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa ce, double& totalFlexGrow, double& totalWeightedFlexShrink, InflexibleFlexItemSi ze&, bool hasInfiniteLineLength); 148 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa ce, double& totalFlexGrow, double& totalWeightedFlexShrink, InflexibleFlexItemSi ze&, bool hasInfiniteLineLength);
149 149
150 void resetAutoMarginsAndLogicalTopInCrossAxis(RenderBox& child); 150 void resetAutoMarginsAndLogicalTopInCrossAxis(RenderBox& child);
151 void setLogicalOverrideSize(RenderBox& child, LayoutUnit childPreferredSize) ; 151 void setLogicalOverrideSize(RenderBox& child, LayoutUnit childPreferredSize) ;
152 void clearLogicalOverrideSize(RenderBox& child);
152 void prepareChildForPositionedLayout(RenderBox& child, LayoutUnit mainAxisOf fset, LayoutUnit crossAxisOffset, PositionedLayoutMode); 153 void prepareChildForPositionedLayout(RenderBox& child, LayoutUnit mainAxisOf fset, LayoutUnit crossAxisOffset, PositionedLayoutMode);
153 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; 154 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const;
154 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt emList&, const Vector<LayoutUnit, 16>& childSizes, LayoutUnit availableFreeSpace , bool relayoutChildren, Vector<LineContext>&, bool hasInfiniteLineLength); 155 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt emList&, const Vector<LayoutUnit, 16>& childSizes, LayoutUnit availableFreeSpace , bool relayoutChildren, Vector<LineContext>&, bool hasInfiniteLineLength);
155 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff set, LayoutUnit availableFreeSpace); 156 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff set, LayoutUnit availableFreeSpace);
156 void alignFlexLines(Vector<LineContext>&); 157 void alignFlexLines(Vector<LineContext>&);
157 void alignChildren(const Vector<LineContext>&); 158 void alignChildren(const Vector<LineContext>&);
158 void applyStretchAlignmentToChild(RenderBox& child, LayoutUnit lineCrossAxis Extent); 159 void applyStretchAlignmentToChild(RenderBox& child, LayoutUnit lineCrossAxis Extent);
159 void flipForRightToLeftColumn(); 160 void flipForRightToLeftColumn();
160 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar tEdge); 161 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar tEdge);
161 162
162 // This is used to cache the preferred size for orthogonal flow children so we don't have to relayout to get it 163 // This is used to cache the preferred size for orthogonal flow children so we don't have to relayout to get it
163 HashMap<const RenderObject*, LayoutUnit> m_intrinsicSizeAlongMainAxis; 164 HashMap<const RenderObject*, LayoutUnit> m_intrinsicSizeAlongMainAxis;
164 165
165 mutable OrderIterator m_orderIterator; 166 mutable OrderIterator m_orderIterator;
166 int m_numberOfInFlowChildrenOnFirstLine; 167 int m_numberOfInFlowChildrenOnFirstLine;
167 }; 168 };
168 169
169 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFlexibleBox, isFlexibleBox()); 170 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFlexibleBox, isFlexibleBox());
170 171
171 } // namespace blink 172 } // namespace blink
172 173
173 #endif // RenderFlexibleBox_h 174 #endif // RenderFlexibleBox_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698