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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
518 } | 518 } |
519 | 519 |
520 ASSERT(trackLength.isMinContent() || trackLength.isAuto() || trackLength.isM axContent()); | 520 ASSERT(trackLength.isMinContent() || trackLength.isAuto() || trackLength.isM axContent()); |
521 return infinity; | 521 return infinity; |
522 } | 522 } |
523 | 523 |
524 LayoutUnit LayoutGrid::computeUsedBreadthOfSpecifiedLength(GridTrackSizingDirect ion direction, const Length& trackLength) const | 524 LayoutUnit LayoutGrid::computeUsedBreadthOfSpecifiedLength(GridTrackSizingDirect ion direction, const Length& trackLength) const |
525 { | 525 { |
526 ASSERT(trackLength.isSpecified()); | 526 ASSERT(trackLength.isSpecified()); |
527 // FIXME: The -1 here should be replaced by whatever the intrinsic height of the grid is. | 527 // FIXME: The -1 here should be replaced by whatever the intrinsic height of the grid is. |
528 return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : std::max(LayoutUnit(), computeContentLogicalHeight(MainOrPreferredSize, style( )->logicalHeight(), -1))); | 528 return valueForLength(trackLength, direction == ForColumns ? logicalWidth() - borderAndPaddingLogicalWidth() : std::max(LayoutUnit(), computeContentLogicalH eight(MainOrPreferredSize, style()->logicalHeight(), -1))); |
cbiesinger
2015/10/08 20:51:24
I'm way too late here, but... maybe use contentLog
Manuel Rego
2015/10/09 13:16:24
Yeah, that was changed a few days later in:
https:
| |
529 } | 529 } |
530 | 530 |
531 static bool sortByGridNormalizedFlexValue(const GridTrackForNormalization& track 1, const GridTrackForNormalization& track2) | 531 static bool sortByGridNormalizedFlexValue(const GridTrackForNormalization& track 1, const GridTrackForNormalization& track2) |
532 { | 532 { |
533 return track1.m_normalizedFlexValue < track2.m_normalizedFlexValue; | 533 return track1.m_normalizedFlexValue < track2.m_normalizedFlexValue; |
534 } | 534 } |
535 | 535 |
536 double LayoutGrid::computeNormalizedFractionBreadth(Vector<GridTrack>& tracks, c onst GridSpan& tracksSpan, GridTrackSizingDirection direction, LayoutUnit spaceT oFill) const | 536 double LayoutGrid::computeNormalizedFractionBreadth(Vector<GridTrack>& tracks, c onst GridSpan& tracksSpan, GridTrackSizingDirection direction, LayoutUnit spaceT oFill) const |
537 { | 537 { |
538 LayoutUnit allocatedSpace; | 538 LayoutUnit allocatedSpace; |
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1923 | 1923 |
1924 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child)); | 1924 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child)); |
1925 } | 1925 } |
1926 | 1926 |
1927 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) | 1927 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) |
1928 { | 1928 { |
1929 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 1929 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
1930 } | 1930 } |
1931 | 1931 |
1932 } // namespace blink | 1932 } // namespace blink |
OLD | NEW |