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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 LayoutUnit ComputeIntrinsicLogicalContentHeightUsing( | 122 LayoutUnit ComputeIntrinsicLogicalContentHeightUsing( |
123 const Length& logical_height_length, | 123 const Length& logical_height_length, |
124 LayoutUnit intrinsic_content_height, | 124 LayoutUnit intrinsic_content_height, |
125 LayoutUnit border_and_padding) const override; | 125 LayoutUnit border_and_padding) const override; |
126 | 126 |
127 void AddChild(LayoutObject* new_child, | 127 void AddChild(LayoutObject* new_child, |
128 LayoutObject* before_child = nullptr) override; | 128 LayoutObject* before_child = nullptr) override; |
129 void RemoveChild(LayoutObject*) override; | 129 void RemoveChild(LayoutObject*) override; |
130 | 130 |
131 bool SelfAlignmentChangedToStretch(GridAxis, | |
132 const ComputedStyle& old_style, | |
133 const ComputedStyle& new_style, | |
134 const LayoutBox&) const; | |
135 bool SelfAlignmentChangedFromStretch(GridAxis, | |
136 const ComputedStyle& old_style, | |
137 const ComputedStyle& new_style, | |
138 const LayoutBox&) const; | |
139 void StyleDidChange(StyleDifference, const ComputedStyle*) override; | 131 void StyleDidChange(StyleDifference, const ComputedStyle*) override; |
140 | 132 |
141 Optional<LayoutUnit> AvailableSpaceForGutters(GridTrackSizingDirection) const; | 133 Optional<LayoutUnit> AvailableSpaceForGutters(GridTrackSizingDirection) const; |
142 | 134 |
143 bool ExplicitGridDidResize(const ComputedStyle&) const; | 135 bool ExplicitGridDidResize(const ComputedStyle&) const; |
144 bool NamedGridLinesDefinitionDidChange(const ComputedStyle&) const; | 136 bool NamedGridLinesDefinitionDidChange(const ComputedStyle&) const; |
145 | 137 |
146 size_t ComputeAutoRepeatTracksCount( | 138 size_t ComputeAutoRepeatTracksCount( |
147 GridTrackSizingDirection, | 139 GridTrackSizingDirection, |
148 Optional<LayoutUnit> available_size) const; | 140 Optional<LayoutUnit> available_size) const; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 void ApplyStretchAlignmentToTracksIfNeeded(GridTrackSizingDirection); | 204 void ApplyStretchAlignmentToTracksIfNeeded(GridTrackSizingDirection); |
213 | 205 |
214 void PaintChildren(const PaintInfo&, const LayoutPoint&) const override; | 206 void PaintChildren(const PaintInfo&, const LayoutPoint&) const override; |
215 | 207 |
216 LayoutUnit MarginLogicalHeightForChild(const LayoutBox&) const; | 208 LayoutUnit MarginLogicalHeightForChild(const LayoutBox&) const; |
217 LayoutUnit ComputeMarginLogicalSizeForChild(MarginDirection, | 209 LayoutUnit ComputeMarginLogicalSizeForChild(MarginDirection, |
218 const LayoutBox&) const; | 210 const LayoutBox&) const; |
219 LayoutUnit AvailableAlignmentSpaceForChildBeforeStretching( | 211 LayoutUnit AvailableAlignmentSpaceForChildBeforeStretching( |
220 LayoutUnit grid_area_breadth_for_child, | 212 LayoutUnit grid_area_breadth_for_child, |
221 const LayoutBox&) const; | 213 const LayoutBox&) const; |
222 StyleSelfAlignmentData JustifySelfForChild( | 214 StyleSelfAlignmentData JustifySelfForChild(const LayoutBox&) const; |
223 const LayoutBox&, | 215 StyleSelfAlignmentData AlignSelfForChild(const LayoutBox&) const; |
224 const ComputedStyle* = nullptr) const; | |
225 StyleSelfAlignmentData AlignSelfForChild( | |
226 const LayoutBox&, | |
227 const ComputedStyle* = nullptr) const; | |
228 StyleSelfAlignmentData SelfAlignmentForChild( | |
229 GridAxis, | |
230 const LayoutBox& child, | |
231 const ComputedStyle* = nullptr) const; | |
232 void ApplyStretchAlignmentToChildIfNeeded(LayoutBox&); | 216 void ApplyStretchAlignmentToChildIfNeeded(LayoutBox&); |
233 bool HasAutoSizeInColumnAxis(const LayoutBox& child) const { | 217 bool HasAutoSizeInColumnAxis(const LayoutBox& child) const { |
234 return IsHorizontalWritingMode() ? child.StyleRef().Height().IsAuto() | 218 return IsHorizontalWritingMode() ? child.StyleRef().Height().IsAuto() |
235 : child.StyleRef().Width().IsAuto(); | 219 : child.StyleRef().Width().IsAuto(); |
236 } | 220 } |
237 bool HasAutoSizeInRowAxis(const LayoutBox& child) const { | 221 bool HasAutoSizeInRowAxis(const LayoutBox& child) const { |
238 return IsHorizontalWritingMode() ? child.StyleRef().Width().IsAuto() | 222 return IsHorizontalWritingMode() ? child.StyleRef().Width().IsAuto() |
239 : child.StyleRef().Height().IsAuto(); | 223 : child.StyleRef().Height().IsAuto(); |
240 } | 224 } |
241 bool AllowedToStretchChildAlongColumnAxis(const LayoutBox& child) const { | 225 bool AllowedToStretchChildAlongColumnAxis(const LayoutBox& child) const { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 LayoutUnit max_content_height_{-1}; | 306 LayoutUnit max_content_height_{-1}; |
323 | 307 |
324 Optional<bool> has_definite_logical_height_; | 308 Optional<bool> has_definite_logical_height_; |
325 }; | 309 }; |
326 | 310 |
327 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, IsLayoutGrid()); | 311 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, IsLayoutGrid()); |
328 | 312 |
329 } // namespace blink | 313 } // namespace blink |
330 | 314 |
331 #endif // LayoutGrid_h | 315 #endif // LayoutGrid_h |
OLD | NEW |