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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 void placeItemsOnGrid(); | 89 void placeItemsOnGrid(); |
90 void populateExplicitGridAndOrderIterator(); | 90 void populateExplicitGridAndOrderIterator(); |
91 PassOwnPtr<GridCoordinate> createEmptyGridAreaAtSpecifiedPositionsOutsideGri
d(const RenderBox&, GridTrackSizingDirection, const GridSpan& specifiedPositions
) const; | 91 PassOwnPtr<GridCoordinate> createEmptyGridAreaAtSpecifiedPositionsOutsideGri
d(const RenderBox&, GridTrackSizingDirection, const GridSpan& specifiedPositions
) const; |
92 void placeSpecifiedMajorAxisItemsOnGrid(const Vector<RenderBox*>&); | 92 void placeSpecifiedMajorAxisItemsOnGrid(const Vector<RenderBox*>&); |
93 void placeAutoMajorAxisItemsOnGrid(const Vector<RenderBox*>&); | 93 void placeAutoMajorAxisItemsOnGrid(const Vector<RenderBox*>&); |
94 void placeAutoMajorAxisItemOnGrid(RenderBox&, std::pair<size_t, size_t>& aut
oPlacementCursor); | 94 void placeAutoMajorAxisItemOnGrid(RenderBox&, std::pair<size_t, size_t>& aut
oPlacementCursor); |
95 GridTrackSizingDirection autoPlacementMajorAxisDirection() const; | 95 GridTrackSizingDirection autoPlacementMajorAxisDirection() const; |
96 GridTrackSizingDirection autoPlacementMinorAxisDirection() const; | 96 GridTrackSizingDirection autoPlacementMinorAxisDirection() const; |
97 | 97 |
98 void layoutGridItems(); | 98 void layoutGridItems(); |
| 99 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior
= DefaultLayout); |
| 100 void offsetAndBreadthForPositionedChild(const RenderBox&, GridTrackSizingDir
ection, bool startIsAuto, bool endIsAuto, LayoutUnit& offset, LayoutUnit& breadt
h); |
99 void populateGridPositions(const GridSizingData&, LayoutUnit availableSpaceF
orColumns, LayoutUnit availableSpaceForRows); | 101 void populateGridPositions(const GridSizingData&, LayoutUnit availableSpaceF
orColumns, LayoutUnit availableSpaceForRows); |
100 | 102 |
101 typedef LayoutUnit (RenderGrid::* SizingFunction)(RenderBox&, GridTrackSizin
gDirection, Vector<GridTrack>&); | 103 typedef LayoutUnit (RenderGrid::* SizingFunction)(RenderBox&, GridTrackSizin
gDirection, Vector<GridTrack>&); |
102 typedef LayoutUnit (GridTrack::* AccumulatorGetter)() const; | 104 typedef LayoutUnit (GridTrack::* AccumulatorGetter)() const; |
103 typedef void (GridTrack::* AccumulatorGrowFunction)(LayoutUnit); | 105 typedef void (GridTrack::* AccumulatorGrowFunction)(LayoutUnit); |
104 typedef bool (GridTrackSize::* FilterFunction)() const; | 106 typedef bool (GridTrackSize::* FilterFunction)() const; |
105 void resolveContentBasedTrackSizingFunctionsForItems(GridTrackSizingDirectio
n, GridSizingData&, GridItemWithSpan&, FilterFunction, SizingFunction, Accumulat
orGetter, AccumulatorGrowFunction, FilterFunction growAboveMaxBreadthFilterFunct
ion = nullptr); | 107 void resolveContentBasedTrackSizingFunctionsForItems(GridTrackSizingDirectio
n, GridSizingData&, GridItemWithSpan&, FilterFunction, SizingFunction, Accumulat
orGetter, AccumulatorGrowFunction, FilterFunction growAboveMaxBreadthFilterFunct
ion = nullptr); |
106 void distributeSpaceToTracks(Vector<GridTrack*>&, Vector<size_t>* tracksForG
rowthAboveMaxBreadth, AccumulatorGetter, AccumulatorGrowFunction, GridSizingData
&, LayoutUnit& availableLogicalSpace); | 108 void distributeSpaceToTracks(Vector<GridTrack*>&, Vector<size_t>* tracksForG
rowthAboveMaxBreadth, AccumulatorGetter, AccumulatorGrowFunction, GridSizingData
&, LayoutUnit& availableLogicalSpace); |
107 | 109 |
108 double computeNormalizedFractionBreadth(Vector<GridTrack>&, const GridSpan&
tracksSpan, GridTrackSizingDirection, LayoutUnit availableLogicalSpace) const; | 110 double computeNormalizedFractionBreadth(Vector<GridTrack>&, const GridSpan&
tracksSpan, GridTrackSizingDirection, LayoutUnit availableLogicalSpace) const; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 OrderIterator m_orderIterator; | 166 OrderIterator m_orderIterator; |
165 Vector<RenderBox*> m_gridItemsOverflowingGridArea; | 167 Vector<RenderBox*> m_gridItemsOverflowingGridArea; |
166 HashMap<const RenderBox*, size_t> m_gridItemsIndexesMap; | 168 HashMap<const RenderBox*, size_t> m_gridItemsIndexesMap; |
167 }; | 169 }; |
168 | 170 |
169 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid()); | 171 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid()); |
170 | 172 |
171 } // namespace blink | 173 } // namespace blink |
172 | 174 |
173 #endif // RenderGrid_h | 175 #endif // RenderGrid_h |
OLD | NEW |