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

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

Issue 2660423004: Rename EOverflow values with k prefix. (Closed)
Patch Set: Rebase Created 3 years, 10 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 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 1219
1220 Length min = isHorizontalFlow() ? child.style()->minWidth() 1220 Length min = isHorizontalFlow() ? child.style()->minWidth()
1221 : child.style()->minHeight(); 1221 : child.style()->minHeight();
1222 LayoutUnit minExtent; 1222 LayoutUnit minExtent;
1223 if (min.isSpecifiedOrIntrinsic()) { 1223 if (min.isSpecifiedOrIntrinsic()) {
1224 minExtent = computeMainAxisExtentForChild(child, MinSize, min); 1224 minExtent = computeMainAxisExtentForChild(child, MinSize, min);
1225 // computeMainAxisExtentForChild can return -1 when the child has a 1225 // computeMainAxisExtentForChild can return -1 when the child has a
1226 // percentage min size, but we have an indefinite size in that axis. 1226 // percentage min size, but we have an indefinite size in that axis.
1227 minExtent = std::max(LayoutUnit(), minExtent); 1227 minExtent = std::max(LayoutUnit(), minExtent);
1228 } else if (min.isAuto() && !child.styleRef().containsSize() && 1228 } else if (min.isAuto() && !child.styleRef().containsSize() &&
1229 mainAxisOverflowForChild(child) == EOverflow::Visible && 1229 mainAxisOverflowForChild(child) == EOverflow::kVisible &&
1230 !(isColumnFlow() && child.isFlexibleBox())) { 1230 !(isColumnFlow() && child.isFlexibleBox())) {
1231 // TODO(cbiesinger): For now, we do not handle min-height: auto for nested 1231 // TODO(cbiesinger): For now, we do not handle min-height: auto for nested
1232 // column flexboxes. We need to implement 1232 // column flexboxes. We need to implement
1233 // https://drafts.csswg.org/css-flexbox/#intrinsic-sizes before that 1233 // https://drafts.csswg.org/css-flexbox/#intrinsic-sizes before that
1234 // produces reasonable results. Tracking bug: https://crbug.com/581553 1234 // produces reasonable results. Tracking bug: https://crbug.com/581553
1235 // css-flexbox section 4.5 1235 // css-flexbox section 4.5
1236 LayoutUnit contentSize = 1236 LayoutUnit contentSize =
1237 computeMainAxisExtentForChild(child, MinSize, Length(MinContent)); 1237 computeMainAxisExtentForChild(child, MinSize, Length(MinContent));
1238 DCHECK_GE(contentSize, LayoutUnit()); 1238 DCHECK_GE(contentSize, LayoutUnit());
1239 if (hasAspectRatio(child) && child.intrinsicSize().height() > 0) 1239 if (hasAspectRatio(child) && child.intrinsicSize().height() > 0)
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
2183 LayoutUnit originalOffset = 2183 LayoutUnit originalOffset =
2184 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 2184 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
2185 LayoutUnit newOffset = 2185 LayoutUnit newOffset =
2186 contentExtent - originalOffset - lineCrossAxisExtent; 2186 contentExtent - originalOffset - lineCrossAxisExtent;
2187 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset); 2187 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset);
2188 } 2188 }
2189 } 2189 }
2190 } 2190 }
2191 2191
2192 } // namespace blink 2192 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698