Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Side by Side Diff: Source/core/rendering/RenderGrid.h

Issue 181333003: [CSS Grid Layout] Use Render methods, rather than style, to determine shrink-to-fit behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Some improvements in the test. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) OVERRIDE; 65 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) OVERRIDE;
66 virtual void removeChild(RenderObject*) OVERRIDE; 66 virtual void removeChild(RenderObject*) OVERRIDE;
67 67
68 virtual void styleDidChange(StyleDifference, const RenderStyle*) OVERRIDE; 68 virtual void styleDidChange(StyleDifference, const RenderStyle*) OVERRIDE;
69 69
70 bool explicitGridDidResize(const RenderStyle*) const; 70 bool explicitGridDidResize(const RenderStyle*) const;
71 bool namedGridLinesDefinitionDidChange(const RenderStyle*) const; 71 bool namedGridLinesDefinitionDidChange(const RenderStyle*) const;
72 72
73 class GridIterator; 73 class GridIterator;
74 struct GridSizingData; 74 struct GridSizingData;
75 bool gridElementIsShrinkToFit();
75 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData &); 76 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData &);
76 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData &, LayoutUnit& availableLogicalSpace); 77 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData &, LayoutUnit& availableLogicalSpace);
77 LayoutUnit computeUsedBreadthOfMinLength(GridTrackSizingDirection, const Gri dLength&) const; 78 LayoutUnit computeUsedBreadthOfMinLength(GridTrackSizingDirection, const Gri dLength&) const;
78 LayoutUnit computeUsedBreadthOfMaxLength(GridTrackSizingDirection, const Gri dLength&, LayoutUnit usedBreadth) const; 79 LayoutUnit computeUsedBreadthOfMaxLength(GridTrackSizingDirection, const Gri dLength&, LayoutUnit usedBreadth) const;
79 LayoutUnit computeUsedBreadthOfSpecifiedLength(GridTrackSizingDirection, con st Length&) const; 80 LayoutUnit computeUsedBreadthOfSpecifiedLength(GridTrackSizingDirection, con st Length&) const;
80 void resolveContentBasedTrackSizingFunctions(GridTrackSizingDirection, GridS izingData&, LayoutUnit& availableLogicalSpace); 81 void resolveContentBasedTrackSizingFunctions(GridTrackSizingDirection, GridS izingData&, LayoutUnit& availableLogicalSpace);
81 82
82 void growGrid(GridTrackSizingDirection); 83 void growGrid(GridTrackSizingDirection);
83 void insertItemIntoGrid(RenderBox*, size_t rowTrack, size_t columnTrack); 84 void insertItemIntoGrid(RenderBox*, size_t rowTrack, size_t columnTrack);
84 void insertItemIntoGrid(RenderBox*, const GridCoordinate&); 85 void insertItemIntoGrid(RenderBox*, const GridCoordinate&);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 Vector<RenderBox*> m_gridItemsOverflowingGridArea; 164 Vector<RenderBox*> m_gridItemsOverflowingGridArea;
164 165
165 friend class GridCoordinateSorter; 166 friend class GridCoordinateSorter;
166 }; 167 };
167 168
168 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid()); 169 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid());
169 170
170 } // namespace WebCore 171 } // namespace WebCore
171 172
172 #endif // RenderGrid_h 173 #endif // RenderGrid_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-grid-layout/grid-element-shrink-to-fit-expected.txt ('k') | Source/core/rendering/RenderGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698