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 adjustPositionedGridItem(RenderBox*); |
| 100 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior
= DefaultLayout); |
| 101 LayoutUnit offsetForPositionedChild(const RenderBox&, GridTrackSizingDirecti
on, LayoutUnit& breadth); |
99 void populateGridPositions(const GridSizingData&); | 102 void populateGridPositions(const GridSizingData&); |
100 | 103 |
101 typedef LayoutUnit (RenderGrid::* SizingFunction)(RenderBox&, GridTrackSizin
gDirection, Vector<GridTrack>&); | 104 typedef LayoutUnit (RenderGrid::* SizingFunction)(RenderBox&, GridTrackSizin
gDirection, Vector<GridTrack>&); |
102 typedef LayoutUnit (GridTrack::* AccumulatorGetter)() const; | 105 typedef LayoutUnit (GridTrack::* AccumulatorGetter)() const; |
103 typedef void (GridTrack::* AccumulatorGrowFunction)(LayoutUnit); | 106 typedef void (GridTrack::* AccumulatorGrowFunction)(LayoutUnit); |
104 typedef bool (GridTrackSize::* FilterFunction)() const; | 107 typedef bool (GridTrackSize::* FilterFunction)() const; |
105 void resolveContentBasedTrackSizingFunctionsForItems(GridTrackSizingDirectio
n, GridSizingData&, GridItemWithSpan&, FilterFunction, SizingFunction, Accumulat
orGetter, AccumulatorGrowFunction, FilterFunction growAboveMaxBreadthFilterFunct
ion = nullptr); | 108 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); | 109 void distributeSpaceToTracks(Vector<GridTrack*>&, Vector<size_t>* tracksForG
rowthAboveMaxBreadth, AccumulatorGetter, AccumulatorGrowFunction, GridSizingData
&, LayoutUnit& availableLogicalSpace); |
107 | 110 |
108 double computeNormalizedFractionBreadth(Vector<GridTrack>&, const GridSpan&
tracksSpan, GridTrackSizingDirection, LayoutUnit availableLogicalSpace) const; | 111 double computeNormalizedFractionBreadth(Vector<GridTrack>&, const GridSpan&
tracksSpan, GridTrackSizingDirection, LayoutUnit availableLogicalSpace) const; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 OrderIterator m_orderIterator; | 166 OrderIterator m_orderIterator; |
164 Vector<RenderBox*> m_gridItemsOverflowingGridArea; | 167 Vector<RenderBox*> m_gridItemsOverflowingGridArea; |
165 HashMap<const RenderBox*, size_t> m_gridItemsIndexesMap; | 168 HashMap<const RenderBox*, size_t> m_gridItemsIndexesMap; |
166 }; | 169 }; |
167 | 170 |
168 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid()); | 171 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid()); |
169 | 172 |
170 } // namespace blink | 173 } // namespace blink |
171 | 174 |
172 #endif // RenderGrid_h | 175 #endif // RenderGrid_h |
OLD | NEW |