mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-10-07 00:13:44 +00:00
!44162 fix appfreeze when menu use onMeasureSize
Merge pull request !44162 from 0xjackmed/cherry-pick-1726915478
This commit is contained in:
commit
3f6645d5ff
@ -728,6 +728,10 @@ uint32_t MenuPattern::GetInnerMenuCount() const
|
||||
// found component <Menu>
|
||||
if (child->GetTag() == V2::JS_VIEW_ETS_TAG) {
|
||||
child = child->GetFrameChildByIndex(0, false);
|
||||
if (child && child->GetTag() == V2::JS_VIEW_ETS_TAG) {
|
||||
child = child->GetChildAtIndex(0);
|
||||
++depth;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (child->GetTag() == V2::MENU_ETS_TAG) {
|
||||
@ -755,6 +759,10 @@ RefPtr<FrameNode> MenuPattern::GetFirstInnerMenu() const
|
||||
// found component <Menu>
|
||||
if (child->GetTag() == V2::JS_VIEW_ETS_TAG) {
|
||||
child = child->GetFrameChildByIndex(0, false);
|
||||
if (child && child->GetTag() == V2::JS_VIEW_ETS_TAG) {
|
||||
child = child->GetChildAtIndex(0);
|
||||
++depth;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (child->GetTag() == V2::MENU_ETS_TAG) {
|
||||
|
@ -675,6 +675,7 @@ RefPtr<FrameNode> MenuWrapperPattern::GetMenuChild(const RefPtr<UINode>& node)
|
||||
while (child) {
|
||||
if (child->GetTag() == V2::JS_VIEW_ETS_TAG) {
|
||||
auto customNode = DynamicCast<CustomNode>(child);
|
||||
CHECK_NULL_RETURN(customNode, nullptr);
|
||||
customNode->Render();
|
||||
} else if (child->GetTag() == V2::MENU_ETS_TAG) {
|
||||
menuChild = DynamicCast<FrameNode>(child);
|
||||
|
Loading…
Reference in New Issue
Block a user