| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 maxPreferredLogicalWidth += margin; | 109 maxPreferredLogicalWidth += margin; |
| 110 if (!isColumnFlow()) { | 110 if (!isColumnFlow()) { |
| 111 maxLogicalWidth += maxPreferredLogicalWidth; | 111 maxLogicalWidth += maxPreferredLogicalWidth; |
| 112 if (isMultiline()) { | 112 if (isMultiline()) { |
| 113 // For multiline, the min preferred width is if you put a break
between each item. | 113 // For multiline, the min preferred width is if you put a break
between each item. |
| 114 minLogicalWidth = std::max(minLogicalWidth, minPreferredLogicalW
idth); | 114 minLogicalWidth = std::max(minLogicalWidth, minPreferredLogicalW
idth); |
| 115 } else | 115 } else |
| 116 minLogicalWidth += minPreferredLogicalWidth; | 116 minLogicalWidth += minPreferredLogicalWidth; |
| 117 } else { | 117 } else { |
| 118 minLogicalWidth = std::max(minPreferredLogicalWidth, minLogicalWidth
); | 118 minLogicalWidth = std::max(minPreferredLogicalWidth, minLogicalWidth
); |
| 119 if (isMultiline()) { | 119 maxLogicalWidth = std::max(maxPreferredLogicalWidth, maxLogicalWidth
); |
| 120 // For multiline, the max preferred width is if you never break
between items. | |
| 121 maxLogicalWidth += maxPreferredLogicalWidth; | |
| 122 } else | |
| 123 maxLogicalWidth = std::max(maxPreferredLogicalWidth, maxLogicalW
idth); | |
| 124 } | 120 } |
| 125 } | 121 } |
| 126 | 122 |
| 127 maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth); | 123 maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth); |
| 128 | 124 |
| 129 LayoutUnit scrollbarWidth = instrinsicScrollbarLogicalWidth(); | 125 LayoutUnit scrollbarWidth = instrinsicScrollbarLogicalWidth(); |
| 130 maxLogicalWidth += scrollbarWidth; | 126 maxLogicalWidth += scrollbarWidth; |
| 131 minLogicalWidth += scrollbarWidth; | 127 minLogicalWidth += scrollbarWidth; |
| 132 } | 128 } |
| 133 | 129 |
| (...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 ASSERT(child); | 1397 ASSERT(child); |
| 1402 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1398 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
| 1403 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1399 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
| 1404 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1400 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
| 1405 adjustAlignmentForChild(child, newOffset - originalOffset); | 1401 adjustAlignmentForChild(child, newOffset - originalOffset); |
| 1406 } | 1402 } |
| 1407 } | 1403 } |
| 1408 } | 1404 } |
| 1409 | 1405 |
| 1410 } | 1406 } |
| OLD | NEW |