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

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

Issue 988523003: Reimplement min-width: auto (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutFlexibleBox.cpp ('k') | Source/core/layout/LayoutMenuList.cpp » ('j') | 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 } 520 }
521 521
522 ASSERT(trackLength.isMinContent() || trackLength.isMaxContent()); 522 ASSERT(trackLength.isMinContent() || trackLength.isMaxContent());
523 return infinity; 523 return infinity;
524 } 524 }
525 525
526 LayoutUnit LayoutGrid::computeUsedBreadthOfSpecifiedLength(GridTrackSizingDirect ion direction, const Length& trackLength) const 526 LayoutUnit LayoutGrid::computeUsedBreadthOfSpecifiedLength(GridTrackSizingDirect ion direction, const Length& trackLength) const
527 { 527 {
528 ASSERT(trackLength.isSpecified()); 528 ASSERT(trackLength.isSpecified());
529 // FIXME: The -1 here should be replaced by whatever the intrinsic height of the grid is. 529 // FIXME: The -1 here should be replaced by whatever the intrinsic height of the grid is.
530 return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : std::max(LayoutUnit(), computeContentLogicalHeight(style()->logicalHeight(), - 1))); 530 return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : std::max(LayoutUnit(), computeContentLogicalHeight(MainOrPreferredSize, style( )->logicalHeight(), -1)));
531 } 531 }
532 532
533 static bool sortByGridNormalizedFlexValue(const GridTrackForNormalization& track 1, const GridTrackForNormalization& track2) 533 static bool sortByGridNormalizedFlexValue(const GridTrackForNormalization& track 1, const GridTrackForNormalization& track2)
534 { 534 {
535 return track1.m_normalizedFlexValue < track2.m_normalizedFlexValue; 535 return track1.m_normalizedFlexValue < track2.m_normalizedFlexValue;
536 } 536 }
537 537
538 double LayoutGrid::computeNormalizedFractionBreadth(Vector<GridTrack>& tracks, c onst GridSpan& tracksSpan, GridTrackSizingDirection direction, LayoutUnit spaceT oFill) const 538 double LayoutGrid::computeNormalizedFractionBreadth(Vector<GridTrack>& tracks, c onst GridSpan& tracksSpan, GridTrackSizingDirection direction, LayoutUnit spaceT oFill) const
539 { 539 {
540 LayoutUnit allocatedSpace; 540 LayoutUnit allocatedSpace;
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 if (isFloating()) 1767 if (isFloating())
1768 return "LayoutGrid (floating)"; 1768 return "LayoutGrid (floating)";
1769 if (isAnonymous()) 1769 if (isAnonymous())
1770 return "LayoutGrid (anonymous)"; 1770 return "LayoutGrid (anonymous)";
1771 if (isRelPositioned()) 1771 if (isRelPositioned())
1772 return "LayoutGrid (relative positioned)"; 1772 return "LayoutGrid (relative positioned)";
1773 return "LayoutGrid"; 1773 return "LayoutGrid";
1774 } 1774 }
1775 1775
1776 } // namespace blink 1776 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutFlexibleBox.cpp ('k') | Source/core/layout/LayoutMenuList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698