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

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

Issue 2224833002: [css-flexbox] Have to use forceChildLayout to force layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/flexbox/bug633212.html ('k') | no next file » | 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 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 if (child->isOutOfFlowPositioned()) { 1213 if (child->isOutOfFlowPositioned()) {
1214 orderedChildren.append(FlexItem(child)); 1214 orderedChildren.append(FlexItem(child));
1215 continue; 1215 continue;
1216 } 1216 }
1217 1217
1218 // If this condition is true, then computeMainAxisExtentForChild will ca ll child.intrinsicContentLogicalHeight() 1218 // If this condition is true, then computeMainAxisExtentForChild will ca ll child.intrinsicContentLogicalHeight()
1219 // and child.scrollbarLogicalHeight(), so if the child has intrinsic min /max/preferred size, 1219 // and child.scrollbarLogicalHeight(), so if the child has intrinsic min /max/preferred size,
1220 // run layout on it now to make sure its logical height and scroll bars are up to date. 1220 // run layout on it now to make sure its logical height and scroll bars are up to date.
1221 if (childHasIntrinsicMainAxisSize(*child) && child->needsLayout()) { 1221 if (childHasIntrinsicMainAxisSize(*child) && child->needsLayout()) {
1222 child->clearOverrideSize(); 1222 child->clearOverrideSize();
1223 child->layoutIfNeeded(); 1223 child->forceChildLayout();
1224 cacheChildMainSize(*child); 1224 cacheChildMainSize(*child);
1225 } 1225 }
1226 1226
1227 LayoutUnit childInnerFlexBaseSize = computeInnerFlexBaseSizeForChild(*ch ild, relayoutChildren ? ForceLayout : LayoutIfNeeded); 1227 LayoutUnit childInnerFlexBaseSize = computeInnerFlexBaseSizeForChild(*ch ild, relayoutChildren ? ForceLayout : LayoutIfNeeded);
1228 LayoutUnit childMainAxisMarginBorderPadding = mainAxisBorderAndPaddingEx tentForChild(*child) 1228 LayoutUnit childMainAxisMarginBorderPadding = mainAxisBorderAndPaddingEx tentForChild(*child)
1229 + (isHorizontalFlow() ? child->marginWidth() : child->marginHeight() ); 1229 + (isHorizontalFlow() ? child->marginWidth() : child->marginHeight() );
1230 LayoutUnit childOuterFlexBaseSize = childInnerFlexBaseSize + childMainAx isMarginBorderPadding; 1230 LayoutUnit childOuterFlexBaseSize = childInnerFlexBaseSize + childMainAx isMarginBorderPadding;
1231 1231
1232 LayoutUnit childMinMaxAppliedMainAxisExtent = adjustChildSizeForMinAndMa x(*child, childInnerFlexBaseSize); 1232 LayoutUnit childMinMaxAppliedMainAxisExtent = adjustChildSizeForMinAndMa x(*child, childInnerFlexBaseSize);
1233 LayoutUnit childHypotheticalMainSize = childMinMaxAppliedMainAxisExtent + childMainAxisMarginBorderPadding; 1233 LayoutUnit childHypotheticalMainSize = childMinMaxAppliedMainAxisExtent + childMainAxisMarginBorderPadding;
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 ASSERT(child); 1899 ASSERT(child);
1900 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1900 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1901 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1901 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1902 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1902 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1903 adjustAlignmentForChild(*child, newOffset - originalOffset); 1903 adjustAlignmentForChild(*child, newOffset - originalOffset);
1904 } 1904 }
1905 } 1905 }
1906 } 1906 }
1907 1907
1908 } // namespace blink 1908 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/flexbox/bug633212.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698