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

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

Issue 2001113002: [css-grid] Update <fixed-size> syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | 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 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698