!38285 使FocusToHeadOrTailChild的访问权限为public

Merge pull request !38285 from Far/parallel
This commit is contained in:
openharmony_ci 2024-07-21 06:38:41 +00:00 committed by Gitee
commit 6e42219be5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 7 additions and 4 deletions

View File

@ -1053,6 +1053,7 @@ public:
static void ToJsonValue(
const RefPtr<FocusHub>& hub, std::unique_ptr<JsonValue>& json, const InspectorFilter& filter);
bool FocusToHeadOrTailChild(bool isHead);
protected:
bool OnKeyEvent(const KeyEvent& keyEvent);
bool OnKeyEventNode(const KeyEvent& keyEvent);
@ -1069,7 +1070,6 @@ protected:
bool CalculateRect(const RefPtr<FocusHub>& childNode, RectF& rect) const;
bool RequestNextFocus(FocusStep moveStep, const RectF& rect);
bool FocusToHeadOrTailChild(bool isHead);
void OnFocus();
void OnFocusNode();

View File

@ -493,7 +493,7 @@ void StageManager::FirePageHide(const RefPtr<UINode>& node, PageTransitionType t
context->MarkNeedFlushMouseEvent();
}
void StageManager::FirePageShow(const RefPtr<UINode>& node, PageTransitionType transitionType)
void StageManager::FirePageShow(const RefPtr<UINode>& node, PageTransitionType transitionType, bool needFocus)
{
auto pageNode = DynamicCast<FrameNode>(node);
CHECK_NULL_VOID(pageNode);
@ -501,7 +501,9 @@ void StageManager::FirePageShow(const RefPtr<UINode>& node, PageTransitionType t
auto pagePattern = pageNode->GetPattern<PagePattern>();
CHECK_NULL_VOID(pagePattern);
pagePattern->FocusViewShow();
if (needFocus) {
pagePattern->FocusViewShow();
}
pagePattern->OnShow();
// With or without a page transition, we need to make the coming page visible first
pagePattern->ProcessShowState();

View File

@ -51,7 +51,8 @@ public:
void PageChangeCloseKeyboard();
static void FirePageHide(const RefPtr<UINode>& node, PageTransitionType transitionType = PageTransitionType::NONE);
static void FirePageShow(const RefPtr<UINode>& node, PageTransitionType transitionType = PageTransitionType::NONE);
static void FirePageShow(const RefPtr<UINode>& node, PageTransitionType transitionType = PageTransitionType::NONE,
bool needFocus = true);
virtual RefPtr<FrameNode> GetLastPage() const;
RefPtr<FrameNode> GetPageById(int32_t pageId);