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 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2125 child.intrinsicContentLogicalHeight(); | 2125 child.intrinsicContentLogicalHeight(); |
2126 child.forceChildLayout(); | 2126 child.forceChildLayout(); |
2127 child.setIntrinsicContentLogicalHeight( | 2127 child.setIntrinsicContentLogicalHeight( |
2128 childIntrinsicContentLogicalHeight); | 2128 childIntrinsicContentLogicalHeight); |
2129 } | 2129 } |
2130 } else if (hasOrthogonalFlow(child) && | 2130 } else if (hasOrthogonalFlow(child) && |
2131 child.style()->logicalWidth().isAuto()) { | 2131 child.style()->logicalWidth().isAuto()) { |
2132 LayoutUnit childWidth = | 2132 LayoutUnit childWidth = |
2133 (lineCrossAxisExtent - crossAxisMarginExtentForChild(child)) | 2133 (lineCrossAxisExtent - crossAxisMarginExtentForChild(child)) |
2134 .clampNegativeToZero(); | 2134 .clampNegativeToZero(); |
2135 childWidth = | 2135 childWidth = child.constrainLogicalWidthByMinMax( |
2136 child.constrainLogicalWidthByMinMax(childWidth, childWidth, this); | 2136 childWidth, crossAxisContentExtent(), this); |
2137 | 2137 |
2138 if (childWidth != child.logicalWidth()) { | 2138 if (childWidth != child.logicalWidth()) { |
2139 child.setOverrideLogicalContentWidth( | 2139 child.setOverrideLogicalContentWidth( |
2140 childWidth - child.borderAndPaddingLogicalWidth()); | 2140 childWidth - child.borderAndPaddingLogicalWidth()); |
2141 child.forceChildLayout(); | 2141 child.forceChildLayout(); |
2142 } | 2142 } |
2143 } | 2143 } |
2144 } | 2144 } |
2145 | 2145 |
2146 void LayoutFlexibleBox::flipForRightToLeftColumn( | 2146 void LayoutFlexibleBox::flipForRightToLeftColumn( |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2182 LayoutUnit originalOffset = | 2182 LayoutUnit originalOffset = |
2183 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; | 2183 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; |
2184 LayoutUnit newOffset = | 2184 LayoutUnit newOffset = |
2185 contentExtent - originalOffset - lineCrossAxisExtent; | 2185 contentExtent - originalOffset - lineCrossAxisExtent; |
2186 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset); | 2186 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset); |
2187 } | 2187 } |
2188 } | 2188 } |
2189 } | 2189 } |
2190 | 2190 |
2191 } // namespace blink | 2191 } // namespace blink |
OLD | NEW |