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

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

Issue 1304853002: Add a use counter to determine compat impact of changing flexbox's intrinsic size calculation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: new function Created 5 years, 4 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 | « Source/core/frame/UseCounter.h ('k') | 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 void prepareChildForPositionedLayout(LayoutBox& child, LayoutUnit mainAxisOf fset, LayoutUnit crossAxisOffset, PositionedLayoutMode); 160 void prepareChildForPositionedLayout(LayoutBox& child, LayoutUnit mainAxisOf fset, LayoutUnit crossAxisOffset, PositionedLayoutMode);
161 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; 161 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const;
162 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt emList&, const Vector<LayoutUnit, 16>& childSizes, LayoutUnit availableFreeSpace , bool relayoutChildren, SubtreeLayoutScope&, Vector<LineContext>&); 162 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt emList&, const Vector<LayoutUnit, 16>& childSizes, LayoutUnit availableFreeSpace , bool relayoutChildren, SubtreeLayoutScope&, Vector<LineContext>&);
163 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff set, LayoutUnit availableFreeSpace); 163 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff set, LayoutUnit availableFreeSpace);
164 void alignFlexLines(Vector<LineContext>&); 164 void alignFlexLines(Vector<LineContext>&);
165 void alignChildren(const Vector<LineContext>&); 165 void alignChildren(const Vector<LineContext>&);
166 void applyStretchAlignmentToChild(LayoutBox& child, LayoutUnit lineCrossAxis Extent); 166 void applyStretchAlignmentToChild(LayoutBox& child, LayoutUnit lineCrossAxis Extent);
167 void flipForRightToLeftColumn(); 167 void flipForRightToLeftColumn();
168 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar tEdge); 168 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar tEdge);
169 169
170 float countIntrinsicSizeForAlgorithmChange(LayoutUnit maxPreferredWidth, Lay outBox* child, float previousMaxContentFlexFraction) const;
171
170 // This is used to cache the preferred size for orthogonal flow children so we don't have to relayout to get it 172 // This is used to cache the preferred size for orthogonal flow children so we don't have to relayout to get it
171 HashMap<const LayoutObject*, LayoutUnit> m_intrinsicSizeAlongMainAxis; 173 HashMap<const LayoutObject*, LayoutUnit> m_intrinsicSizeAlongMainAxis;
172 174
173 mutable OrderIterator m_orderIterator; 175 mutable OrderIterator m_orderIterator;
174 int m_numberOfInFlowChildrenOnFirstLine; 176 int m_numberOfInFlowChildrenOnFirstLine;
175 }; 177 };
176 178
177 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); 179 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox());
178 180
179 } // namespace blink 181 } // namespace blink
180 182
181 #endif // LayoutFlexibleBox_h 183 #endif // LayoutFlexibleBox_h
OLDNEW
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698