Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutGrid.cpp

Issue 2325603003: [css-grid] Fix a dangling reference (Closed)
Patch Set: Patch Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698