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

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

Issue 2915773002: Reland of [css-align] Don't resolve 'auto' values for computed style. (Closed)
Patch Set: Applied suggested changes Created 3 years, 6 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
131 void StyleDidChange(StyleDifference, const ComputedStyle*) override; 139 void StyleDidChange(StyleDifference, const ComputedStyle*) override;
132 140
133 Optional<LayoutUnit> AvailableSpaceForGutters(GridTrackSizingDirection) const; 141 Optional<LayoutUnit> AvailableSpaceForGutters(GridTrackSizingDirection) const;
134 142
135 bool ExplicitGridDidResize(const ComputedStyle&) const; 143 bool ExplicitGridDidResize(const ComputedStyle&) const;
136 bool NamedGridLinesDefinitionDidChange(const ComputedStyle&) const; 144 bool NamedGridLinesDefinitionDidChange(const ComputedStyle&) const;
137 145
138 size_t ComputeAutoRepeatTracksCount( 146 size_t ComputeAutoRepeatTracksCount(
139 GridTrackSizingDirection, 147 GridTrackSizingDirection,
140 Optional<LayoutUnit> available_size) const; 148 Optional<LayoutUnit> available_size) const;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 void ApplyStretchAlignmentToTracksIfNeeded(GridTrackSizingDirection); 212 void ApplyStretchAlignmentToTracksIfNeeded(GridTrackSizingDirection);
205 213
206 void PaintChildren(const PaintInfo&, const LayoutPoint&) const override; 214 void PaintChildren(const PaintInfo&, const LayoutPoint&) const override;
207 215
208 LayoutUnit MarginLogicalHeightForChild(const LayoutBox&) const; 216 LayoutUnit MarginLogicalHeightForChild(const LayoutBox&) const;
209 LayoutUnit ComputeMarginLogicalSizeForChild(MarginDirection, 217 LayoutUnit ComputeMarginLogicalSizeForChild(MarginDirection,
210 const LayoutBox&) const; 218 const LayoutBox&) const;
211 LayoutUnit AvailableAlignmentSpaceForChildBeforeStretching( 219 LayoutUnit AvailableAlignmentSpaceForChildBeforeStretching(
212 LayoutUnit grid_area_breadth_for_child, 220 LayoutUnit grid_area_breadth_for_child,
213 const LayoutBox&) const; 221 const LayoutBox&) const;
214 StyleSelfAlignmentData JustifySelfForChild(const LayoutBox&) const; 222 StyleSelfAlignmentData JustifySelfForChild(
215 StyleSelfAlignmentData AlignSelfForChild(const LayoutBox&) const; 223 const LayoutBox&,
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;
216 void ApplyStretchAlignmentToChildIfNeeded(LayoutBox&); 232 void ApplyStretchAlignmentToChildIfNeeded(LayoutBox&);
217 bool HasAutoSizeInColumnAxis(const LayoutBox& child) const { 233 bool HasAutoSizeInColumnAxis(const LayoutBox& child) const {
218 return IsHorizontalWritingMode() ? child.StyleRef().Height().IsAuto() 234 return IsHorizontalWritingMode() ? child.StyleRef().Height().IsAuto()
219 : child.StyleRef().Width().IsAuto(); 235 : child.StyleRef().Width().IsAuto();
220 } 236 }
221 bool HasAutoSizeInRowAxis(const LayoutBox& child) const { 237 bool HasAutoSizeInRowAxis(const LayoutBox& child) const {
222 return IsHorizontalWritingMode() ? child.StyleRef().Width().IsAuto() 238 return IsHorizontalWritingMode() ? child.StyleRef().Width().IsAuto()
223 : child.StyleRef().Height().IsAuto(); 239 : child.StyleRef().Height().IsAuto();
224 } 240 }
225 bool AllowedToStretchChildAlongColumnAxis(const LayoutBox& child) const { 241 bool AllowedToStretchChildAlongColumnAxis(const LayoutBox& child) const {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 LayoutUnit max_content_height_{-1}; 322 LayoutUnit max_content_height_{-1};
307 323
308 Optional<bool> has_definite_logical_height_; 324 Optional<bool> has_definite_logical_height_;
309 }; 325 };
310 326
311 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, IsLayoutGrid()); 327 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, IsLayoutGrid());
312 328
313 } // namespace blink 329 } // namespace blink
314 330
315 #endif // LayoutGrid_h 331 #endif // LayoutGrid_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698