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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutGrid.h

Issue 2513953002: [css-grid] Avoid double loop in positioned objects layout (Closed)
Patch Set: Created 4 years, 1 month 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 void computeTrackSizesForDefiniteSize(GridTrackSizingDirection, 176 void computeTrackSizesForDefiniteSize(GridTrackSizingDirection,
177 GridSizingData&, 177 GridSizingData&,
178 LayoutUnit freeSpace) const; 178 LayoutUnit freeSpace) const;
179 179
180 void repeatTracksSizingIfNeeded(GridSizingData&, 180 void repeatTracksSizingIfNeeded(GridSizingData&,
181 LayoutUnit availableSpaceForColumns, 181 LayoutUnit availableSpaceForColumns,
182 LayoutUnit availableSpaceForRows); 182 LayoutUnit availableSpaceForRows);
183 183
184 void layoutGridItems(GridSizingData&); 184 void layoutGridItems(GridSizingData&);
185 void prepareChildForPositionedLayout(LayoutBox&); 185 void prepareChildForPositionedLayout(LayoutBox&);
186 void layoutPositionedObjects( 186 void layoutPositionedObject(
jfernandez 2016/11/18 16:18:22 Better keep overriding the layoutPositionedObjects
187 LayoutBox*,
187 bool relayoutChildren, 188 bool relayoutChildren,
188 PositionedLayoutBehavior = DefaultLayout) override; 189 PositionedLayoutBehavior = DefaultLayout) override;
189 void offsetAndBreadthForPositionedChild(const LayoutBox&, 190 void offsetAndBreadthForPositionedChild(const LayoutBox&,
190 GridTrackSizingDirection, 191 GridTrackSizingDirection,
191 LayoutUnit& offset, 192 LayoutUnit& offset,
192 LayoutUnit& breadth); 193 LayoutUnit& breadth);
193 void populateGridPositionsForDirection(GridSizingData&, 194 void populateGridPositionsForDirection(GridSizingData&,
194 GridTrackSizingDirection); 195 GridTrackSizingDirection);
195 196
196 typedef struct GridItemsSpanGroupRange GridItemsSpanGroupRange; 197 typedef struct GridItemsSpanGroupRange GridItemsSpanGroupRange;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows{nullptr}; 373 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows{nullptr};
373 374
374 Optional<bool> m_hasDefiniteLogicalHeight; 375 Optional<bool> m_hasDefiniteLogicalHeight;
375 }; 376 };
376 377
377 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); 378 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid());
378 379
379 } // namespace blink 380 } // namespace blink
380 381
381 #endif // LayoutGrid_h 382 #endif // LayoutGrid_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698