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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 | 450 |
451 GridSizingData sizingData(gridColumnCount(), gridRowCount()); | 451 GridSizingData sizingData(gridColumnCount(), gridRowCount()); |
452 sizingData.freeSpaceForDirection(ForColumns) = LayoutUnit(); | 452 sizingData.freeSpaceForDirection(ForColumns) = LayoutUnit(); |
453 sizingData.sizingOperation = GridSizingData::IntrinsicSizeComputation; | 453 sizingData.sizingOperation = GridSizingData::IntrinsicSizeComputation; |
454 const_cast<LayoutGrid*>(this)->computeUsedBreadthOfGridTracks(ForColumns, si
zingData, minLogicalWidth, maxLogicalWidth, AvailableSpaceIndefinite); | 454 const_cast<LayoutGrid*>(this)->computeUsedBreadthOfGridTracks(ForColumns, si
zingData, minLogicalWidth, maxLogicalWidth, AvailableSpaceIndefinite); |
455 | 455 |
456 LayoutUnit totalGuttersSize = guttersSize(ForColumns, sizingData.columnTrack
s.size()); | 456 LayoutUnit totalGuttersSize = guttersSize(ForColumns, sizingData.columnTrack
s.size()); |
457 minLogicalWidth += totalGuttersSize; | 457 minLogicalWidth += totalGuttersSize; |
458 maxLogicalWidth += totalGuttersSize; | 458 maxLogicalWidth += totalGuttersSize; |
459 | 459 |
460 LayoutUnit scrollbarWidth = LayoutUnit(intrinsicScrollbarLogicalWidth()); | 460 LayoutUnit scrollbarWidth = LayoutUnit(scrollbarLogicalWidth()); |
461 minLogicalWidth += scrollbarWidth; | 461 minLogicalWidth += scrollbarWidth; |
462 maxLogicalWidth += scrollbarWidth; | 462 maxLogicalWidth += scrollbarWidth; |
463 } | 463 } |
464 | 464 |
465 void LayoutGrid::computeIntrinsicLogicalHeight(GridSizingData& sizingData) | 465 void LayoutGrid::computeIntrinsicLogicalHeight(GridSizingData& sizingData) |
466 { | 466 { |
467 ASSERT(tracksAreWiderThanMinTrackBreadth(ForColumns, sizingData)); | 467 ASSERT(tracksAreWiderThanMinTrackBreadth(ForColumns, sizingData)); |
468 sizingData.freeSpaceForDirection(ForRows) = LayoutUnit(); | 468 sizingData.freeSpaceForDirection(ForRows) = LayoutUnit(); |
469 sizingData.sizingOperation = GridSizingData::IntrinsicSizeComputation; | 469 sizingData.sizingOperation = GridSizingData::IntrinsicSizeComputation; |
470 computeUsedBreadthOfGridTracks(ForRows, sizingData, m_minContentHeight, m_ma
xContentHeight, AvailableSpaceIndefinite); | 470 computeUsedBreadthOfGridTracks(ForRows, sizingData, m_minContentHeight, m_ma
xContentHeight, AvailableSpaceIndefinite); |
(...skipping 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2255 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData
)); | 2255 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData
)); |
2256 } | 2256 } |
2257 | 2257 |
2258 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const | 2258 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const |
2259 { | 2259 { |
2260 if (!m_gridItemArea.isEmpty()) | 2260 if (!m_gridItemArea.isEmpty()) |
2261 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 2261 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
2262 } | 2262 } |
2263 | 2263 |
2264 } // namespace blink | 2264 } // namespace blink |
OLD | NEW |