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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 else | 370 else |
371 computeTrackSizesForDirection(ForRows, sizingData, availableLogicalH
eight(ExcludeMarginBorderPadding)); | 371 computeTrackSizesForDirection(ForRows, sizingData, availableLogicalH
eight(ExcludeMarginBorderPadding)); |
372 setLogicalHeight(computeTrackBasedLogicalHeight(sizingData) + borderAndP
addingLogicalHeight()); | 372 setLogicalHeight(computeTrackBasedLogicalHeight(sizingData) + borderAndP
addingLogicalHeight()); |
373 | 373 |
374 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); | 374 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); |
375 updateLogicalHeight(); | 375 updateLogicalHeight(); |
376 | 376 |
377 // The above call might have changed the grid's logical height depending
on min|max height restrictions. | 377 // The above call might have changed the grid's logical height depending
on min|max height restrictions. |
378 // Update the sizes of the rows whose size depends on the logical height
(also on definite|indefinite sizes). | 378 // Update the sizes of the rows whose size depends on the logical height
(also on definite|indefinite sizes). |
379 if (logicalHeightWasIndefinite) | 379 if (logicalHeightWasIndefinite) |
380 computeTrackSizesForDirection(ForRows, sizingData, logicalHeight()); | 380 computeTrackSizesForDirection(ForRows, sizingData, contentLogicalHei
ght()); |
381 | 381 |
382 // Grid container should have the minimum height of a line if it's edita
ble. That doesn't affect track sizing though. | 382 // Grid container should have the minimum height of a line if it's edita
ble. That doesn't affect track sizing though. |
383 if (hasLineIfEmpty()) | 383 if (hasLineIfEmpty()) |
384 setLogicalHeight(std::max(logicalHeight(), minimumLogicalHeightForEm
ptyLine())); | 384 setLogicalHeight(std::max(logicalHeight(), minimumLogicalHeightForEm
ptyLine())); |
385 | 385 |
386 applyStretchAlignmentToTracksIfNeeded(ForColumns, sizingData); | 386 applyStretchAlignmentToTracksIfNeeded(ForColumns, sizingData); |
387 applyStretchAlignmentToTracksIfNeeded(ForRows, sizingData); | 387 applyStretchAlignmentToTracksIfNeeded(ForRows, sizingData); |
388 | 388 |
389 layoutGridItems(sizingData); | 389 layoutGridItems(sizingData); |
390 | 390 |
(...skipping 1666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2057 | 2057 |
2058 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child)); | 2058 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child)); |
2059 } | 2059 } |
2060 | 2060 |
2061 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const | 2061 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const |
2062 { | 2062 { |
2063 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 2063 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
2064 } | 2064 } |
2065 | 2065 |
2066 } // namespace blink | 2066 } // namespace blink |
OLD | NEW |