From 5c3dae62b9218dbd2493ff6390db062013ca4bdc Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 29 Jun 2020 00:31:21 +0800 Subject: ... --- src/ui/render/FlexLayoutRenderObject.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/ui/render/FlexLayoutRenderObject.cpp') diff --git a/src/ui/render/FlexLayoutRenderObject.cpp b/src/ui/render/FlexLayoutRenderObject.cpp index 9e5139ff..8e6b41fe 100644 --- a/src/ui/render/FlexLayoutRenderObject.cpp +++ b/src/ui/render/FlexLayoutRenderObject.cpp @@ -87,7 +87,8 @@ template & children, - const std::vector& layout_data) { + const std::vector& layout_data, + std::string_view log_tag) { Expects(children.size() == layout_data.size()); direction_tag_t direction_tag; @@ -109,9 +110,9 @@ Size FlexLayoutMeasureContentImpl( child_cross_measure_requirement.push_back( StackLayoutCalculateChildMaxLength( preferred_cross_length, max_cross_length, - GetCross(child->GetMinSize(), direction_tag), - "StackLayoutRenderObject: Child's min cross size is bigger than " - "parent's max cross size.")); + GetCross(child->GetMinSize(), direction_tag), log_tag, + "(Measure) Child's min cross size is bigger than parent's max " + "cross size.")); } // step 1. @@ -312,9 +313,9 @@ Size FlexLayoutMeasureContentImpl( if (max_main_length.IsSpecified() && total_length > max_main_length.GetLengthOrUndefined()) { - log::Warn( - "FlexLayoutRenderObject: Children's main axis length exceeds required " - "max length."); + log::TagWarn( + log_tag, + "(Measure) Children's main axis length exceeds required max length."); total_length = max_main_length.GetLengthOrUndefined(); } else if (min_main_length.IsSpecified() && total_length < min_main_length.GetLengthOrUndefined()) { @@ -336,10 +337,12 @@ Size FlexLayoutRenderObject::OnMeasureContent( direction_ == FlexDirection::HorizontalReverse); if (horizontal) { return FlexLayoutMeasureContentImpl( - requirement, preferred_size, GetChildren(), GetChildLayoutDataList()); + requirement, preferred_size, GetChildren(), GetChildLayoutDataList(), + log_tag); } else { return FlexLayoutMeasureContentImpl( - requirement, preferred_size, GetChildren(), GetChildLayoutDataList()); + requirement, preferred_size, GetChildren(), GetChildLayoutDataList(), + log_tag); } } -- cgit v1.2.3