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

Side by Side Diff: Source/core/rendering/RenderFlexibleBox.cpp

Issue 333423005: [CSS Grid Layout] Implement 'justify-items' parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Applied suggested changes. Created 6 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 // FIXME: If we get here in columns, we want the use the descent , except we currently can't get the ascent/descent of orthogonal children. 1321 // FIXME: If we get here in columns, we want the use the descent , except we currently can't get the ascent/descent of orthogonal children.
1322 // https://bugs.webkit.org/show_bug.cgi?id=98076 1322 // https://bugs.webkit.org/show_bug.cgi?id=98076
1323 LayoutUnit ascent = marginBoxAscentForChild(child); 1323 LayoutUnit ascent = marginBoxAscentForChild(child);
1324 LayoutUnit startOffset = maxAscent - ascent; 1324 LayoutUnit startOffset = maxAscent - ascent;
1325 adjustAlignmentForChild(child, startOffset); 1325 adjustAlignmentForChild(child, startOffset);
1326 1326
1327 if (style()->flexWrap() == FlexWrapReverse) 1327 if (style()->flexWrap() == FlexWrapReverse)
1328 minMarginAfterBaseline = std::min(minMarginAfterBaseline, av ailableAlignmentSpaceForChild(lineCrossAxisExtent, child) - startOffset); 1328 minMarginAfterBaseline = std::min(minMarginAfterBaseline, av ailableAlignmentSpaceForChild(lineCrossAxisExtent, child) - startOffset);
1329 break; 1329 break;
1330 } 1330 }
1331 case ItemPositionLastBaseline:
1331 case ItemPositionSelfStart: 1332 case ItemPositionSelfStart:
1332 case ItemPositionSelfEnd: 1333 case ItemPositionSelfEnd:
1333 case ItemPositionStart: 1334 case ItemPositionStart:
1334 case ItemPositionEnd: 1335 case ItemPositionEnd:
1335 case ItemPositionLeft: 1336 case ItemPositionLeft:
1336 case ItemPositionRight: 1337 case ItemPositionRight:
1337 // FIXME: File a bug about implementing that. The extended gramm ar 1338 // FIXME: File a bug about implementing that. The extended gramm ar
1338 // is not enabled by default so we shouldn't hit this codepath. 1339 // is not enabled by default so we shouldn't hit this codepath.
1339 ASSERT_NOT_REACHED(); 1340 ASSERT_NOT_REACHED();
1340 break; 1341 break;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 ASSERT(child); 1417 ASSERT(child);
1417 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1418 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1418 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1419 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1419 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1420 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1420 adjustAlignmentForChild(child, newOffset - originalOffset); 1421 adjustAlignmentForChild(child, newOffset - originalOffset);
1421 } 1422 }
1422 } 1423 }
1423 } 1424 }
1424 1425
1425 } 1426 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698