Commit 5056af6e authored by Ian Kilpatrick's avatar Ian Kilpatrick Committed by Commit Bot

[FlexNG] Fix documentation for FlexItem constructor.

As above - followup from:
https://chromium-review.googlesource.com/c/chromium/src/+/2012161

Bug: 845235
Change-Id: I48021b5a42b34500393594e7739a89289e9d8ed6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2014447
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734015}
parent a6198a9e
...@@ -77,7 +77,7 @@ FlexItem::FlexItem(const FlexLayoutAlgorithm* algorithm, ...@@ -77,7 +77,7 @@ FlexItem::FlexItem(const FlexLayoutAlgorithm* algorithm,
LayoutBox* box, LayoutBox* box,
const ComputedStyle& style, const ComputedStyle& style,
LayoutUnit flex_base_content_size, LayoutUnit flex_base_content_size,
MinMaxSize min_max_sizes, MinMaxSize min_max_main_sizes,
base::Optional<MinMaxSize> min_max_cross_sizes, base::Optional<MinMaxSize> min_max_cross_sizes,
LayoutUnit main_axis_border_padding, LayoutUnit main_axis_border_padding,
LayoutUnit cross_axis_border_padding, LayoutUnit cross_axis_border_padding,
...@@ -87,17 +87,17 @@ FlexItem::FlexItem(const FlexLayoutAlgorithm* algorithm, ...@@ -87,17 +87,17 @@ FlexItem::FlexItem(const FlexLayoutAlgorithm* algorithm,
box(box), box(box),
style(style), style(style),
flex_base_content_size(flex_base_content_size), flex_base_content_size(flex_base_content_size),
min_max_sizes(min_max_sizes), min_max_main_sizes(min_max_main_sizes),
min_max_cross_sizes(min_max_cross_sizes), min_max_cross_sizes(min_max_cross_sizes),
hypothetical_main_content_size( hypothetical_main_content_size(
min_max_sizes.ClampSizeToMinAndMax(flex_base_content_size)), min_max_main_sizes.ClampSizeToMinAndMax(flex_base_content_size)),
main_axis_border_padding(main_axis_border_padding), main_axis_border_padding(main_axis_border_padding),
cross_axis_border_padding(cross_axis_border_padding), cross_axis_border_padding(cross_axis_border_padding),
physical_margins(physical_margins), physical_margins(physical_margins),
frozen(false), frozen(false),
needs_relayout_for_stretch(false), needs_relayout_for_stretch(false),
ng_input_node(/* LayoutBox* */ nullptr) { ng_input_node(/* LayoutBox* */ nullptr) {
DCHECK_GE(min_max_sizes.max_size, LayoutUnit()) DCHECK_GE(min_max_main_sizes.max_size, LayoutUnit())
<< "Use LayoutUnit::Max() for no max size"; << "Use LayoutUnit::Max() for no max size";
} }
......
...@@ -113,14 +113,14 @@ class FlexItem { ...@@ -113,14 +113,14 @@ class FlexItem {
public: public:
// Parameters: // Parameters:
// - |flex_base_content_size| includes scrollbar size but not border/padding. // - |flex_base_content_size| includes scrollbar size but not border/padding.
// - |min_max_sizes| is the resolved min and max size properties in the // - |min_max_main_sizes| is the resolved min and max size properties in the
// main axis direction (not intrinsic widths). It does not include // main axis direction (not intrinsic widths). It does not include
// border/scrollbar/padding. // border/padding.
FlexItem(const FlexLayoutAlgorithm*, FlexItem(const FlexLayoutAlgorithm*,
LayoutBox*, LayoutBox*,
const ComputedStyle& style, const ComputedStyle& style,
LayoutUnit flex_base_content_size, LayoutUnit flex_base_content_size,
MinMaxSize min_max_main_axis_sizes, MinMaxSize min_max_main_sizes,
// Ignored for legacy, required for NG: // Ignored for legacy, required for NG:
base::Optional<MinMaxSize> min_max_cross_sizes, base::Optional<MinMaxSize> min_max_cross_sizes,
LayoutUnit main_axis_border_padding, LayoutUnit main_axis_border_padding,
...@@ -147,7 +147,7 @@ class FlexItem { ...@@ -147,7 +147,7 @@ class FlexItem {
} }
LayoutUnit ClampSizeToMinAndMax(LayoutUnit size) const { LayoutUnit ClampSizeToMinAndMax(LayoutUnit size) const {
return min_max_sizes.ClampSizeToMinAndMax(size); return min_max_main_sizes.ClampSizeToMinAndMax(size);
} }
ItemPosition Alignment() const; ItemPosition Alignment() const;
...@@ -190,7 +190,7 @@ class FlexItem { ...@@ -190,7 +190,7 @@ class FlexItem {
LayoutBox* box; LayoutBox* box;
const ComputedStyle& style; const ComputedStyle& style;
const LayoutUnit flex_base_content_size; const LayoutUnit flex_base_content_size;
const MinMaxSize min_max_sizes; const MinMaxSize min_max_main_sizes;
const base::Optional<MinMaxSize> min_max_cross_sizes; const base::Optional<MinMaxSize> min_max_cross_sizes;
const LayoutUnit hypothetical_main_content_size; const LayoutUnit hypothetical_main_content_size;
const LayoutUnit main_axis_border_padding; const LayoutUnit main_axis_border_padding;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment