mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 01:03:08 +00:00
commit
d50d81e5ae
@ -80,10 +80,10 @@ void JSForm::Create(const JSCallbackInfo& info)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
formInfo.id = inputFormId;
|
formInfo.id = inputFormId;
|
||||||
}
|
} else if (id->IsNumber()) {
|
||||||
if (id->IsNumber()) {
|
|
||||||
formInfo.id = id->ToNumber<int64_t>();
|
formInfo.id = id->ToNumber<int64_t>();
|
||||||
}
|
}
|
||||||
|
LOGI("JSForm Create, info.id: %{public}" PRId64, formInfo.id);
|
||||||
formInfo.cardName = name->ToString();
|
formInfo.cardName = name->ToString();
|
||||||
formInfo.bundleName = bundle->ToString();
|
formInfo.bundleName = bundle->ToString();
|
||||||
formInfo.abilityName = ability->ToString();
|
formInfo.abilityName = ability->ToString();
|
||||||
|
@ -126,6 +126,7 @@ void FormManagerDelegate::AddForm(const WeakPtr<PipelineBase>& context, const Re
|
|||||||
SetParamForWant(info, formInfo);
|
SetParamForWant(info, formInfo);
|
||||||
OHOS::AppExecFwk::FormJsInfo formJsInfo;
|
OHOS::AppExecFwk::FormJsInfo formJsInfo;
|
||||||
auto clientInstance = OHOS::AppExecFwk::FormHostClient::GetInstance();
|
auto clientInstance = OHOS::AppExecFwk::FormHostClient::GetInstance();
|
||||||
|
TAG_LOGI(AceLogTag::ACE_FORM, "Before FormMgr adding form, info.id: %{public}" PRId64, info.id);
|
||||||
auto ret = OHOS::AppExecFwk::FormMgr::GetInstance().AddForm(info.id, wantCache_, clientInstance, formJsInfo);
|
auto ret = OHOS::AppExecFwk::FormMgr::GetInstance().AddForm(info.id, wantCache_, clientInstance, formJsInfo);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
auto errorMsg = OHOS::AppExecFwk::FormMgr::GetInstance().GetErrorMessage(ret);
|
auto errorMsg = OHOS::AppExecFwk::FormMgr::GetInstance().GetErrorMessage(ret);
|
||||||
@ -956,7 +957,7 @@ void FormManagerDelegate::ProcessFormUpdate(const AppExecFwk::FormJsInfo& formJs
|
|||||||
|
|
||||||
void FormManagerDelegate::ReleaseRenderer()
|
void FormManagerDelegate::ReleaseRenderer()
|
||||||
{
|
{
|
||||||
TAG_LOGI(AceLogTag::ACE_FORM, "FormManagerDelegate releaseForm. formId: %{public}" PRId64 ", %{public}s",
|
TAG_LOGI(AceLogTag::ACE_FORM, "FormManagerDelegate releaseRenderer. formId: %{public}" PRId64 ", %{public}s",
|
||||||
runningCardId_, runningCompId_.c_str());
|
runningCardId_, runningCompId_.c_str());
|
||||||
if (runningCardId_ <= 0) {
|
if (runningCardId_ <= 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -138,6 +138,7 @@ void FormPattern::OnAttachToFrameNode()
|
|||||||
auto uiTaskExecutor =
|
auto uiTaskExecutor =
|
||||||
SingleTaskExecutor::Make(context->GetTaskExecutor(), TaskExecutor::TaskType::UI);
|
SingleTaskExecutor::Make(context->GetTaskExecutor(), TaskExecutor::TaskType::UI);
|
||||||
auto id = subContainer->GetRunningCardId();
|
auto id = subContainer->GetRunningCardId();
|
||||||
|
TAG_LOGI(AceLogTag::ACE_FORM, "FormPattern::OnAttachToFrameNode, cardId: %{public}" PRId64, id);
|
||||||
FormManager::GetInstance().AddSubContainer(id, subContainer);
|
FormManager::GetInstance().AddSubContainer(id, subContainer);
|
||||||
uiTaskExecutor.PostDelayedTask(
|
uiTaskExecutor.PostDelayedTask(
|
||||||
[id, nodeId = subContainer->GetNodeId()] {
|
[id, nodeId = subContainer->GetNodeId()] {
|
||||||
@ -608,6 +609,7 @@ void FormPattern::OnModifyDone()
|
|||||||
}
|
}
|
||||||
// Convert DimensionUnit to DimensionUnit::PX
|
// Convert DimensionUnit to DimensionUnit::PX
|
||||||
auto info = layoutProperty->GetRequestFormInfo().value_or(RequestFormInfo());
|
auto info = layoutProperty->GetRequestFormInfo().value_or(RequestFormInfo());
|
||||||
|
TAG_LOGI(AceLogTag::ACE_FORM, "FormPattern::OnModifyDone, info.id: %{public}" PRId64, info.id);
|
||||||
info.width = Dimension(width.ConvertToPx());
|
info.width = Dimension(width.ConvertToPx());
|
||||||
info.height = Dimension(height.ConvertToPx());
|
info.height = Dimension(height.ConvertToPx());
|
||||||
auto &&borderWidthProperty = layoutProperty->GetBorderWidthProperty();
|
auto &&borderWidthProperty = layoutProperty->GetBorderWidthProperty();
|
||||||
|
Loading…
Reference in New Issue
Block a user