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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 { | 307 { |
308 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera
tor.next()) | 308 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera
tor.next()) |
309 paintChildAsInlineBlock(child, paintInfo, paintOffset); | 309 paintChildAsInlineBlock(child, paintInfo, paintOffset); |
310 } | 310 } |
311 | 311 |
312 void RenderFlexibleBox::repositionLogicalHeightDependentFlexItems(Vector<LineCon
text>& lineContexts) | 312 void RenderFlexibleBox::repositionLogicalHeightDependentFlexItems(Vector<LineCon
text>& lineContexts) |
313 { | 313 { |
314 LayoutUnit crossAxisStartEdge = lineContexts.isEmpty() ? LayoutUnit() : line
Contexts[0].crossAxisOffset; | 314 LayoutUnit crossAxisStartEdge = lineContexts.isEmpty() ? LayoutUnit() : line
Contexts[0].crossAxisOffset; |
315 alignFlexLines(lineContexts); | 315 alignFlexLines(lineContexts); |
316 | 316 |
317 // If we have a single line flexbox, the line height is all the available sp
ace. | 317 // If we have a single line flexbox or a multiline line flexbox with only on
e flex line, |
| 318 // the line height is all the available space. |
318 // For flex-direction: row, this means we need to use the height, so we do t
his after calling updateLogicalHeight. | 319 // For flex-direction: row, this means we need to use the height, so we do t
his after calling updateLogicalHeight. |
319 if (!isMultiline() && lineContexts.size() == 1) | 320 if (lineContexts.size() == 1) |
320 lineContexts[0].crossAxisExtent = crossAxisContentExtent(); | 321 lineContexts[0].crossAxisExtent = crossAxisContentExtent(); |
321 alignChildren(lineContexts); | 322 alignChildren(lineContexts); |
322 | 323 |
323 if (style()->flexWrap() == FlexWrapReverse) | 324 if (style()->flexWrap() == FlexWrapReverse) |
324 flipForWrapReverse(lineContexts, crossAxisStartEdge); | 325 flipForWrapReverse(lineContexts, crossAxisStartEdge); |
325 | 326 |
326 // direction:rtl + flex-direction:column means the cross-axis direction is f
lipped. | 327 // direction:rtl + flex-direction:column means the cross-axis direction is f
lipped. |
327 flipForRightToLeftColumn(); | 328 flipForRightToLeftColumn(); |
328 } | 329 } |
329 | 330 |
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1413 ASSERT(child); | 1414 ASSERT(child); |
1414 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1415 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
1415 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1416 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
1416 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1417 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
1417 adjustAlignmentForChild(child, newOffset - originalOffset); | 1418 adjustAlignmentForChild(child, newOffset - originalOffset); |
1418 } | 1419 } |
1419 } | 1420 } |
1420 } | 1421 } |
1421 | 1422 |
1422 } | 1423 } |
OLD | NEW |