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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 SECURITY_DCHECK(!m_gridIsDirty); | 87 SECURITY_DCHECK(!m_gridIsDirty); |
88 return m_grid.gridItemPaintOrder(*layoutBox); | 88 return m_grid.gridItemPaintOrder(*layoutBox); |
89 } | 89 } |
90 | 90 |
91 size_t autoRepeatCountForDirection(GridTrackSizingDirection direction) const { | 91 size_t autoRepeatCountForDirection(GridTrackSizingDirection direction) const { |
92 return direction == ForColumns ? m_autoRepeatColumns : m_autoRepeatRows; | 92 return direction == ForColumns ? m_autoRepeatColumns : m_autoRepeatRows; |
93 } | 93 } |
94 | 94 |
95 LayoutUnit translateRTLCoordinate(LayoutUnit) const; | 95 LayoutUnit translateRTLCoordinate(LayoutUnit) const; |
96 | 96 |
| 97 protected: |
| 98 ItemPosition selfAlignmentNormalBehavior() const override { |
| 99 return ItemPositionStretch; |
| 100 } |
| 101 |
97 private: | 102 private: |
98 bool isOfType(LayoutObjectType type) const override { | 103 bool isOfType(LayoutObjectType type) const override { |
99 return type == LayoutObjectLayoutGrid || LayoutBlock::isOfType(type); | 104 return type == LayoutObjectLayoutGrid || LayoutBlock::isOfType(type); |
100 } | 105 } |
101 void computeIntrinsicLogicalWidths( | 106 void computeIntrinsicLogicalWidths( |
102 LayoutUnit& minLogicalWidth, | 107 LayoutUnit& minLogicalWidth, |
103 LayoutUnit& maxLogicalWidth) const override; | 108 LayoutUnit& maxLogicalWidth) const override; |
104 | 109 |
105 LayoutUnit computeIntrinsicLogicalContentHeightUsing( | 110 LayoutUnit computeIntrinsicLogicalContentHeightUsing( |
106 const Length& logicalHeightLength, | 111 const Length& logicalHeightLength, |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows{nullptr}; | 415 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows{nullptr}; |
411 | 416 |
412 Optional<bool> m_hasDefiniteLogicalHeight; | 417 Optional<bool> m_hasDefiniteLogicalHeight; |
413 }; | 418 }; |
414 | 419 |
415 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); | 420 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); |
416 | 421 |
417 } // namespace blink | 422 } // namespace blink |
418 | 423 |
419 #endif // LayoutGrid_h | 424 #endif // LayoutGrid_h |
OLD | NEW |