| 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 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1241 continue; | 1241 continue; |
| 1242 } | 1242 } |
| 1243 | 1243 |
| 1244 ChildLayoutType layoutType = relayoutChildren ? ForceLayout : LayoutIfNe
eded; | 1244 ChildLayoutType layoutType = relayoutChildren ? ForceLayout : LayoutIfNe
eded; |
| 1245 | 1245 |
| 1246 // If this condition is true, then computeMainAxisExtentForChild will ca
ll child.intrinsicContentLogicalHeight() | 1246 // If this condition is true, then computeMainAxisExtentForChild will ca
ll child.intrinsicContentLogicalHeight() |
| 1247 // and child.scrollbarLogicalHeight(), so if the child has intrinsic min
/max/preferred size, | 1247 // and child.scrollbarLogicalHeight(), so if the child has intrinsic min
/max/preferred size, |
| 1248 // run layout on it now to make sure its logical height and scroll bars
are up to date. | 1248 // run layout on it now to make sure its logical height and scroll bars
are up to date. |
| 1249 if (childHasIntrinsicMainAxisSize(*child) && child->needsLayout()) { | 1249 if (childHasIntrinsicMainAxisSize(*child) && child->needsLayout()) { |
| 1250 child->clearOverrideSize(); | 1250 child->clearOverrideSize(); |
| 1251 child->layoutIfNeeded(); | 1251 child->forceChildLayout(); |
| 1252 cacheChildMainSize(*child); | 1252 cacheChildMainSize(*child); |
| 1253 layoutType = LayoutIfNeeded; | 1253 layoutType = LayoutIfNeeded; |
| 1254 } | 1254 } |
| 1255 | 1255 |
| 1256 FlexItem flexItem = constructFlexItem(*child, layoutType); | 1256 FlexItem flexItem = constructFlexItem(*child, layoutType); |
| 1257 if (isMultiline() && sumHypotheticalMainSize + flexItem.hypotheticalMain
AxisMarginBoxSize() > lineBreakLength && lineHasInFlowItem) | 1257 if (isMultiline() && sumHypotheticalMainSize + flexItem.hypotheticalMain
AxisMarginBoxSize() > lineBreakLength && lineHasInFlowItem) |
| 1258 break; | 1258 break; |
| 1259 orderedChildren.append(flexItem); | 1259 orderedChildren.append(flexItem); |
| 1260 lineHasInFlowItem = true; | 1260 lineHasInFlowItem = true; |
| 1261 sumFlexBaseSize += flexItem.flexBaseMarginBoxSize(); | 1261 sumFlexBaseSize += flexItem.flexBaseMarginBoxSize(); |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1922 DCHECK(child); | 1922 DCHECK(child); |
| 1923 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1923 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
| 1924 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1924 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
| 1925 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1925 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
| 1926 adjustAlignmentForChild(*child, newOffset - originalOffset); | 1926 adjustAlignmentForChild(*child, newOffset - originalOffset); |
| 1927 } | 1927 } |
| 1928 } | 1928 } |
| 1929 } | 1929 } |
| 1930 | 1930 |
| 1931 } // namespace blink | 1931 } // namespace blink |
| OLD | NEW |