Commit efd814d3 authored by David Grogan's avatar David Grogan Committed by Commit Bot

[FlexNG] Update comment and make a member const

Just code health, no behavior change.

Bug: 845235
Change-Id: I1202f1c37751537e8112c33f3b1228647407b6dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1895748Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Commit-Queue: David Grogan <dgrogan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712021}
parent 968d4291
...@@ -26,7 +26,8 @@ NGFlexLayoutAlgorithm::NGFlexLayoutAlgorithm( ...@@ -26,7 +26,8 @@ NGFlexLayoutAlgorithm::NGFlexLayoutAlgorithm(
params.fragment_geometry.padding), params.fragment_geometry.padding),
border_scrollbar_padding_(border_padding_ + border_scrollbar_padding_(border_padding_ +
params.fragment_geometry.scrollbar), params.fragment_geometry.scrollbar),
is_column_(Style().ResolvedIsColumnFlexDirection()) { is_column_(Style().ResolvedIsColumnFlexDirection()),
is_horizontal_flow_(FlexLayoutAlgorithm::IsHorizontalFlow(Style())) {
container_builder_.SetIsNewFormattingContext( container_builder_.SetIsNewFormattingContext(
params.space.IsNewFormattingContext()); params.space.IsNewFormattingContext());
container_builder_.SetInitialFragmentGeometry(params.fragment_geometry); container_builder_.SetInitialFragmentGeometry(params.fragment_geometry);
...@@ -498,7 +499,6 @@ scoped_refptr<const NGLayoutResult> NGFlexLayoutAlgorithm::Layout() { ...@@ -498,7 +499,6 @@ scoped_refptr<const NGLayoutResult> NGFlexLayoutAlgorithm::Layout() {
const LayoutUnit line_break_length = MainAxisContentExtent(LayoutUnit::Max()); const LayoutUnit line_break_length = MainAxisContentExtent(LayoutUnit::Max());
algorithm_.emplace(&Style(), line_break_length); algorithm_.emplace(&Style(), line_break_length);
is_horizontal_flow_ = algorithm_->IsHorizontalFlow();
ConstructAndAppendFlexItems(); ConstructAndAppendFlexItems();
......
...@@ -68,12 +68,12 @@ class CORE_EXPORT NGFlexLayoutAlgorithm ...@@ -68,12 +68,12 @@ class CORE_EXPORT NGFlexLayoutAlgorithm
const NGBoxStrut border_padding_; const NGBoxStrut border_padding_;
const NGBoxStrut border_scrollbar_padding_; const NGBoxStrut border_scrollbar_padding_;
const bool is_column_; const bool is_column_;
LogicalSize border_box_size_; const bool is_horizontal_flow_;
LogicalSize content_box_size_;
// These are populated at the top of Layout(), so aren't available in // These are populated at the top of Layout(), so aren't available in
// ComputeMinMaxSize() or anything it calls. // ComputeMinMaxSize() or anything it calls.
LogicalSize border_box_size_;
LogicalSize content_box_size_;
base::Optional<FlexLayoutAlgorithm> algorithm_; base::Optional<FlexLayoutAlgorithm> algorithm_;
bool is_horizontal_flow_;
}; };
} // namespace blink } // namespace blink
......
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