Skip to content

Commit

Permalink
[FlexNG] Update comment and make a member const
Browse files Browse the repository at this point in the history
Just code health, no behavior change.

Bug: 845235
Change-Id: I1202f1c37751537e8112c33f3b1228647407b6dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1895748
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: David Grogan <dgrogan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712021}
  • Loading branch information
davidsgrogan authored and Commit Bot committed Nov 3, 2019
1 parent 968d429 commit efd814d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ NGFlexLayoutAlgorithm::NGFlexLayoutAlgorithm(
params.fragment_geometry.padding),
border_scrollbar_padding_(border_padding_ +
params.fragment_geometry.scrollbar),
is_column_(Style().ResolvedIsColumnFlexDirection()) {
is_column_(Style().ResolvedIsColumnFlexDirection()),
is_horizontal_flow_(FlexLayoutAlgorithm::IsHorizontalFlow(Style())) {
container_builder_.SetIsNewFormattingContext(
params.space.IsNewFormattingContext());
container_builder_.SetInitialFragmentGeometry(params.fragment_geometry);
Expand Down Expand Up @@ -498,7 +499,6 @@ scoped_refptr<const NGLayoutResult> NGFlexLayoutAlgorithm::Layout() {

const LayoutUnit line_break_length = MainAxisContentExtent(LayoutUnit::Max());
algorithm_.emplace(&Style(), line_break_length);
is_horizontal_flow_ = algorithm_->IsHorizontalFlow();

ConstructAndAppendFlexItems();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ class CORE_EXPORT NGFlexLayoutAlgorithm
const NGBoxStrut border_padding_;
const NGBoxStrut border_scrollbar_padding_;
const bool is_column_;
LogicalSize border_box_size_;
LogicalSize content_box_size_;
const bool is_horizontal_flow_;
// These are populated at the top of Layout(), so aren't available in
// ComputeMinMaxSize() or anything it calls.
LogicalSize border_box_size_;
LogicalSize content_box_size_;
base::Optional<FlexLayoutAlgorithm> algorithm_;
bool is_horizontal_flow_;
};

} // namespace blink
Expand Down

0 comments on commit efd814d

Please sign in to comment.