mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 15:10:30 +00:00
commit
25b58e9020
@ -353,11 +353,11 @@ void FocusHub::LostFocusToViewRoot()
|
||||
CHECK_NULL_VOID(curFocusView);
|
||||
auto viewRootScope = curFocusView->GetViewRootScope();
|
||||
CHECK_NULL_VOID(viewRootScope);
|
||||
TAG_LOGI(AceLogTag::ACE_FOCUS, "Lost focus to view root: %{public}s/%{public}d",
|
||||
viewRootScope->GetFrameName().c_str(), viewRootScope->GetFrameId());
|
||||
TAG_LOGI(AceLogTag::ACE_FOCUS, "Lost focus to view root: %{public}s",
|
||||
viewRootScope->GetFrameName().c_str());
|
||||
if (!viewRootScope->IsCurrentFocus()) {
|
||||
TAG_LOGI(AceLogTag::ACE_FOCUS, "View root: %{public}s/%{public}d is not on focusing.",
|
||||
viewRootScope->GetFrameName().c_str(), viewRootScope->GetFrameId());
|
||||
TAG_LOGI(AceLogTag::ACE_FOCUS, "View root: %{public}s is not on focusing.",
|
||||
viewRootScope->GetFrameName().c_str());
|
||||
return;
|
||||
}
|
||||
curFocusView->SetIsViewRootScopeFocused(true);
|
||||
@ -2131,7 +2131,11 @@ bool FocusHub::RequestFocusImmediatelyById(const std::string& id, bool isSyncReq
|
||||
CHECK_NULL_RETURN(focusManager, false);
|
||||
auto focusNode = GetChildFocusNodeById(id);
|
||||
if (!focusNode) {
|
||||
#ifdef IS_RELEASE_VERSION
|
||||
TAG_LOGI(AceLogTag::ACE_FOCUS, "Request focus id can not found.");
|
||||
#else
|
||||
TAG_LOGI(AceLogTag::ACE_FOCUS, "Request focus id: %{public}s can not found.", id.c_str());
|
||||
#endif
|
||||
focusManager->TriggerRequestFocusCallback(RequestFocusResult::NON_EXIST);
|
||||
return false;
|
||||
}
|
||||
@ -2140,9 +2144,15 @@ bool FocusHub::RequestFocusImmediatelyById(const std::string& id, bool isSyncReq
|
||||
(!isSyncRequest && !focusNode->IsFocusable())) {
|
||||
result = false;
|
||||
}
|
||||
#ifdef IS_RELEASE_VERSION
|
||||
TAG_LOGI(AceLogTag::ACE_FOCUS,
|
||||
"Request focus immediately %{public}s by id: %{public}s. The node is %{public}s/%{public}d.",
|
||||
isSyncRequest ? "sync" : "async", id.c_str(), focusNode->GetFrameName().c_str(), focusNode->GetFrameId());
|
||||
#else
|
||||
TAG_LOGI(AceLogTag::ACE_FOCUS,
|
||||
"Request focus immediately %{public}s by id. The node is %{public}s/%{public}d.",
|
||||
isSyncRequest ? "sync" : "async", focusNode->GetFrameName().c_str(), focusNode->GetFrameId());
|
||||
#endif
|
||||
if (result || !isSyncRequest) {
|
||||
pipeline->AddDirtyRequestFocus(focusNode->GetFrameNode());
|
||||
if (isSyncRequest) {
|
||||
|
@ -65,8 +65,8 @@ const RefPtr<TouchEventImpl>& StateStyleManager::GetPressedListener()
|
||||
int32_t sourceType = static_cast<int32_t>(touches.front().GetSourceDevice());
|
||||
if (stateStyleMgr->IsOutOfPressedRegion(sourceType, lastPoint.GetGlobalLocation())) {
|
||||
auto frameNode = stateStyleMgr->GetFrameNode();
|
||||
TAG_LOGI(AceLogTag::ACE_STATE_STYLE, "Move out of node pressed region: %{public}s/%{public}d",
|
||||
frameNode->GetTag().c_str(), frameNode->GetId());
|
||||
TAG_LOGI(AceLogTag::ACE_STATE_STYLE, "Move out of node pressed region: %{public}s",
|
||||
frameNode->GetTag().c_str());
|
||||
stateStyleMgr->pointerId_.erase(lastPoint.GetFingerId());
|
||||
if (stateStyleMgr->pointerId_.size() == 0) {
|
||||
stateStyleMgr->ResetPressedState();
|
||||
@ -81,8 +81,12 @@ const RefPtr<TouchEventImpl>& StateStyleManager::GetPressedListener()
|
||||
|
||||
void StateStyleManager::HandleTouchDown()
|
||||
{
|
||||
#ifdef IS_RELEASE_VERSION
|
||||
TAG_LOGI(AceLogTag::ACE_STATE_STYLE, "Handle TouchDown event node: %{public}s", GetFrameNode()->GetTag().c_str());
|
||||
#else
|
||||
TAG_LOGI(AceLogTag::ACE_STATE_STYLE, "Handle TouchDown event node: %{public}s/%{public}d",
|
||||
GetFrameNode()->GetTag().c_str(), GetFrameNode()->GetId());
|
||||
#endif
|
||||
HandleScrollingParent();
|
||||
if (!hasScrollingParent_) {
|
||||
UpdateCurrentUIState(UI_STATE_PRESSED);
|
||||
@ -98,8 +102,13 @@ void StateStyleManager::HandleTouchDown()
|
||||
|
||||
void StateStyleManager::HandleTouchUp()
|
||||
{
|
||||
#ifdef IS_RELEASE_VERSION
|
||||
TAG_LOGI(AceLogTag::ACE_STATE_STYLE, "Handle TouchUp or Cancel event node: %{public}s",
|
||||
GetFrameNode()->GetTag().c_str());
|
||||
#else
|
||||
TAG_LOGI(AceLogTag::ACE_STATE_STYLE, "Handle TouchUp or Cancel event node: %{public}s/%{public}d",
|
||||
GetFrameNode()->GetTag().c_str(), GetFrameNode()->GetId());
|
||||
#endif
|
||||
if (IsPressedStatePending()) {
|
||||
DeletePressStyleTask();
|
||||
ResetPressedPendingState();
|
||||
@ -120,8 +129,13 @@ void StateStyleManager::FireStateFunc(bool isReset)
|
||||
auto node = GetFrameNode();
|
||||
CHECK_NULL_VOID(node);
|
||||
auto nodeId = node->GetId();
|
||||
#ifdef IS_RELEASE_VERSION
|
||||
TAG_LOGI(AceLogTag::ACE_STATE_STYLE,"Start execution, node is %{public}s, "
|
||||
"reset is %{public}d", node->GetTag().c_str(), isReset);
|
||||
#else
|
||||
TAG_LOGI(AceLogTag::ACE_STATE_STYLE, "Start execution, node is %{public}s/%{public}d, "
|
||||
"reset is %{public}d", node->GetTag().c_str(), nodeId, isReset);
|
||||
#endif
|
||||
RefPtr<CustomNodeBase> customNode;
|
||||
GetCustomNode(customNode, node);
|
||||
if (!customNode) {
|
||||
|
Loading…
Reference in New Issue
Block a user