| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 bool lineHasInFlowItem = false; | 71 bool lineHasInFlowItem = false; |
| 72 | 72 |
| 73 for (; nextIndex < m_allItems.size(); ++nextIndex) { | 73 for (; nextIndex < m_allItems.size(); ++nextIndex) { |
| 74 const FlexItem& flexItem = m_allItems[nextIndex]; | 74 const FlexItem& flexItem = m_allItems[nextIndex]; |
| 75 DCHECK(!flexItem.box->isOutOfFlowPositioned()); | 75 DCHECK(!flexItem.box->isOutOfFlowPositioned()); |
| 76 if (isMultiline() && | 76 if (isMultiline() && |
| 77 sumHypotheticalMainSize + flexItem.hypotheticalMainAxisMarginBoxSize() > | 77 sumHypotheticalMainSize + flexItem.hypotheticalMainAxisMarginBoxSize() > |
| 78 m_lineBreakLength && | 78 m_lineBreakLength && |
| 79 lineHasInFlowItem) | 79 lineHasInFlowItem) |
| 80 break; | 80 break; |
| 81 lineItems.append(flexItem); | 81 lineItems.push_back(flexItem); |
| 82 lineHasInFlowItem = true; | 82 lineHasInFlowItem = true; |
| 83 sumFlexBaseSize += flexItem.flexBaseMarginBoxSize(); | 83 sumFlexBaseSize += flexItem.flexBaseMarginBoxSize(); |
| 84 totalFlexGrow += flexItem.box->style()->flexGrow(); | 84 totalFlexGrow += flexItem.box->style()->flexGrow(); |
| 85 totalFlexShrink += flexItem.box->style()->flexShrink(); | 85 totalFlexShrink += flexItem.box->style()->flexShrink(); |
| 86 totalWeightedFlexShrink += | 86 totalWeightedFlexShrink += |
| 87 flexItem.box->style()->flexShrink() * flexItem.flexBaseContentSize; | 87 flexItem.box->style()->flexShrink() * flexItem.flexBaseContentSize; |
| 88 sumHypotheticalMainSize += flexItem.hypotheticalMainAxisMarginBoxSize(); | 88 sumHypotheticalMainSize += flexItem.hypotheticalMainAxisMarginBoxSize(); |
| 89 } | 89 } |
| 90 DCHECK(lineItems.size() > 0 || nextIndex == m_allItems.size()); | 90 DCHECK(lineItems.size() > 0 || nextIndex == m_allItems.size()); |
| 91 return lineItems.size() > 0; | 91 return lineItems.size() > 0; |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace blink | 94 } // namespace blink |
| OLD | NEW |