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 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 { | 1219 { |
1220 bool isRowAxis = direction == ForColumns; | 1220 bool isRowAxis = direction == ForColumns; |
1221 const auto& autoRepeatTracks = isRowAxis ? styleRef().gridAutoRepeatColumns(
) : styleRef().gridAutoRepeatRows(); | 1221 const auto& autoRepeatTracks = isRowAxis ? styleRef().gridAutoRepeatColumns(
) : styleRef().gridAutoRepeatRows(); |
1222 | 1222 |
1223 if (!autoRepeatTracks.size()) | 1223 if (!autoRepeatTracks.size()) |
1224 return 0; | 1224 return 0; |
1225 | 1225 |
1226 DCHECK_EQ(autoRepeatTracks.size(), static_cast<size_t>(1)); | 1226 DCHECK_EQ(autoRepeatTracks.size(), static_cast<size_t>(1)); |
1227 auto autoTrackSize = autoRepeatTracks.at(0); | 1227 auto autoTrackSize = autoRepeatTracks.at(0); |
1228 DCHECK(autoTrackSize.minTrackBreadth().isLength()); | 1228 DCHECK(autoTrackSize.minTrackBreadth().isLength()); |
1229 DCHECK(!autoTrackSize.minTrackBreadth().isContentSized()); | 1229 DCHECK(!autoTrackSize.minTrackBreadth().isFlex()); |
1230 | 1230 |
1231 LayoutUnit availableSize = isRowAxis ? availableLogicalWidth() : computeCont
entLogicalHeight(MainOrPreferredSize, styleRef().logicalHeight(), LayoutUnit(-1)
); | 1231 LayoutUnit availableSize = isRowAxis ? availableLogicalWidth() : computeCont
entLogicalHeight(MainOrPreferredSize, styleRef().logicalHeight(), LayoutUnit(-1)
); |
1232 if (availableSize == -1) { | 1232 if (availableSize == -1) { |
1233 const Length& maxLength = isRowAxis ? styleRef().logicalMaxWidth() : sty
leRef().logicalMaxHeight(); | 1233 const Length& maxLength = isRowAxis ? styleRef().logicalMaxWidth() : sty
leRef().logicalMaxHeight(); |
1234 if (!maxLength.isMaxSizeNone()) { | 1234 if (!maxLength.isMaxSizeNone()) { |
1235 availableSize = isRowAxis | 1235 availableSize = isRowAxis |
1236 ? computeLogicalWidthUsing(MaxSize, maxLength, containingBlockLo
gicalWidthForContent(), containingBlock()) | 1236 ? computeLogicalWidthUsing(MaxSize, maxLength, containingBlockLo
gicalWidthForContent(), containingBlock()) |
1237 : computeContentLogicalHeight(MaxSize, maxLength, LayoutUnit(-1)
); | 1237 : computeContentLogicalHeight(MaxSize, maxLength, LayoutUnit(-1)
); |
1238 } | 1238 } |
1239 } else { | 1239 } else { |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 | 2240 |
2241 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData
)); | 2241 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData
)); |
2242 } | 2242 } |
2243 | 2243 |
2244 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const | 2244 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const |
2245 { | 2245 { |
2246 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 2246 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
2247 } | 2247 } |
2248 | 2248 |
2249 } // namespace blink | 2249 } // namespace blink |
OLD | NEW |