mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-12-11 10:01:58 +00:00
FormComponent对异常size做拦截
Signed-off-by: s00800643 <shuxinyue1@huawei.com>
This commit is contained in:
parent
55ff2106b2
commit
8485f93f98
@ -608,6 +608,12 @@ bool FormPattern::OnDirtyLayoutWrapperSwap(const RefPtr<LayoutWrapper>& dirty, c
|
||||
auto info = layoutProperty->GetRequestFormInfo().value_or(RequestFormInfo());
|
||||
info.width = Dimension(size.Width());
|
||||
info.height = Dimension(size.Height());
|
||||
if (std::isinf(info.width.Value()) || std::isnan(info.width.Value()) || std::isinf(info.height.Value())
|
||||
|| std::isnan(info.height.Value())) {
|
||||
TAG_LOGE(AceLogTag::ACE_FORM, "size invalid, width:%{public}f height:%{public}f",
|
||||
info.width.Value(), info.height.Value());
|
||||
return false;
|
||||
}
|
||||
auto &&borderWidthProperty = layoutProperty->GetBorderWidthProperty();
|
||||
float borderWidth = 0.0f;
|
||||
if (borderWidthProperty && borderWidthProperty->topDimen) {
|
||||
|
Loading…
Reference in New Issue
Block a user