| 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 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2073 } | 2073 } |
| 2074 | 2074 |
| 2075 LayoutUnit LayoutGrid::assumedRowsSizeForOrthogonalChild(const LayoutBox& child,
SizingOperation sizingOperation) const | 2075 LayoutUnit LayoutGrid::assumedRowsSizeForOrthogonalChild(const LayoutBox& child,
SizingOperation sizingOperation) const |
| 2076 { | 2076 { |
| 2077 DCHECK(isOrthogonalChild(child)); | 2077 DCHECK(isOrthogonalChild(child)); |
| 2078 const GridSpan& span = cachedGridSpan(child, ForRows); | 2078 const GridSpan& span = cachedGridSpan(child, ForRows); |
| 2079 LayoutUnit gridAreaSize; | 2079 LayoutUnit gridAreaSize; |
| 2080 bool gridAreaIsIndefinite = false; | 2080 bool gridAreaIsIndefinite = false; |
| 2081 LayoutUnit containingBlockAvailableSize = containingBlockLogicalHeightForCon
tent(ExcludeMarginBorderPadding); | 2081 LayoutUnit containingBlockAvailableSize = containingBlockLogicalHeightForCon
tent(ExcludeMarginBorderPadding); |
| 2082 for (auto trackPosition : span) { | 2082 for (auto trackPosition : span) { |
| 2083 const GridLength& maxTrackSize = gridTrackSize(ForRows, trackPosition, s
izingOperation).maxTrackBreadth(); | 2083 GridLength maxTrackSize = gridTrackSize(ForRows, trackPosition, sizingOp
eration).maxTrackBreadth(); |
| 2084 if (maxTrackSize.isContentSized() || maxTrackSize.isFlex()) | 2084 if (maxTrackSize.isContentSized() || maxTrackSize.isFlex()) |
| 2085 gridAreaIsIndefinite = true; | 2085 gridAreaIsIndefinite = true; |
| 2086 else | 2086 else |
| 2087 gridAreaSize += valueForLength(maxTrackSize.length(), containingBloc
kAvailableSize); | 2087 gridAreaSize += valueForLength(maxTrackSize.length(), containingBloc
kAvailableSize); |
| 2088 } | 2088 } |
| 2089 | 2089 |
| 2090 gridAreaSize += guttersSize(ForRows, span.startLine(), span.integerSpan()); | 2090 gridAreaSize += guttersSize(ForRows, span.startLine(), span.integerSpan()); |
| 2091 | 2091 |
| 2092 return gridAreaIsIndefinite ? std::max(child.maxPreferredLogicalWidth(), gri
dAreaSize) : gridAreaSize; | 2092 return gridAreaIsIndefinite ? std::max(child.maxPreferredLogicalWidth(), gri
dAreaSize) : gridAreaSize; |
| 2093 } | 2093 } |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2656 return isOrthogonalChild(child) ? childLocation.transposedPoint() : childLoc
ation; | 2656 return isOrthogonalChild(child) ? childLocation.transposedPoint() : childLoc
ation; |
| 2657 } | 2657 } |
| 2658 | 2658 |
| 2659 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const | 2659 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const |
| 2660 { | 2660 { |
| 2661 if (!m_gridItemArea.isEmpty()) | 2661 if (!m_gridItemArea.isEmpty()) |
| 2662 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 2662 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
| 2663 } | 2663 } |
| 2664 | 2664 |
| 2665 } // namespace blink | 2665 } // namespace blink |
| OLD | NEW |