!41847 修复ImageSpan的capi错误和无障碍下显示密码时不播报密码

Merge pull request !41847 from guan0/master
This commit is contained in:
openharmony_ci 2024-08-29 10:18:37 +00:00 committed by Gitee
commit 81ad65ba0f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 12 additions and 11 deletions

View File

@ -34,7 +34,11 @@ bool TextFieldAccessibilityProperty::IsPassword() const
CHECK_NULL_RETURN(frameNode, false);
auto textFieldPattern = frameNode->GetPattern<TextFieldPattern>();
CHECK_NULL_RETURN(textFieldPattern, false);
return textFieldPattern->IsInPasswordMode();
CHECK_NULL_RETURN(textFieldPattern->IsInPasswordMode(), false);
auto responseArea = textFieldPattern->GetResponseArea();
auto passwordArea = AceType::DynamicCast<PasswordResponseArea>(responseArea);
CHECK_NULL_RETURN(passwordArea, false);
return passwordArea->IsObscured();
}
AceTextCategory TextFieldAccessibilityProperty::GetTextInputType() const

View File

@ -748,11 +748,7 @@ void SetBorderRadius(ArkUINodeHandle node, const ArkUI_Float32* values, const Ar
borderRadius.radiusBottomLeft = Dimension(values[NUM_2], static_cast<OHOS::Ace::DimensionUnit>(units[NUM_2]));
borderRadius.radiusBottomRight = Dimension(values[NUM_3], static_cast<OHOS::Ace::DimensionUnit>(units[NUM_3]));
borderRadius.multiValued = true;
if (frameNode->GetTag() == V2::IMAGE_SPAN_ETS_TAG) {
ImageSpanView::SetBorderRadius(frameNode, borderRadius);
} else {
ViewAbstract::SetBorderRadius(frameNode, borderRadius);
}
ViewAbstract::SetBorderRadius(frameNode, borderRadius);
}
void ResetBorderRadius(ArkUINodeHandle node)
@ -760,11 +756,7 @@ void ResetBorderRadius(ArkUINodeHandle node)
auto* frameNode = reinterpret_cast<FrameNode*>(node);
CHECK_NULL_VOID(frameNode);
OHOS::Ace::CalcDimension reset;
if (frameNode->GetTag() == V2::IMAGE_SPAN_ETS_TAG) {
ImageSpanView::ResetBorderRadius(frameNode);
} else {
ViewAbstract::SetBorderRadius(frameNode, reset);
}
ViewAbstract::SetBorderRadius(frameNode, reset);
}
/**

View File

@ -1525,6 +1525,9 @@ int32_t SetBorderRadius(ArkUI_NodeHandle node, const ArkUI_AttributeItem* item)
} else if (node->type == ARKUI_NODE_TEXT_INPUT || node->type == ARKUI_NODE_TEXT_AREA) {
fullImpl->getNodeModifiers()->getTextAreaModifier()->setTextAreaBorderRadius(
node->uiNodeHandle, radiusVals, radiusUnits, ALLOW_SIZE_4);
} else if (node->type == ARKUI_NODE_IMAGE_SPAN) {
fullImpl->getNodeModifiers()->getImageSpanModifier()->setImageSpanBorderRadius(
node->uiNodeHandle, radiusVals, radiusUnits, ALLOW_SIZE_4);
} else {
fullImpl->getNodeModifiers()->getCommonModifier()->setBorderRadius(
node->uiNodeHandle, radiusVals, radiusUnits, ALLOW_SIZE_4);
@ -1539,6 +1542,8 @@ void ResetBorderRadius(ArkUI_NodeHandle node)
fullImpl->getNodeModifiers()->getImageModifier()->resetImageBorderRadius(node->uiNodeHandle);
} else if (node->type == ARKUI_NODE_TEXT_INPUT || node->type == ARKUI_NODE_TEXT_AREA) {
fullImpl->getNodeModifiers()->getTextAreaModifier()->resetTextAreaBorderRadius(node->uiNodeHandle);
} else if (node->type == ARKUI_NODE_IMAGE_SPAN) {
fullImpl->getNodeModifiers()->getImageSpanModifier()->resetImageSpanBorderRadius(node->uiNodeHandle);
} else {
fullImpl->getNodeModifiers()->getCommonModifier()->resetBorderRadius(node->uiNodeHandle);
}