mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
fix arkui-x build failed
Signed-off-by: txzhang94 <zhangtianxiang4@huawei.com> Change-Id: I11ae2bdeb026c3646f5f02dafd2211cf672a9a23
This commit is contained in:
parent
7f2e967e8d
commit
20fc3f7ad8
@ -226,7 +226,7 @@ if (defined(global_parts_info.multimedia_camera_framework)) {
|
||||
enable_camera_framework = false
|
||||
}
|
||||
|
||||
if (defined(global_parts_info.multimedia_player_framework)) {
|
||||
if (defined(global_parts_info.multimedia_player_framework) || is_arkui_x) {
|
||||
enable_player_framework = true
|
||||
ace_common_defines += [ "PLAYER_FRAMEWORK_EXISTS" ]
|
||||
} else {
|
||||
|
@ -402,10 +402,10 @@ void UpdateAccessibilityNodeInfo(const RefPtr<AccessibilityNode>& node, Accessib
|
||||
nodeInfo.AddAction(action);
|
||||
}
|
||||
|
||||
if (node->GetImportantForAccessibility() == NG::AccessibilityProperty::Level::YES) {
|
||||
if (node->GetImportantForAccessibility() == NG::AccessibilityProperty::Level::YES_STR) {
|
||||
actions.emplace_back(ActionType::ACCESSIBILITY_ACTION_FOCUS);
|
||||
nodeInfo.SetCheckable(true);
|
||||
} else if (node->GetImportantForAccessibility() == NG::AccessibilityProperty::Level::NO ||
|
||||
} else if (node->GetImportantForAccessibility() == NG::AccessibilityProperty::Level::NO_STR ||
|
||||
node->GetImportantForAccessibility() == NG::AccessibilityProperty::Level::NO_HIDE_DESCENDANTS) {
|
||||
nodeInfo.SetVisible(false);
|
||||
}
|
||||
@ -1643,7 +1643,7 @@ bool CanAccessibilityFocusedNG(const RefPtr<NG::FrameNode>& node)
|
||||
auto level = accessibilityProperty->GetAccessibilityLevel();
|
||||
return !node->IsRootNode() &&
|
||||
node->GetLayoutProperty()->GetVisibilityValue(VisibleType::VISIBLE) == VisibleType::VISIBLE &&
|
||||
level != NG::AccessibilityProperty::Level::NO &&
|
||||
level != NG::AccessibilityProperty::Level::NO_STR &&
|
||||
level != NG::AccessibilityProperty::Level::NO_HIDE_DESCENDANTS;
|
||||
}
|
||||
// focus move search
|
||||
|
@ -110,8 +110,9 @@ config("lto_link_config") {
|
||||
|
||||
ohos_shared_library("libace_compatible") {
|
||||
public_configs = [ ":ace_engine_public_config" ]
|
||||
external_deps = []
|
||||
if (use_hilog) {
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps += [ "hilog:libhilog" ]
|
||||
}
|
||||
if (is_ohos) {
|
||||
sanitize = {
|
||||
@ -141,8 +142,9 @@ ohos_shared_library("libace_compatible") {
|
||||
|
||||
if (!is_asan) {
|
||||
ohos_shared_library("libace") {
|
||||
external_deps = []
|
||||
if (use_hilog) {
|
||||
external_deps = [ "hilog:libhilog" ]
|
||||
external_deps += [ "hilog:libhilog" ]
|
||||
}
|
||||
if (is_ohos) {
|
||||
sanitize = {
|
||||
|
@ -58,6 +58,12 @@ template("declarative_frontend") {
|
||||
}
|
||||
|
||||
deps = [ "$ace_root/frameworks/core/components/theme:build_theme_code" ]
|
||||
if (is_arkui_x) {
|
||||
deps += [
|
||||
"//arkcompiler/ets_runtime:libark_jsruntime_static",
|
||||
"//foundation/arkui/napi:ace_napi",
|
||||
]
|
||||
}
|
||||
external_deps = [
|
||||
"ets_runtime:libark_jsruntime",
|
||||
"napi:ace_napi",
|
||||
@ -1043,7 +1049,10 @@ template("declarative_js_engine_ng") {
|
||||
"jsview/menu/js_context_menu.cpp",
|
||||
]
|
||||
configs += [ "$ark_ets_path:ark_jsruntime_public_config" ]
|
||||
deps += [ "$ark_ets_path:libark_jsruntime_static" ]
|
||||
deps += [
|
||||
"$ark_ets_path:libark_jsruntime_static",
|
||||
"//foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing:drawing_napi_impl",
|
||||
]
|
||||
if (defined(config.pixel_map_support) && config.pixel_map_support) {
|
||||
configs += [ "//foundation/multimedia/image_framework/interfaces/innerkits:image_external_config" ]
|
||||
}
|
||||
|
@ -288,6 +288,9 @@ template("declarative_js_engine_ark") {
|
||||
]
|
||||
|
||||
deps = [ "${ace_root}/frameworks/core/interfaces/native:ace_core_interfaces_native_node_$platform" ]
|
||||
if (is_arkui_x) {
|
||||
deps += [ "//foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing:drawing_napi_impl" ]
|
||||
}
|
||||
external_deps = [ "graphic_2d:drawing_napi_impl" ]
|
||||
if (use_hilog) {
|
||||
external_deps += [ "hilog:libhilog" ]
|
||||
|
@ -25,7 +25,11 @@
|
||||
#include "base/memory/ace_type.h"
|
||||
#include "base/memory/referenced.h"
|
||||
#include "base/utils/utils.h"
|
||||
#if !defined(ANDROID_PLATFORM) && !defined(IOS_PLATFORM)
|
||||
#include "base/web/webview/ohos_nweb/include/nweb.h"
|
||||
#else
|
||||
#include "base/web/webview/ohos_interface/include/ohos_nweb/nweb.h"
|
||||
#endif
|
||||
#include "bridge/common/utils/engine_helper.h"
|
||||
#include "bridge/declarative_frontend/engine/functions/js_click_function.h"
|
||||
#include "bridge/declarative_frontend/engine/functions/js_drag_function.h"
|
||||
|
@ -102,8 +102,8 @@ void ArkJSRuntime::Reset()
|
||||
if (vm_ != nullptr) {
|
||||
if (!usingExistVM_) {
|
||||
#if !defined(PREVIEW)
|
||||
HdcRegister::Get().StopHdcRegister(instanceId_);
|
||||
#if !defined(ANDROID_PLATFORM) && !defined(IOS_PLATFORM)
|
||||
HdcRegister::Get().StopHdcRegister(instanceId_);
|
||||
ConnectServerManager::Get().RemoveInstance(instanceId_);
|
||||
#endif
|
||||
JSNApi::StopDebugger(vm_);
|
||||
@ -122,7 +122,7 @@ void ArkJSRuntime::SetLogPrint(LOG_PRINT out)
|
||||
print_ = out;
|
||||
}
|
||||
|
||||
#if !defined(PREVIEW)
|
||||
#if !defined(PREVIEW) && !defined(ANDROID_PLATFORM) && !defined(IOS_PLATFORM)
|
||||
static int ParseHdcRegisterOption(std::string& option)
|
||||
{
|
||||
LOGI("hdc option is %{public}s ", option.c_str());
|
||||
@ -157,6 +157,7 @@ bool ArkJSRuntime::StartDebugger()
|
||||
#if !defined(PREVIEW)
|
||||
if (!libPath_.empty()) {
|
||||
bool isDebugApp = AceApplicationInfo::GetInstance().IsDebugVersion();
|
||||
#if !defined(ANDROID_PLATFORM) && !defined(IOS_PLATFORM)
|
||||
auto callback = [instanceId = instanceId_,
|
||||
weak = weak_from_this(), isDebugApp](int socketFd, std::string option) {
|
||||
LOGI("HdcRegister callback socket %{public}d, option %{public}s.", socketFd, option.c_str());
|
||||
@ -177,6 +178,7 @@ bool ArkJSRuntime::StartDebugger()
|
||||
|
||||
HdcRegister::Get().StartHdcRegister(instanceId_, callback);
|
||||
ConnectServerManager::Get().SetDebugMode();
|
||||
#endif
|
||||
JSNApi::DebugOption debugOption = { libPath_.c_str(), isDebugApp ? isDebugMode_ : false };
|
||||
#if !defined(ANDROID_PLATFORM) && !defined(IOS_PLATFORM)
|
||||
ConnectServerManager::Get().AddInstance(gettid(), language_);
|
||||
|
@ -116,11 +116,11 @@ template("build_component_ng") {
|
||||
"//foundation/graphic/graphic_2d/rosen/modules/2d_engine/rosen_text/export",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
deps += [ "//third_party/skia:skia_canvaskit_static" ]
|
||||
deps += [
|
||||
"//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client_static",
|
||||
"//third_party/skia:skia_canvaskit_static",
|
||||
]
|
||||
defines += [ "CROSS_PLATFORM" ]
|
||||
if (ace_enable_gpu) {
|
||||
defines += [ "ACE_ENABLE_GPU" ]
|
||||
}
|
||||
}
|
||||
if (!is_arkui_x && defined(config.enable_drag_framework) &&
|
||||
config.enable_drag_framework) {
|
||||
|
@ -53,7 +53,11 @@
|
||||
#include "core/pipeline_ng/pipeline_context.h"
|
||||
|
||||
#ifdef WEB_SUPPORTED
|
||||
#if !defined(ANDROID_PLATFORM) && !defined(IOS_PLATFORM)
|
||||
#include "core/components_ng/pattern/web/web_pattern.h"
|
||||
#else
|
||||
#include "core/components_ng/pattern/web/cross_platform/web_pattern.h"
|
||||
#endif
|
||||
#endif // WEB_SUPPORTED
|
||||
|
||||
namespace OHOS::Ace::NG {
|
||||
|
@ -59,7 +59,11 @@
|
||||
#include "core/common/udmf/udmf_client.h"
|
||||
#include "core/components_ng/render/adapter/component_snapshot.h"
|
||||
#ifdef WEB_SUPPORTED
|
||||
#if !defined(ANDROID_PLATFORM) && !defined(IOS_PLATFORM)
|
||||
#include "core/components_ng/pattern/web/web_pattern.h"
|
||||
#else
|
||||
#include "core/components_ng/pattern/web/cross_platform/web_pattern.h"
|
||||
#endif
|
||||
#endif
|
||||
namespace OHOS::Ace::NG {
|
||||
namespace {
|
||||
|
@ -22,7 +22,11 @@
|
||||
#include "core/pipeline_ng/pipeline_context.h"
|
||||
|
||||
#ifdef WEB_SUPPORTED
|
||||
#if !defined(ANDROID_PLATFORM) && !defined(IOS_PLATFORM)
|
||||
#include "core/components_ng/pattern/web/web_pattern.h"
|
||||
#else
|
||||
#include "core/components_ng/pattern/web/cross_platform/web_pattern.h"
|
||||
#endif
|
||||
#endif
|
||||
namespace OHOS::Ace::NG {
|
||||
|
||||
|
@ -586,9 +586,6 @@ build_component_ng("pattern_ng") {
|
||||
external_deps += [ "window_manager:scene_session" ]
|
||||
}
|
||||
} else if (is_arkui_x) {
|
||||
deps += [
|
||||
"$ace_graphic/rosen/modules/render_service_client:librender_service_client_static",
|
||||
"//plugins/libs/napi:napi_$platform",
|
||||
]
|
||||
deps += [ "$ace_graphic/rosen/modules/render_service_client:librender_service_client_static" ]
|
||||
}
|
||||
}
|
||||
|
@ -440,7 +440,7 @@ RefPtr<FrameNode> CalendarMonthPattern::AddButtonNodeIntoVirtual(const CalendarD
|
||||
auto calendar = weak.Upgrade();
|
||||
CHECK_NULL_VOID(calendar);
|
||||
if (calendar->isOnHover_) {
|
||||
calendar->SetCalendarAccessibilityLevel(AccessibilityProperty::Level::NO);
|
||||
calendar->SetCalendarAccessibilityLevel(AccessibilityProperty::Level::NO_STR);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -512,7 +512,7 @@ void CalendarMonthPattern::HandleAccessibilityHoverEvent(bool isHover, Accessibi
|
||||
isOnHover_ = true;
|
||||
} else if (!isHover) {
|
||||
isOnHover_ = false;
|
||||
SetCalendarAccessibilityLevel(AccessibilityProperty::Level::YES);
|
||||
SetCalendarAccessibilityLevel(AccessibilityProperty::Level::YES_STR);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -525,7 +525,7 @@ void NavigationTitleUtil::InitDragAndLongPressEvent(
|
||||
InitLongPressEvent(gestureHub, menuNode, menuItems);
|
||||
auto accessibilityProperty = menuNode->GetAccessibilityProperty<NG::AccessibilityProperty>();
|
||||
CHECK_NULL_VOID(accessibilityProperty);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO_STR);
|
||||
}
|
||||
|
||||
RefPtr<FrameNode> NavigationTitleUtil::CreatePopupDialogNode(
|
||||
|
@ -73,7 +73,7 @@ void NavToolbarPattern::OnModifyDone()
|
||||
InitDragEvent(gestureHub);
|
||||
auto accessibilityProperty = containerNode->GetAccessibilityProperty<NG::AccessibilityProperty>();
|
||||
CHECK_NULL_VOID(accessibilityProperty);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO_STR);
|
||||
}
|
||||
|
||||
void NavToolbarPattern::InitLongPressEvent(const RefPtr<GestureEventHub>& gestureHub)
|
||||
|
@ -327,7 +327,7 @@ void NavDestinationPattern::InitBackButtonLongPressEvent(RefPtr<NavDestinationGr
|
||||
|
||||
auto accessibilityProperty = backButtonNode->GetAccessibilityProperty<NG::AccessibilityProperty>();
|
||||
CHECK_NULL_VOID(accessibilityProperty);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO_STR);
|
||||
}
|
||||
|
||||
void NavDestinationPattern::HandleLongPress()
|
||||
|
@ -95,7 +95,11 @@
|
||||
#include "core/pipeline/pipeline_base.h"
|
||||
#include "core/pipeline/pipeline_context.h"
|
||||
#ifdef WEB_SUPPORTED
|
||||
#if !defined(ANDROID_PLATFORM) && !defined(IOS_PLATFORM)
|
||||
#include "core/components_ng/pattern/web/web_pattern.h"
|
||||
#else
|
||||
#include "core/components_ng/pattern/web/cross_platform/web_pattern.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace OHOS::Ace::NG {
|
||||
|
@ -126,7 +126,7 @@ void PatternLockPattern::HandleAccessibilityHoverEvent(bool isHover, Accessibili
|
||||
if (isHover && (accessibilityHoverAction == AccessibilityHoverAction::HOVER_ENTER ||
|
||||
accessibilityHoverAction == AccessibilityHoverAction::HOVER_MOVE)) {
|
||||
for (const auto& accessibilityProperty : accessibilityPropertyVec_) {
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::YES);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::YES_STR);
|
||||
}
|
||||
if (!CheckAutoReset()) {
|
||||
return;
|
||||
@ -134,12 +134,12 @@ void PatternLockPattern::HandleAccessibilityHoverEvent(bool isHover, Accessibili
|
||||
HandleReset();
|
||||
} else if (!isHover) {
|
||||
for (const auto& accessibilityProperty : accessibilityPropertyVec_) {
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO_STR);
|
||||
}
|
||||
AddPointEnd();
|
||||
auto host = GetHost();
|
||||
auto accessibilityProperty = host->GetAccessibilityProperty<AccessibilityProperty>();
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::YES);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::YES_STR);
|
||||
}
|
||||
}
|
||||
|
||||
@ -203,7 +203,7 @@ void PatternLockPattern::HandleTextOnAccessibilityFocusCallback(int32_t x, int32
|
||||
StartModifierConnectedAnimate(x, y);
|
||||
auto host = GetHost();
|
||||
auto accessibilityProperty = host->GetAccessibilityProperty<AccessibilityProperty>();
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO_STR);
|
||||
host->MarkDirtyNode(PROPERTY_UPDATE_RENDER);
|
||||
}
|
||||
}
|
||||
|
@ -115,16 +115,16 @@ void SliderPattern::HandleAccessibilityHoverEvent(bool isHover, const Accessibil
|
||||
accessibilityHoverAction == AccessibilityHoverAction::HOVER_MOVE)) {
|
||||
for (const auto& pointNode : pointAccessibilityNodeVec_) {
|
||||
pointNode->GetAccessibilityProperty<AccessibilityProperty>()->SetAccessibilityLevel(
|
||||
AccessibilityProperty::Level::YES);
|
||||
AccessibilityProperty::Level::YES_STR);
|
||||
}
|
||||
} else if (!isHover) {
|
||||
for (const auto& pointNode : pointAccessibilityNodeVec_) {
|
||||
pointNode->GetAccessibilityProperty<AccessibilityProperty>()->SetAccessibilityLevel(
|
||||
AccessibilityProperty::Level::NO);
|
||||
AccessibilityProperty::Level::NO_STR);
|
||||
}
|
||||
auto host = GetHost();
|
||||
auto accessibilityProperty = host->GetAccessibilityProperty<AccessibilityProperty>();
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::YES);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::YES_STR);
|
||||
}
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ void SliderPattern::HandleTextOnAccessibilityFocusCallback()
|
||||
auto host = GetHost();
|
||||
CHECK_NULL_VOID(host);
|
||||
auto accessibilityProperty = host->GetAccessibilityProperty<AccessibilityProperty>();
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO_STR);
|
||||
host->MarkDirtyNode(PROPERTY_UPDATE_RENDER);
|
||||
}
|
||||
|
||||
@ -306,7 +306,7 @@ void SliderPattern::UpdateStepPointsAccessibilityVirtualNodeSelected()
|
||||
for (uint32_t i = 0; i < pointCount; i++) {
|
||||
RefPtr<FrameNode>& pointNode = pointAccessibilityNodeVec_[i];
|
||||
auto pointAccessibilityProperty = pointNode->GetAccessibilityProperty<TextAccessibilityProperty>();
|
||||
pointAccessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::YES);
|
||||
pointAccessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::YES_STR);
|
||||
|
||||
auto pointNodeProperty = pointNode->GetLayoutProperty<TextLayoutProperty>();
|
||||
CHECK_NULL_VOID(pointNodeProperty);
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
|
||||
std::string GetAccessibilityLevel() const override
|
||||
{
|
||||
return Level::NO;
|
||||
return Level::NO_STR;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -1068,8 +1068,10 @@ void XComponentPattern::HandleTouchEvent(const TouchEventInfo& info)
|
||||
}
|
||||
#endif
|
||||
#ifdef PLATFORM_VIEW_SUPPORTED
|
||||
const auto& changedPoint = touchInfoList.front();
|
||||
PlatformViewDispatchTouchEvent(changedPoint);
|
||||
if (type_ == XComponentType::PLATFORM_VIEW) {
|
||||
const auto& changedPoint = touchInfoList.front();
|
||||
PlatformViewDispatchTouchEvent(changedPoint);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ void AccessibilityProperty::GetGroupTextRecursive(bool forceGetChildren, std::st
|
||||
return;
|
||||
}
|
||||
auto level = GetAccessibilityLevel();
|
||||
if (level == Level::AUTO || level == Level::YES) {
|
||||
if (level == Level::AUTO || level == Level::YES_STR) {
|
||||
auto nodeText = GetText();
|
||||
if (!text.empty() && !nodeText.empty()) {
|
||||
text += ", ";
|
||||
@ -302,14 +302,14 @@ std::tuple<bool, bool, bool> AccessibilityProperty::GetSearchStrategy(const RefP
|
||||
level = accessibilityProperty->GetAccessibilityLevel();
|
||||
currentGroupFlag = accessibilityProperty->IsAccessibilityGroup();
|
||||
bool hasAccessibilityText = accessibilityProperty->HasAccessibilityTextOrDescription();
|
||||
if (level == AccessibilityProperty::Level::YES) {
|
||||
if (level == AccessibilityProperty::Level::YES_STR) {
|
||||
break;
|
||||
} else if (level == AccessibilityProperty::Level::NO_HIDE_DESCENDANTS) {
|
||||
shouldSearchSelf = false;
|
||||
shouldSearchChildren = false;
|
||||
break;
|
||||
} else {
|
||||
if (level == AccessibilityProperty::Level::NO) {
|
||||
if (level == AccessibilityProperty::Level::NO_STR) {
|
||||
shouldSearchSelf = false;
|
||||
} else {
|
||||
// shouldSearchSelf is true here
|
||||
@ -333,7 +333,7 @@ std::tuple<bool, bool, bool> AccessibilityProperty::GetSearchStrategy(const RefP
|
||||
} while (0);
|
||||
|
||||
if (ancestorGroupFlag == true) {
|
||||
if (level != AccessibilityProperty::Level::YES) {
|
||||
if (level != AccessibilityProperty::Level::YES_STR) {
|
||||
shouldSearchSelf = false;
|
||||
}
|
||||
currentGroupFlag = true;
|
||||
@ -415,11 +415,11 @@ bool AccessibilityProperty::IsAccessibilityFocusable(const RefPtr<FrameNode>& no
|
||||
auto accessibilityProperty = node->GetAccessibilityProperty<NG::AccessibilityProperty>();
|
||||
if (accessibilityProperty != nullptr) {
|
||||
auto level = accessibilityProperty->GetAccessibilityLevel();
|
||||
if (level == AccessibilityProperty::Level::YES) {
|
||||
if (level == AccessibilityProperty::Level::YES_STR) {
|
||||
focusable = true;
|
||||
break;
|
||||
}
|
||||
if (level == AccessibilityProperty::Level::NO) {
|
||||
if (level == AccessibilityProperty::Level::NO_STR) {
|
||||
break;
|
||||
}
|
||||
if (accessibilityProperty->IsAccessibilityGroup() ||
|
||||
|
@ -585,8 +585,8 @@ public:
|
||||
class Level {
|
||||
public:
|
||||
inline static const std::string AUTO = "auto";
|
||||
inline static const std::string YES = "yes";
|
||||
inline static const std::string NO = "no";
|
||||
inline static const std::string YES_STR = "yes";
|
||||
inline static const std::string NO_STR = "no";
|
||||
inline static const std::string NO_HIDE_DESCENDANTS = "no-hide-descendants";
|
||||
};
|
||||
|
||||
@ -600,8 +600,8 @@ public:
|
||||
|
||||
void SetAccessibilityLevel(const std::string& accessibilityLevel)
|
||||
{
|
||||
if (accessibilityLevel == Level::YES ||
|
||||
accessibilityLevel == Level::NO ||
|
||||
if (accessibilityLevel == Level::YES_STR ||
|
||||
accessibilityLevel == Level::NO_STR ||
|
||||
accessibilityLevel == Level::NO_HIDE_DESCENDANTS) {
|
||||
accessibilityLevel_ = accessibilityLevel;
|
||||
} else {
|
||||
|
@ -110,7 +110,9 @@ build_component_ng("render_ng") {
|
||||
}
|
||||
|
||||
if (!enable_player_framework) {
|
||||
rosen_sources -= [ "adapter/rosen_media_player.cpp" ]
|
||||
if (current_os == "ohos") {
|
||||
rosen_sources -= [ "adapter/rosen_media_player.cpp" ]
|
||||
}
|
||||
} else {
|
||||
sources += [ "adapter/media_player_impl.cpp" ]
|
||||
}
|
||||
|
@ -25,13 +25,13 @@
|
||||
namespace OHOS::Ace::NG {
|
||||
// under the condition of supporting cross platform and texture rendering
|
||||
#ifdef RENDER_EXTRACT_SUPPORTED
|
||||
RefPtr<RenderSurface> RenderSurface::Create(const RenderSurfaceTpye& type)
|
||||
RefPtr<RenderSurface> RenderSurface::Create(const RenderSurfaceType& type)
|
||||
{
|
||||
if (SystemProperties::GetRosenBackendEnabled()) {
|
||||
switch (type) {
|
||||
case RenderSurfaceTpye::SURFACE:
|
||||
case RenderSurfaceType::SURFACE:
|
||||
return MakeRefPtr<RenderSurfaceImpl>();
|
||||
case RenderSurfaceTpye::TEXTURE:
|
||||
case RenderSurfaceType::TEXTURE:
|
||||
return MakeRefPtr<RenderTextureImpl>();
|
||||
default:
|
||||
break;
|
||||
|
@ -1679,13 +1679,14 @@ HWTEST_F(PatternLockTestNg, PatternLockAccessibilityTest001, TestSize.Level1)
|
||||
AccessibilityHoverInfo info;
|
||||
info.SetActionType(AccessibilityHoverAction::HOVER_ENTER);
|
||||
pattern_->HandleAccessibilityHoverEvent(true, info);
|
||||
EXPECT_TRUE(pattern_->accessibilityPropertyVec_[0]->GetAccessibilityLevel() == AccessibilityProperty::Level::YES);
|
||||
EXPECT_TRUE(pattern_->accessibilityPropertyVec_[0]->GetAccessibilityLevel() ==
|
||||
AccessibilityProperty::Level::YES_STR);
|
||||
/**
|
||||
* @tc.case: case3 HandleTextOnAccessibilityFocusCallback 1.
|
||||
*/
|
||||
pattern_->HandleTextOnAccessibilityFocusCallback(0, 0);
|
||||
auto accessibilityProperty = frameNode_->GetAccessibilityProperty<AccessibilityProperty>();
|
||||
EXPECT_TRUE(accessibilityProperty->GetAccessibilityLevel() == AccessibilityProperty::Level::NO);
|
||||
EXPECT_TRUE(accessibilityProperty->GetAccessibilityLevel() == AccessibilityProperty::Level::NO_STR);
|
||||
/**
|
||||
* @tc.case: case4 HandleTextOnAccessibilityFocusCallback 2.
|
||||
*/
|
||||
@ -1709,8 +1710,9 @@ HWTEST_F(PatternLockTestNg, PatternLockAccessibilityTest001, TestSize.Level1)
|
||||
*/
|
||||
info.SetActionType(AccessibilityHoverAction::HOVER_MOVE);
|
||||
pattern_->HandleAccessibilityHoverEvent(false, info);
|
||||
EXPECT_TRUE(pattern_->accessibilityPropertyVec_[0]->GetAccessibilityLevel() == AccessibilityProperty::Level::NO);
|
||||
EXPECT_TRUE(accessibilityProperty->GetAccessibilityLevel() == AccessibilityProperty::Level::YES);
|
||||
EXPECT_TRUE(pattern_->accessibilityPropertyVec_[0]->GetAccessibilityLevel() ==
|
||||
AccessibilityProperty::Level::NO_STR);
|
||||
EXPECT_TRUE(accessibilityProperty->GetAccessibilityLevel() == AccessibilityProperty::Level::YES_STR);
|
||||
/**
|
||||
* @tc.case: case6 HandleAccessibilityHoverEvent 3.
|
||||
*/
|
||||
|
@ -1390,7 +1390,7 @@ HWTEST_F(SliderPatternTestNg, SliderPatternAccessibilityTest004, TestSize.Level1
|
||||
ASSERT_NE(pointNodeProperty, nullptr);
|
||||
|
||||
std::string text, description;
|
||||
EXPECT_EQ(pointAccessibilityProperty->accessibilityLevel_, AccessibilityProperty::Level::YES);
|
||||
EXPECT_EQ(pointAccessibilityProperty->accessibilityLevel_, AccessibilityProperty::Level::YES_STR);
|
||||
if (i == 0) {
|
||||
text = selected + pointNodeProperty->GetContent().value_or("");
|
||||
description = " ";
|
||||
@ -1476,7 +1476,7 @@ HWTEST_F(SliderPatternTestNg, SliderPatternAccessibilityTest006, TestSize.Level1
|
||||
accessibilityProperty->OnAccessibilityFocusCallback(true);
|
||||
auto sliderAccessibilityProperty = sliderNode->GetAccessibilityProperty<AccessibilityProperty>();
|
||||
ASSERT_NE(sliderAccessibilityProperty, nullptr);
|
||||
EXPECT_EQ(sliderAccessibilityProperty->accessibilityLevel_, AccessibilityProperty::Level::NO);
|
||||
EXPECT_EQ(sliderAccessibilityProperty->accessibilityLevel_, AccessibilityProperty::Level::NO_STR);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1565,11 +1565,11 @@ HWTEST_F(SliderPatternTestNg, SliderPatternAccessibilityTest008, TestSize.Level1
|
||||
auto accessibilityProperty = frameNode->GetAccessibilityProperty<AccessibilityProperty>();
|
||||
ASSERT_NE(accessibilityProperty, nullptr);
|
||||
if (!item.first) {
|
||||
EXPECT_EQ(accessibilityProperty->GetAccessibilityLevel(), AccessibilityProperty::Level::YES);
|
||||
checkFunc(sliderPattern->pointAccessibilityNodeVec_, AccessibilityProperty::Level::NO);
|
||||
EXPECT_EQ(accessibilityProperty->GetAccessibilityLevel(), AccessibilityProperty::Level::YES_STR);
|
||||
checkFunc(sliderPattern->pointAccessibilityNodeVec_, AccessibilityProperty::Level::NO_STR);
|
||||
} else if (item.second == AccessibilityHoverAction::HOVER_ENTER ||
|
||||
item.second == AccessibilityHoverAction::HOVER_MOVE) {
|
||||
checkFunc(sliderPattern->pointAccessibilityNodeVec_, AccessibilityProperty::Level::YES);
|
||||
checkFunc(sliderPattern->pointAccessibilityNodeVec_, AccessibilityProperty::Level::YES_STR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ HWTEST_F(AccessibilityPropertyTestNg, AccessibilityPropertyTest012, TestSize.Lev
|
||||
auto accessibilityPropertyNew = frameNode->GetAccessibilityProperty<NG::AccessibilityProperty>();
|
||||
EXPECT_NE(accessibilityPropertyNew, nullptr);
|
||||
auto levelBak = accessibilityPropertyNew->GetAccessibilityLevel();
|
||||
accessibilityPropertyNew->SetAccessibilityLevel(AccessibilityProperty::Level::YES);
|
||||
accessibilityPropertyNew->SetAccessibilityLevel(AccessibilityProperty::Level::YES_STR);
|
||||
result = accessibilityProperty.GetSearchStrategy(frameNode, ancestorGroupFlag);
|
||||
EXPECT_EQ(result, std::make_tuple(true, true, false));
|
||||
|
||||
@ -553,7 +553,7 @@ HWTEST_F(AccessibilityPropertyTestNg, AccessibilityPropertyTest012, TestSize.Lev
|
||||
EXPECT_EQ(result, std::make_tuple(true, true, true));
|
||||
accessibilityPropertyNew->SetAccessibilityGroup(hasGroupOrVirtualNodeBak);
|
||||
|
||||
accessibilityPropertyNew->SetAccessibilityLevel(AccessibilityProperty::Level::NO);
|
||||
accessibilityPropertyNew->SetAccessibilityLevel(AccessibilityProperty::Level::NO_STR);
|
||||
result = accessibilityProperty.GetSearchStrategy(frameNode, ancestorGroupFlag);
|
||||
EXPECT_EQ(result, std::make_tuple(false, true, false));
|
||||
|
||||
@ -616,11 +616,11 @@ HWTEST_F(AccessibilityPropertyTestNg, AccessibilityPropertyTest014, TestSize.Lev
|
||||
auto levelBak = accessibilityProperty->GetAccessibilityLevel();
|
||||
EXPECT_NE(accessibilityProperty, nullptr);
|
||||
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::YES);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::YES_STR);
|
||||
result = accessibilityProperty->IsAccessibilityFocusable(frameNode);
|
||||
EXPECT_EQ(result, true);
|
||||
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO);
|
||||
accessibilityProperty->SetAccessibilityLevel(AccessibilityProperty::Level::NO_STR);
|
||||
result = accessibilityProperty->IsAccessibilityFocusable(frameNode);
|
||||
EXPECT_EQ(result, false);
|
||||
|
||||
@ -850,7 +850,7 @@ HWTEST_F(AccessibilityPropertyTestNg, AccessibilityPropertyTest027, TestSize.Lev
|
||||
EXPECT_EQ(text, "");
|
||||
|
||||
std::string levelBak = accessibilityProperty.GetAccessibilityLevel();
|
||||
accessibilityProperty.SetAccessibilityLevel(AccessibilityProperty::Level::YES);
|
||||
accessibilityProperty.SetAccessibilityLevel(AccessibilityProperty::Level::YES_STR);
|
||||
accessibilityProperty.GetGroupTextRecursive(false, text);
|
||||
EXPECT_EQ(text, "");
|
||||
size_t found = text.find(',');
|
||||
@ -866,7 +866,7 @@ HWTEST_F(AccessibilityPropertyTestNg, AccessibilityPropertyTest027, TestSize.Lev
|
||||
|
||||
text = "";
|
||||
levelBak = accessibilityProperty.GetAccessibilityLevel();
|
||||
accessibilityProperty.SetAccessibilityLevel(AccessibilityProperty::Level::NO);
|
||||
accessibilityProperty.SetAccessibilityLevel(AccessibilityProperty::Level::NO_STR);
|
||||
accessibilityProperty.GetGroupTextRecursive(false, text);
|
||||
EXPECT_EQ(text, "");
|
||||
accessibilityProperty.SetAccessibilityLevel(levelBak);
|
||||
@ -970,7 +970,7 @@ HWTEST_F(AccessibilityPropertyTestNg, AccessibilityPropertyTest030, TestSize.Lev
|
||||
auto accessibilityPropertyNew = frameNode->GetAccessibilityProperty<NG::AccessibilityProperty>();
|
||||
EXPECT_NE(accessibilityPropertyNew, nullptr);
|
||||
auto levelBak = accessibilityPropertyNew->GetAccessibilityLevel();
|
||||
accessibilityPropertyNew->SetAccessibilityLevel(AccessibilityProperty::Level::YES);
|
||||
accessibilityPropertyNew->SetAccessibilityLevel(AccessibilityProperty::Level::YES_STR);
|
||||
auto result = accessibilityProperty.GetSearchStrategy(frameNode, ancestorGroupFlag);
|
||||
EXPECT_EQ(result, std::make_tuple(true, true, false));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user