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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 accumulatedFractions += track.m_flex; | 574 accumulatedFractions += track.m_flex; |
575 // This item was processed so we re-add its used breadth to the availabl
e space to accurately count the remaining space. | 575 // This item was processed so we re-add its used breadth to the availabl
e space to accurately count the remaining space. |
576 availableLogicalSpaceIgnoringFractionTracks += track.m_track->baseSize()
; | 576 availableLogicalSpaceIgnoringFractionTracks += track.m_track->baseSize()
; |
577 } | 577 } |
578 | 578 |
579 return availableLogicalSpaceIgnoringFractionTracks / accumulatedFractions; | 579 return availableLogicalSpaceIgnoringFractionTracks / accumulatedFractions; |
580 } | 580 } |
581 | 581 |
582 bool LayoutGrid::hasDefiniteLogicalSize(GridTrackSizingDirection direction) cons
t | 582 bool LayoutGrid::hasDefiniteLogicalSize(GridTrackSizingDirection direction) cons
t |
583 { | 583 { |
584 return (direction == ForRows) ? hasDefiniteLogicalHeight() : hasDefiniteLogi
calWidth(); | 584 return (direction == ForRows) ? logicalHeightIsDefinite(style()->logicalHeig
ht()) : hasDefiniteLogicalWidth(); |
585 } | 585 } |
586 | 586 |
587 GridTrackSize LayoutGrid::gridTrackSize(GridTrackSizingDirection direction, size
_t i) const | 587 GridTrackSize LayoutGrid::gridTrackSize(GridTrackSizingDirection direction, size
_t i) const |
588 { | 588 { |
589 bool isForColumns = direction == ForColumns; | 589 bool isForColumns = direction == ForColumns; |
590 const Vector<GridTrackSize>& trackStyles = isForColumns ? style()->gridTempl
ateColumns() : style()->gridTemplateRows(); | 590 const Vector<GridTrackSize>& trackStyles = isForColumns ? style()->gridTempl
ateColumns() : style()->gridTemplateRows(); |
591 const GridTrackSize& trackSize = (i >= trackStyles.size()) ? (isForColumns ?
style()->gridAutoColumns() : style()->gridAutoRows()) : trackStyles[i]; | 591 const GridTrackSize& trackSize = (i >= trackStyles.size()) ? (isForColumns ?
style()->gridAutoColumns() : style()->gridAutoRows()) : trackStyles[i]; |
592 | 592 |
593 GridLength minTrackBreadth = trackSize.minTrackBreadth(); | 593 GridLength minTrackBreadth = trackSize.minTrackBreadth(); |
594 GridLength maxTrackBreadth = trackSize.maxTrackBreadth(); | 594 GridLength maxTrackBreadth = trackSize.maxTrackBreadth(); |
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1920 | 1920 |
1921 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child)); | 1921 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child)); |
1922 } | 1922 } |
1923 | 1923 |
1924 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) | 1924 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) |
1925 { | 1925 { |
1926 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 1926 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
1927 } | 1927 } |
1928 | 1928 |
1929 } // namespace blink | 1929 } // namespace blink |
OLD | NEW |