| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 additionalTracksToTreatAsInflexible->contains(index)) | 1002 additionalTracksToTreatAsInflexible->contains(index)) |
| 1003 continue; | 1003 continue; |
| 1004 LayoutUnit baseSize = tracks[index].baseSize(); | 1004 LayoutUnit baseSize = tracks[index].baseSize(); |
| 1005 double flexFactor = | 1005 double flexFactor = |
| 1006 gridTrackSize(direction, index).maxTrackBreadth().flex(); | 1006 gridTrackSize(direction, index).maxTrackBreadth().flex(); |
| 1007 // treating all such tracks as inflexible. | 1007 // treating all such tracks as inflexible. |
| 1008 if (baseSize > hypotheticalFactorUnitSize * flexFactor) { | 1008 if (baseSize > hypotheticalFactorUnitSize * flexFactor) { |
| 1009 leftOverSpace -= baseSize; | 1009 leftOverSpace -= baseSize; |
| 1010 flexFactorSum -= flexFactor; | 1010 flexFactorSum -= flexFactor; |
| 1011 if (!additionalTracksToTreatAsInflexible) | 1011 if (!additionalTracksToTreatAsInflexible) |
| 1012 additionalTracksToTreatAsInflexible = wrapUnique(new TrackIndexSet()); | 1012 additionalTracksToTreatAsInflexible = makeUnique<TrackIndexSet>(); |
| 1013 additionalTracksToTreatAsInflexible->add(index); | 1013 additionalTracksToTreatAsInflexible->add(index); |
| 1014 validFlexFactorUnit = false; | 1014 validFlexFactorUnit = false; |
| 1015 } | 1015 } |
| 1016 } | 1016 } |
| 1017 if (!validFlexFactorUnit) | 1017 if (!validFlexFactorUnit) |
| 1018 return computeFlexFactorUnitSize( | 1018 return computeFlexFactorUnitSize( |
| 1019 tracks, direction, flexFactorSum, leftOverSpace, flexibleTracksIndexes, | 1019 tracks, direction, flexFactorSum, leftOverSpace, flexibleTracksIndexes, |
| 1020 std::move(additionalTracksToTreatAsInflexible)); | 1020 std::move(additionalTracksToTreatAsInflexible)); |
| 1021 return hypotheticalFactorUnitSize; | 1021 return hypotheticalFactorUnitSize; |
| 1022 } | 1022 } |
| (...skipping 2472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3495 if (!m_gridItemArea.isEmpty()) | 3495 if (!m_gridItemArea.isEmpty()) |
| 3496 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 3496 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
| 3497 } | 3497 } |
| 3498 | 3498 |
| 3499 bool LayoutGrid::cachedHasDefiniteLogicalHeight() const { | 3499 bool LayoutGrid::cachedHasDefiniteLogicalHeight() const { |
| 3500 SECURITY_DCHECK(m_hasDefiniteLogicalHeight); | 3500 SECURITY_DCHECK(m_hasDefiniteLogicalHeight); |
| 3501 return m_hasDefiniteLogicalHeight.value(); | 3501 return m_hasDefiniteLogicalHeight.value(); |
| 3502 } | 3502 } |
| 3503 | 3503 |
| 3504 } // namespace blink | 3504 } // namespace blink |
| OLD | NEW |