| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 GridTrackSizingDirection, | 124 GridTrackSizingDirection, |
| 125 GridSizingData&, | 125 GridSizingData&, |
| 126 LayoutUnit& baseSizesWithoutMaximization, | 126 LayoutUnit& baseSizesWithoutMaximization, |
| 127 LayoutUnit& growthLimitsWithoutMaximization) const; | 127 LayoutUnit& growthLimitsWithoutMaximization) const; |
| 128 void computeFlexSizedTracksGrowth( | 128 void computeFlexSizedTracksGrowth( |
| 129 GridTrackSizingDirection, | 129 GridTrackSizingDirection, |
| 130 Vector<GridTrack>&, | 130 Vector<GridTrack>&, |
| 131 const Vector<size_t>& flexibleSizedTracksIndex, | 131 const Vector<size_t>& flexibleSizedTracksIndex, |
| 132 double flexFraction, | 132 double flexFraction, |
| 133 Vector<LayoutUnit>& increments, | 133 Vector<LayoutUnit>& increments, |
| 134 LayoutUnit& totalGrowth) const; | 134 LayoutUnit& totalGrowth, |
| 135 const GridSizingData&) const; |
| 135 LayoutUnit computeUsedBreadthOfMinLength(const GridTrackSize&, | 136 LayoutUnit computeUsedBreadthOfMinLength(const GridTrackSize&, |
| 136 LayoutUnit maxBreadth) const; | 137 LayoutUnit maxBreadth) const; |
| 137 LayoutUnit computeUsedBreadthOfMaxLength(const GridTrackSize&, | 138 LayoutUnit computeUsedBreadthOfMaxLength(const GridTrackSize&, |
| 138 LayoutUnit usedBreadth, | 139 LayoutUnit usedBreadth, |
| 139 LayoutUnit maxBreadth) const; | 140 LayoutUnit maxBreadth) const; |
| 140 void resolveContentBasedTrackSizingFunctions(GridTrackSizingDirection, | 141 void resolveContentBasedTrackSizingFunctions(GridTrackSizingDirection, |
| 141 GridSizingData&) const; | 142 GridSizingData&) const; |
| 142 | 143 |
| 143 size_t computeAutoRepeatTracksCount(GridTrackSizingDirection, | 144 size_t computeAutoRepeatTracksCount(GridTrackSizingDirection, |
| 144 SizingOperation) const; | 145 SizingOperation) const; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 typedef HashSet<size_t, | 217 typedef HashSet<size_t, |
| 217 DefaultHash<size_t>::Hash, | 218 DefaultHash<size_t>::Hash, |
| 218 WTF::UnsignedWithZeroKeyHashTraits<size_t>> | 219 WTF::UnsignedWithZeroKeyHashTraits<size_t>> |
| 219 TrackIndexSet; | 220 TrackIndexSet; |
| 220 double computeFlexFactorUnitSize( | 221 double computeFlexFactorUnitSize( |
| 221 const Vector<GridTrack>&, | 222 const Vector<GridTrack>&, |
| 222 GridTrackSizingDirection, | 223 GridTrackSizingDirection, |
| 223 double flexFactorSum, | 224 double flexFactorSum, |
| 224 LayoutUnit& leftOverSpace, | 225 LayoutUnit& leftOverSpace, |
| 225 const Vector<size_t, 8>& flexibleTracksIndexes, | 226 const Vector<size_t, 8>& flexibleTracksIndexes, |
| 227 const GridSizingData&, |
| 226 std::unique_ptr<TrackIndexSet> tracksToTreatAsInflexible = nullptr) const; | 228 std::unique_ptr<TrackIndexSet> tracksToTreatAsInflexible = nullptr) const; |
| 227 double findFlexFactorUnitSize(const Vector<GridTrack>&, | 229 double findFlexFactorUnitSize(const Vector<GridTrack>&, |
| 228 const GridSpan&, | 230 const GridSpan&, |
| 229 GridTrackSizingDirection, | 231 GridTrackSizingDirection, |
| 230 LayoutUnit leftOverSpace) const; | 232 LayoutUnit leftOverSpace, |
| 233 const GridSizingData&) const; |
| 231 | 234 |
| 232 const GridTrackSize& rawGridTrackSize(GridTrackSizingDirection, size_t) const; | 235 const GridTrackSize& rawGridTrackSize(GridTrackSizingDirection, |
| 236 size_t, |
| 237 const GridSizingData&) const; |
| 233 GridTrackSize gridTrackSize(GridTrackSizingDirection, | 238 GridTrackSize gridTrackSize(GridTrackSizingDirection, |
| 234 size_t, | 239 size_t, |
| 235 SizingOperation = TrackSizing) const; | 240 const GridSizingData&) const; |
| 236 | 241 |
| 237 bool updateOverrideContainingBlockContentSizeForChild( | 242 bool updateOverrideContainingBlockContentSizeForChild( |
| 238 LayoutBox&, | 243 LayoutBox&, |
| 239 GridTrackSizingDirection, | 244 GridTrackSizingDirection, |
| 240 GridSizingData&) const; | 245 GridSizingData&) const; |
| 241 LayoutUnit logicalHeightForChild(LayoutBox&, GridSizingData&) const; | 246 LayoutUnit logicalHeightForChild(LayoutBox&, GridSizingData&) const; |
| 242 LayoutUnit minSizeForChild(LayoutBox&, | 247 LayoutUnit minSizeForChild(LayoutBox&, |
| 243 GridTrackSizingDirection, | 248 GridTrackSizingDirection, |
| 244 GridSizingData&) const; | 249 GridSizingData&) const; |
| 245 LayoutUnit minContentForChild(LayoutBox&, | 250 LayoutUnit minContentForChild(LayoutBox&, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 262 GridSpan cachedGridSpan(const LayoutBox&, GridTrackSizingDirection) const; | 267 GridSpan cachedGridSpan(const LayoutBox&, GridTrackSizingDirection) const; |
| 263 | 268 |
| 264 LayoutUnit gridAreaBreadthForChild(const LayoutBox& child, | 269 LayoutUnit gridAreaBreadthForChild(const LayoutBox& child, |
| 265 GridTrackSizingDirection, | 270 GridTrackSizingDirection, |
| 266 const GridSizingData&) const; | 271 const GridSizingData&) const; |
| 267 LayoutUnit gridAreaBreadthForChildIncludingAlignmentOffsets( | 272 LayoutUnit gridAreaBreadthForChildIncludingAlignmentOffsets( |
| 268 const LayoutBox&, | 273 const LayoutBox&, |
| 269 GridTrackSizingDirection, | 274 GridTrackSizingDirection, |
| 270 const GridSizingData&) const; | 275 const GridSizingData&) const; |
| 271 LayoutUnit assumedRowsSizeForOrthogonalChild(const LayoutBox&, | 276 LayoutUnit assumedRowsSizeForOrthogonalChild(const LayoutBox&, |
| 272 SizingOperation) const; | 277 const GridSizingData&) const; |
| 273 | 278 |
| 274 void applyStretchAlignmentToTracksIfNeeded(GridTrackSizingDirection, | 279 void applyStretchAlignmentToTracksIfNeeded(GridTrackSizingDirection, |
| 275 GridSizingData&); | 280 GridSizingData&); |
| 276 | 281 |
| 277 void paintChildren(const PaintInfo&, const LayoutPoint&) const override; | 282 void paintChildren(const PaintInfo&, const LayoutPoint&) const override; |
| 278 | 283 |
| 279 LayoutUnit marginLogicalHeightForChild(const LayoutBox&) const; | 284 LayoutUnit marginLogicalHeightForChild(const LayoutBox&) const; |
| 280 LayoutUnit computeMarginLogicalSizeForChild(MarginDirection, | 285 LayoutUnit computeMarginLogicalSizeForChild(MarginDirection, |
| 281 const LayoutBox&) const; | 286 const LayoutBox&) const; |
| 282 LayoutUnit availableAlignmentSpaceForChildBeforeStretching( | 287 LayoutUnit availableAlignmentSpaceForChildBeforeStretching( |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 int inlineBlockBaseline(LineDirectionMode) const override; | 320 int inlineBlockBaseline(LineDirectionMode) const override; |
| 316 bool isInlineBaselineAlignedChild(const LayoutBox* child) const; | 321 bool isInlineBaselineAlignedChild(const LayoutBox* child) const; |
| 317 | 322 |
| 318 #if ENABLE(ASSERT) | 323 #if ENABLE(ASSERT) |
| 319 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, | 324 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, |
| 320 GridSizingData&) const; | 325 GridSizingData&) const; |
| 321 #endif | 326 #endif |
| 322 | 327 |
| 323 LayoutUnit gridGapForDirection(GridTrackSizingDirection, | 328 LayoutUnit gridGapForDirection(GridTrackSizingDirection, |
| 324 SizingOperation) const; | 329 SizingOperation) const; |
| 325 LayoutUnit guttersSize(GridTrackSizingDirection, | 330 LayoutUnit guttersSize(const Grid&, |
| 331 GridTrackSizingDirection, |
| 326 size_t startLine, | 332 size_t startLine, |
| 327 size_t span, | 333 size_t span, |
| 328 SizingOperation) const; | 334 SizingOperation) const; |
| 329 | 335 |
| 330 size_t gridItemSpan(const LayoutBox&, GridTrackSizingDirection); | 336 size_t gridItemSpan(const LayoutBox&, GridTrackSizingDirection); |
| 331 bool spanningItemCrossesFlexibleSizedTracks(const GridSpan&, | 337 bool spanningItemCrossesFlexibleSizedTracks(const GridSpan&, |
| 332 GridTrackSizingDirection, | 338 GridTrackSizingDirection, |
| 333 SizingOperation) const; | 339 const GridSizingData&) const; |
| 334 | 340 |
| 335 bool isOrthogonalChild(const LayoutBox&) const; | 341 bool isOrthogonalChild(const LayoutBox&) const; |
| 336 GridTrackSizingDirection flowAwareDirectionForChild( | 342 GridTrackSizingDirection flowAwareDirectionForChild( |
| 337 const LayoutBox&, | 343 const LayoutBox&, |
| 338 GridTrackSizingDirection) const; | 344 GridTrackSizingDirection) const; |
| 339 | 345 |
| 340 bool cachedHasDefiniteLogicalHeight() const; | 346 bool cachedHasDefiniteLogicalHeight() const; |
| 341 | 347 |
| 342 size_t numTracks(GridTrackSizingDirection, const Grid&) const; | 348 size_t numTracks(GridTrackSizingDirection, const Grid&) const; |
| 343 | 349 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 LayoutUnit m_maxContentHeight{-1}; | 436 LayoutUnit m_maxContentHeight{-1}; |
| 431 | 437 |
| 432 Optional<bool> m_hasDefiniteLogicalHeight; | 438 Optional<bool> m_hasDefiniteLogicalHeight; |
| 433 }; | 439 }; |
| 434 | 440 |
| 435 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); | 441 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); |
| 436 | 442 |
| 437 } // namespace blink | 443 } // namespace blink |
| 438 | 444 |
| 439 #endif // LayoutGrid_h | 445 #endif // LayoutGrid_h |
| OLD | NEW |