| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |