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

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

Issue 2417853002: [css-grid] Implementing the grid's first line baseline. (Closed)
Patch Set: Patch rebased. 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 294 }
295 bool allowedToStretchChildAlongRowAxis(const LayoutBox& child) const { 295 bool allowedToStretchChildAlongRowAxis(const LayoutBox& child) const {
296 return justifySelfForChild(child).position() == ItemPositionStretch && 296 return justifySelfForChild(child).position() == ItemPositionStretch &&
297 hasAutoSizeInRowAxis(child) && !hasAutoMarginsInRowAxis(child); 297 hasAutoSizeInRowAxis(child) && !hasAutoMarginsInRowAxis(child);
298 } 298 }
299 bool hasAutoMarginsInColumnAxis(const LayoutBox&) const; 299 bool hasAutoMarginsInColumnAxis(const LayoutBox&) const;
300 bool hasAutoMarginsInRowAxis(const LayoutBox&) const; 300 bool hasAutoMarginsInRowAxis(const LayoutBox&) const;
301 void updateAutoMarginsInColumnAxisIfNeeded(LayoutBox&); 301 void updateAutoMarginsInColumnAxisIfNeeded(LayoutBox&);
302 void updateAutoMarginsInRowAxisIfNeeded(LayoutBox&); 302 void updateAutoMarginsInRowAxisIfNeeded(LayoutBox&);
303 303
304 int baselinePosition(
305 FontBaseline,
306 bool firstLine,
307 LineDirectionMode,
308 LinePositionMode = PositionOnContainingLine) const override;
309 int firstLineBoxBaseline() const override;
310 int inlineBlockBaseline(LineDirectionMode) const override;
311 bool isInlineBaselineAlignedChild(const LayoutBox* child) const;
312
304 #if ENABLE(ASSERT) 313 #if ENABLE(ASSERT)
305 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, 314 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection,
306 GridSizingData&) const; 315 GridSizingData&) const;
307 #endif 316 #endif
308 317
309 LayoutUnit gridGapForDirection(GridTrackSizingDirection, 318 LayoutUnit gridGapForDirection(GridTrackSizingDirection,
310 SizingOperation) const; 319 SizingOperation) const;
311 LayoutUnit guttersSize(GridTrackSizingDirection, 320 LayoutUnit guttersSize(GridTrackSizingDirection,
312 size_t startLine, 321 size_t startLine,
313 size_t span, 322 size_t span,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows{nullptr}; 364 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows{nullptr};
356 365
357 Optional<bool> m_hasDefiniteLogicalHeight; 366 Optional<bool> m_hasDefiniteLogicalHeight;
358 }; 367 };
359 368
360 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); 369 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid());
361 370
362 } // namespace blink 371 } // namespace blink
363 372
364 #endif // LayoutGrid_h 373 #endif // LayoutGrid_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698