| 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 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1863 LayoutUnit childMainExtent = mainAxisExtentForChild(*child); | 1863 LayoutUnit childMainExtent = mainAxisExtentForChild(*child); |
| 1864 // In an RTL column situation, this will apply the margin-right/margin-end | 1864 // In an RTL column situation, this will apply the margin-right/margin-end |
| 1865 // on the left. This will be fixed later in flipForRightToLeftColumn. | 1865 // on the left. This will be fixed later in flipForRightToLeftColumn. |
| 1866 LayoutPoint childLocation( | 1866 LayoutPoint childLocation( |
| 1867 shouldFlipMainAxis ? totalMainExtent - mainAxisOffset - childMainExtent | 1867 shouldFlipMainAxis ? totalMainExtent - mainAxisOffset - childMainExtent |
| 1868 : mainAxisOffset, | 1868 : mainAxisOffset, |
| 1869 crossAxisOffset + flowAwareMarginBeforeForChild(*child)); | 1869 crossAxisOffset + flowAwareMarginBeforeForChild(*child)); |
| 1870 setFlowAwareLocationForChild(*child, childLocation); | 1870 setFlowAwareLocationForChild(*child, childLocation); |
| 1871 mainAxisOffset += childMainExtent + flowAwareMarginEndForChild(*child); | 1871 mainAxisOffset += childMainExtent + flowAwareMarginEndForChild(*child); |
| 1872 | 1872 |
| 1873 mainAxisOffset += justifyContentSpaceBetweenChildren( | 1873 if (i != children.size() - 1) { |
| 1874 availableFreeSpace, distribution, children.size()); | 1874 // The last item does not get extra space added. |
| 1875 mainAxisOffset += justifyContentSpaceBetweenChildren( |
| 1876 availableFreeSpace, distribution, children.size()); |
| 1877 } |
| 1875 | 1878 |
| 1876 if (isPaginated) | 1879 if (isPaginated) |
| 1877 updateFragmentationInfoForChild(*child); | 1880 updateFragmentationInfoForChild(*child); |
| 1878 } | 1881 } |
| 1879 | 1882 |
| 1880 if (isColumnFlow()) | 1883 if (isColumnFlow()) |
| 1881 setLogicalHeight(std::max( | 1884 setLogicalHeight(std::max( |
| 1882 logicalHeight(), mainAxisOffset + flowAwareBorderEnd() + | 1885 logicalHeight(), mainAxisOffset + flowAwareBorderEnd() + |
| 1883 flowAwarePaddingEnd() + scrollbarLogicalHeight())); | 1886 flowAwarePaddingEnd() + scrollbarLogicalHeight())); |
| 1884 | 1887 |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2183 LayoutUnit originalOffset = | 2186 LayoutUnit originalOffset = |
| 2184 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; | 2187 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; |
| 2185 LayoutUnit newOffset = | 2188 LayoutUnit newOffset = |
| 2186 contentExtent - originalOffset - lineCrossAxisExtent; | 2189 contentExtent - originalOffset - lineCrossAxisExtent; |
| 2187 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset); | 2190 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset); |
| 2188 } | 2191 } |
| 2189 } | 2192 } |
| 2190 } | 2193 } |
| 2191 | 2194 |
| 2192 } // namespace blink | 2195 } // namespace blink |
| OLD | NEW |