| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef GridTrackSizingAlgorithm_h | 5 #ifndef GridTrackSizingAlgorithm_h |
| 6 #define GridTrackSizingAlgorithm_h | 6 #define GridTrackSizingAlgorithm_h |
| 7 | 7 |
| 8 #include "core/style/GridPositionsResolver.h" | 8 #include "core/style/GridPositionsResolver.h" |
| 9 #include "core/style/GridTrackSize.h" | 9 #include "core/style/GridTrackSize.h" |
| 10 #include "platform/LayoutUnit.h" | 10 #include "platform/LayoutUnit.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 LayoutUnit minContentSize() const { return m_minContentSize; }; | 97 LayoutUnit minContentSize() const { return m_minContentSize; }; |
| 98 LayoutUnit maxContentSize() const { return m_maxContentSize; }; | 98 LayoutUnit maxContentSize() const { return m_maxContentSize; }; |
| 99 | 99 |
| 100 Vector<GridTrack>& tracks(GridTrackSizingDirection); | 100 Vector<GridTrack>& tracks(GridTrackSizingDirection); |
| 101 const Vector<GridTrack>& tracks(GridTrackSizingDirection) const; | 101 const Vector<GridTrack>& tracks(GridTrackSizingDirection) const; |
| 102 | 102 |
| 103 LayoutUnit& freeSpace(GridTrackSizingDirection); | 103 LayoutUnit& freeSpace(GridTrackSizingDirection); |
| 104 | 104 |
| 105 #if DCHECK_IS_ON() | 105 #if DCHECK_IS_ON() |
| 106 bool tracksAreWiderThanMinTrackBreadth() const; | 106 bool tracksAreWiderThanMinTrackBreadth() const; |
| 107 bool isTrackSizingOperation() const { |
| 108 return m_sizingOperation == TrackSizing; |
| 109 }; |
| 107 #endif | 110 #endif |
| 108 | 111 |
| 109 private: | 112 private: |
| 110 GridTrackSize gridTrackSize(GridTrackSizingDirection, | 113 GridTrackSize gridTrackSize(GridTrackSizingDirection, |
| 111 size_t translatedIndex) const; | 114 size_t translatedIndex) const; |
| 112 GridTrackSize rawGridTrackSize(GridTrackSizingDirection, | 115 GridTrackSize rawGridTrackSize(GridTrackSizingDirection, |
| 113 size_t translatedIndex) const; | 116 size_t translatedIndex) const; |
| 114 LayoutUnit assumedRowsSizeForOrthogonalChild(const LayoutBox&) const; | 117 LayoutUnit assumedRowsSizeForOrthogonalChild(const LayoutBox&) const; |
| 115 LayoutUnit computeTrackBasedSize() const; | 118 LayoutUnit computeTrackBasedSize() const; |
| 116 | 119 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 LayoutUnit leftOverSpace) const; | 264 LayoutUnit leftOverSpace) const; |
| 262 void distributeSpaceToTracks(Vector<GridTrack*>& tracks, | 265 void distributeSpaceToTracks(Vector<GridTrack*>& tracks, |
| 263 LayoutUnit& availableLogicalSpace) const; | 266 LayoutUnit& availableLogicalSpace) const; |
| 264 const LayoutGrid* layoutGrid() const { return m_algorithm.m_layoutGrid; } | 267 const LayoutGrid* layoutGrid() const { return m_algorithm.m_layoutGrid; } |
| 265 | 268 |
| 266 GridTrackSizingAlgorithm& m_algorithm; | 269 GridTrackSizingAlgorithm& m_algorithm; |
| 267 }; | 270 }; |
| 268 } | 271 } |
| 269 | 272 |
| 270 #endif // GridTrackSizingAlgorithm_h | 273 #endif // GridTrackSizingAlgorithm_h |
| OLD | NEW |