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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 | 433 |
434 GridSizingData sizingData(gridColumnCount(), gridRowCount()); | 434 GridSizingData sizingData(gridColumnCount(), gridRowCount()); |
435 sizingData.freeSpaceForDirection(ForColumns) = LayoutUnit(); | 435 sizingData.freeSpaceForDirection(ForColumns) = LayoutUnit(); |
436 sizingData.sizingOperation = GridSizingData::IntrinsicSizeComputation; | 436 sizingData.sizingOperation = GridSizingData::IntrinsicSizeComputation; |
437 const_cast<LayoutGrid*>(this)->computeUsedBreadthOfGridTracks(ForColumns, si
zingData, minLogicalWidth, maxLogicalWidth, AvailableSpaceIndefinite); | 437 const_cast<LayoutGrid*>(this)->computeUsedBreadthOfGridTracks(ForColumns, si
zingData, minLogicalWidth, maxLogicalWidth, AvailableSpaceIndefinite); |
438 | 438 |
439 LayoutUnit totalGuttersSize = guttersSize(ForColumns, sizingData.columnTrack
s.size()); | 439 LayoutUnit totalGuttersSize = guttersSize(ForColumns, sizingData.columnTrack
s.size()); |
440 minLogicalWidth += totalGuttersSize; | 440 minLogicalWidth += totalGuttersSize; |
441 maxLogicalWidth += totalGuttersSize; | 441 maxLogicalWidth += totalGuttersSize; |
442 | 442 |
443 LayoutUnit scrollbarWidth = LayoutUnit(intrinsicScrollbarLogicalWidth()); | 443 LayoutUnit scrollbarWidth = LayoutUnit(scrollbarLogicalWidth()); |
444 minLogicalWidth += scrollbarWidth; | 444 minLogicalWidth += scrollbarWidth; |
445 maxLogicalWidth += scrollbarWidth; | 445 maxLogicalWidth += scrollbarWidth; |
446 } | 446 } |
447 | 447 |
448 void LayoutGrid::computeIntrinsicLogicalHeight(GridSizingData& sizingData) | 448 void LayoutGrid::computeIntrinsicLogicalHeight(GridSizingData& sizingData) |
449 { | 449 { |
450 ASSERT(tracksAreWiderThanMinTrackBreadth(ForColumns, sizingData)); | 450 ASSERT(tracksAreWiderThanMinTrackBreadth(ForColumns, sizingData)); |
451 sizingData.freeSpaceForDirection(ForRows) = LayoutUnit(); | 451 sizingData.freeSpaceForDirection(ForRows) = LayoutUnit(); |
452 sizingData.sizingOperation = GridSizingData::IntrinsicSizeComputation; | 452 sizingData.sizingOperation = GridSizingData::IntrinsicSizeComputation; |
453 computeUsedBreadthOfGridTracks(ForRows, sizingData, m_minContentHeight, m_ma
xContentHeight, AvailableSpaceIndefinite); | 453 computeUsedBreadthOfGridTracks(ForRows, sizingData, m_minContentHeight, m_ma
xContentHeight, AvailableSpaceIndefinite); |
(...skipping 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 | 2240 |
2241 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData
)); | 2241 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData
)); |
2242 } | 2242 } |
2243 | 2243 |
2244 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const | 2244 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const |
2245 { | 2245 { |
2246 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 2246 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
2247 } | 2247 } |
2248 | 2248 |
2249 } // namespace blink | 2249 } // namespace blink |
OLD | NEW |