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

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

Issue 2555413002: Revert commit# 415577 "Add grid/flex layout support for <fieldset>" (Closed)
Patch Set: Created 4 years 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 LinePositionMode = PositionOnContainingLine) const override; 56 LinePositionMode = PositionOnContainingLine) const override;
57 int firstLineBoxBaseline() const override; 57 int firstLineBoxBaseline() const override;
58 int inlineBlockBaseline(LineDirectionMode) const override; 58 int inlineBlockBaseline(LineDirectionMode) const override;
59 IntSize originAdjustmentForScrollbars() const override; 59 IntSize originAdjustmentForScrollbars() const override;
60 bool hasTopOverflow() const override; 60 bool hasTopOverflow() const override;
61 bool hasLeftOverflow() const override; 61 bool hasLeftOverflow() const override;
62 62
63 void paintChildren(const PaintInfo&, const LayoutPoint&) const final; 63 void paintChildren(const PaintInfo&, const LayoutPoint&) const final;
64 64
65 bool isHorizontalFlow() const; 65 bool isHorizontalFlow() const;
66 virtual LayoutObject* layoutSpecialExcludedChild(bool relayoutChildren,
67 SubtreeLayoutScope&) {
68 return nullptr;
69 }
70 66
71 const OrderIterator& orderIterator() const { return m_orderIterator; } 67 const OrderIterator& orderIterator() const { return m_orderIterator; }
72 68
73 LayoutUnit crossSizeForPercentageResolution(const LayoutBox& child); 69 LayoutUnit crossSizeForPercentageResolution(const LayoutBox& child);
74 LayoutUnit mainSizeForPercentageResolution(const LayoutBox& child); 70 LayoutUnit mainSizeForPercentageResolution(const LayoutBox& child);
75 LayoutUnit childLogicalHeightForPercentageResolution(const LayoutBox& child); 71 LayoutUnit childLogicalHeightForPercentageResolution(const LayoutBox& child);
76 72
77 void clearCachedMainSizeForChild(const LayoutBox& child); 73 void clearCachedMainSizeForChild(const LayoutBox& child);
78 74
79 LayoutUnit staticMainAxisPositionForPositionedChild(const LayoutBox& child); 75 LayoutUnit staticMainAxisPositionForPositionedChild(const LayoutBox& child);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 void cacheChildMainSize(const LayoutBox& child); 172 void cacheChildMainSize(const LayoutBox& child);
177 173
178 void layoutFlexItems(bool relayoutChildren, SubtreeLayoutScope&); 174 void layoutFlexItems(bool relayoutChildren, SubtreeLayoutScope&);
179 LayoutUnit autoMarginOffsetInMainAxis(const OrderedFlexItemList&, 175 LayoutUnit autoMarginOffsetInMainAxis(const OrderedFlexItemList&,
180 LayoutUnit& availableFreeSpace); 176 LayoutUnit& availableFreeSpace);
181 void updateAutoMarginsInMainAxis(LayoutBox& child, 177 void updateAutoMarginsInMainAxis(LayoutBox& child,
182 LayoutUnit autoMarginOffset); 178 LayoutUnit autoMarginOffset);
183 bool hasAutoMarginsInCrossAxis(const LayoutBox& child) const; 179 bool hasAutoMarginsInCrossAxis(const LayoutBox& child) const;
184 bool updateAutoMarginsInCrossAxis(LayoutBox& child, 180 bool updateAutoMarginsInCrossAxis(LayoutBox& child,
185 LayoutUnit availableAlignmentSpace); 181 LayoutUnit availableAlignmentSpace);
186 void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&, 182 void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&);
187 LayoutObject* childToExclude);
188 LayoutUnit clientLogicalBottomAfterRepositioning(); 183 LayoutUnit clientLogicalBottomAfterRepositioning();
189 184
190 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent, 185 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent,
191 const LayoutBox& child); 186 const LayoutBox& child);
192 LayoutUnit availableAlignmentSpaceForChildBeforeStretching( 187 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(
193 LayoutUnit lineCrossAxisExtent, 188 LayoutUnit lineCrossAxisExtent,
194 const LayoutBox& child); 189 const LayoutBox& child);
195 LayoutUnit marginBoxAscentForChild(const LayoutBox& child); 190 LayoutUnit marginBoxAscentForChild(const LayoutBox& child);
196 191
197 LayoutUnit computeChildMarginValue(Length margin); 192 LayoutUnit computeChildMarginValue(Length margin);
198 void prepareOrderIteratorAndMargins(); 193 void prepareOrderIteratorAndMargins();
199 LayoutUnit adjustChildSizeForMinAndMax(const LayoutBox& child, 194 LayoutUnit adjustChildSizeForMinAndMax(const LayoutBox& child,
200 LayoutUnit childSize); 195 LayoutUnit childSize);
201 LayoutUnit adjustChildSizeForAspectRatioCrossAxisMinAndMax( 196 LayoutUnit adjustChildSizeForAspectRatioCrossAxisMinAndMax(
202 const LayoutBox& child, 197 const LayoutBox& child,
203 LayoutUnit childSize); 198 LayoutUnit childSize);
204 FlexItem constructFlexItem(LayoutBox& child, ChildLayoutType); 199 FlexItem constructFlexItem(LayoutBox& child, ChildLayoutType);
205 // The hypothetical main size of an item is the flex base size clamped 200 // The hypothetical main size of an item is the flex base size clamped
206 // according to its min and max main size properties 201 // according to its min and max main size properties
207 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, 202 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren,
208 LayoutUnit& sumFlexBaseSize, 203 LayoutUnit& sumFlexBaseSize,
209 double& totalFlexGrow, 204 double& totalFlexGrow,
210 double& totalFlexShrink, 205 double& totalFlexShrink,
211 double& totalWeightedFlexShrink, 206 double& totalWeightedFlexShrink,
212 LayoutUnit& sumHypotheticalMainSize, 207 LayoutUnit& sumHypotheticalMainSize,
213 bool relayoutChildren, 208 bool relayoutChildren);
214 LayoutObject* childToExclude);
215 209
216 void freezeInflexibleItems(FlexSign, 210 void freezeInflexibleItems(FlexSign,
217 OrderedFlexItemList& children, 211 OrderedFlexItemList& children,
218 LayoutUnit& remainingFreeSpace, 212 LayoutUnit& remainingFreeSpace,
219 double& totalFlexGrow, 213 double& totalFlexGrow,
220 double& totalFlexShrink, 214 double& totalFlexShrink,
221 double& totalWeightedFlexShrink); 215 double& totalWeightedFlexShrink);
222 bool resolveFlexibleLengths(FlexSign, 216 bool resolveFlexibleLengths(FlexSign,
223 OrderedFlexItemList&, 217 OrderedFlexItemList&,
224 LayoutUnit initialFreeSpace, 218 LayoutUnit initialFreeSpace,
(...skipping 15 matching lines...) Expand all
240 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, 234 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset,
241 const OrderedFlexItemList&, 235 const OrderedFlexItemList&,
242 LayoutUnit availableFreeSpace, 236 LayoutUnit availableFreeSpace,
243 bool relayoutChildren, 237 bool relayoutChildren,
244 SubtreeLayoutScope&, 238 SubtreeLayoutScope&,
245 Vector<LineContext>&); 239 Vector<LineContext>&);
246 void layoutColumnReverse(const OrderedFlexItemList&, 240 void layoutColumnReverse(const OrderedFlexItemList&,
247 LayoutUnit crossAxisOffset, 241 LayoutUnit crossAxisOffset,
248 LayoutUnit availableFreeSpace); 242 LayoutUnit availableFreeSpace);
249 void alignFlexLines(Vector<LineContext>&); 243 void alignFlexLines(Vector<LineContext>&);
250 void alignChildren(const Vector<LineContext>&, LayoutObject* childToExclude); 244 void alignChildren(const Vector<LineContext>&);
251 void applyStretchAlignmentToChild(LayoutBox& child, 245 void applyStretchAlignmentToChild(LayoutBox& child,
252 LayoutUnit lineCrossAxisExtent); 246 LayoutUnit lineCrossAxisExtent);
253 void flipForRightToLeftColumn(); 247 void flipForRightToLeftColumn();
254 void flipForWrapReverse(const Vector<LineContext>&, 248 void flipForWrapReverse(const Vector<LineContext>&,
255 LayoutUnit crossAxisStartEdge); 249 LayoutUnit crossAxisStartEdge);
256 250
257 float countIntrinsicSizeForAlgorithmChange( 251 float countIntrinsicSizeForAlgorithmChange(
258 LayoutUnit maxPreferredWidth, 252 LayoutUnit maxPreferredWidth,
259 LayoutBox* child, 253 LayoutBox* child,
260 float previousMaxContentFlexFraction) const; 254 float previousMaxContentFlexFraction) const;
(...skipping 14 matching lines...) Expand all
275 269
276 // This is SizeIsUnknown outside of layoutBlock() 270 // This is SizeIsUnknown outside of layoutBlock()
277 mutable SizeDefiniteness m_hasDefiniteHeight; 271 mutable SizeDefiniteness m_hasDefiniteHeight;
278 }; 272 };
279 273
280 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); 274 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox());
281 275
282 } // namespace blink 276 } // namespace blink
283 277
284 #endif // LayoutFlexibleBox_h 278 #endif // LayoutFlexibleBox_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFieldset.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698