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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |