diff --git a/adapter/ohos/osal/log_wrapper.cpp b/adapter/ohos/osal/log_wrapper.cpp index 0f4a7d82be1aafd5c8b1ccaa5665dccd731163ae..851044ebac012717f93a37dbea92b0c844a11e6f 100644 --- a/adapter/ohos/osal/log_wrapper.cpp +++ b/adapter/ohos/osal/log_wrapper.cpp @@ -126,8 +126,8 @@ const std::unordered_map g_DOMAIN_CONTENTS_MAP = { { AceLogTag::ACE_SELECT_OVERLAY, "AceSelectOverlay" }, { AceLogTag::ACE_CLIPBOARD, "AceClipBoard" }, { AceLogTag::ACE_SECURITY_COMPONENT, "AceSecurityComponent" }, - { AceLogTag::ACE_LAYOUT_INSPECTOR, "AceLayoutInspector" }, { AceLogTag::ACE_MEDIA_QUERY, "AceMediaQuery" }, + { AceLogTag::ACE_LAYOUT_INSPECTOR, "AceLayoutInspector" }, { AceLogTag::ACE_LAYOUT, "AceLayout" }, { AceLogTag::ACE_STYLUS, "AceStylus" }, { AceLogTag::ACE_BADGE, "AceBadge" }, diff --git a/frameworks/base/error/error_code.h b/frameworks/base/error/error_code.h index fca33362699eb29d95e1867284821e190921581a..7ae23e52c3480fce47f0e9e57ad3b78fa3daf8ca 100644 --- a/frameworks/base/error/error_code.h +++ b/frameworks/base/error/error_code.h @@ -76,9 +76,9 @@ constexpr int32_t ERROR_CODE_NATIVE_IMPL_NODE_EVENT_NO_RETURN = 106109; constexpr int32_t ERROR_CODE_NATIVE_IMPL_NODE_INDEX_INVALID = 106200; constexpr int32_t ERROR_CODE_NATIVE_IMPL_GET_INFO_FAILED = 106201; constexpr int32_t ERROR_CODE_NATIVE_IMPL_BUFFER_SIZE_ERROR = 106202; -constexpr int32_t ERROR_CODE_NATIVE_IMPL_NOT_MAIN_THREAD = 106301; constexpr int32_t ERROR_CODE_NATIVE_IMPL_NODE_NOT_ON_MAIN_TREE = 106203; constexpr int32_t ERROR_CODE_NATIVE_IMPL_NODE_ON_INVALID_THREAD = 106204; +constexpr int32_t ERROR_CODE_NATIVE_IMPL_NOT_MAIN_THREAD = 106301; constexpr int32_t ERROR_CODE_NATIVE_IMPL_FORCE_DARK_CONFIG_INVALID = 106205; // C-API RenderNode errors diff --git a/frameworks/bridge/declarative_frontend/ark_theme/theme_manager/src/theme/ArkThemeImpl.ts b/frameworks/bridge/declarative_frontend/ark_theme/theme_manager/src/theme/ArkThemeImpl.ts index 7dbd4072cfd7ad9d87747905e23345795c0ec690..b4ea62daf3608f9cfbde1db433c7c5f5d542acf7 100644 --- a/frameworks/bridge/declarative_frontend/ark_theme/theme_manager/src/theme/ArkThemeImpl.ts +++ b/frameworks/bridge/declarative_frontend/ark_theme/theme_manager/src/theme/ArkThemeImpl.ts @@ -26,13 +26,13 @@ class ArkThemeImpl extends ArkThemeBase { new ArkColorsImpl(undefined, baselineTheme.colors), new ArkColorsImpl(undefined, baselineTheme.darkColors), new ArkShapesImpl(undefined, baselineTheme.shapes), - new ArkTypographyImpl(undefined, baselineTheme.typography)) + new ArkTypographyImpl(undefined, baselineTheme.typography)); return; } super(baselineTheme.id, customTheme, colorMode, new ArkColorsImpl(customTheme.colors, baselineTheme.colors), new ArkColorsImpl(customTheme.darkColors, baselineTheme.darkColors), new ArkShapesImpl(customTheme.shapes, baselineTheme.shapes), - new ArkTypographyImpl(customTheme.typography, baselineTheme.typography)) + new ArkTypographyImpl(customTheme.typography, baselineTheme.typography)); } } \ No newline at end of file diff --git a/frameworks/bridge/declarative_frontend/ark_theme/theme_manager/src/theme/ArkThemeScopeManager.ts b/frameworks/bridge/declarative_frontend/ark_theme/theme_manager/src/theme/ArkThemeScopeManager.ts index 52a45817882f5c7e1133df3b7a2bc25ebf82c355..b899249ab635e641d5b0ec7fed0940bff598a0c9 100644 --- a/frameworks/bridge/declarative_frontend/ark_theme/theme_manager/src/theme/ArkThemeScopeManager.ts +++ b/frameworks/bridge/declarative_frontend/ark_theme/theme_manager/src/theme/ArkThemeScopeManager.ts @@ -238,7 +238,7 @@ class ArkThemeScopeManager { return false; } return true; - }) + }); } /** @@ -372,7 +372,7 @@ class ArkThemeScopeManager { * or previously set Default Theme or System Theme */ getFinalTheme(ownerComponent: ViewPuInternal): Theme { - return ownerComponent.themeScope_?.getTheme() ?? this.defaultTheme ?? ArkThemeScopeManager.SystemTheme; + return ownerComponent.themeScope_?.getTheme() ?? this.defaultTheme ?? ArkThemeScopeManager.SystemTheme; } /** @@ -435,8 +435,8 @@ class ArkThemeScopeManager { if (scope === undefined) { return; } - const theme: Theme = scope?.getTheme() ?? this.defaultTheme ?? ArkThemeScopeManager.SystemTheme - scope.componentsInScope()?.forEach((item) => this.notifyScopeThemeChanged(item, theme, scope.isColorModeChanged())) + const theme: Theme = scope?.getTheme() ?? this.defaultTheme ?? ArkThemeScopeManager.SystemTheme; + scope.componentsInScope()?.forEach((item) => this.notifyScopeThemeChanged(item, theme, scope.isColorModeChanged())); } /** @@ -521,7 +521,7 @@ class ArkThemeScopeManager { this.defaultTheme?.unbindFromScope(0); this.defaultTheme = ArkThemeScopeManager.SystemTheme; const cloneTheme = ArkThemeScopeManager.cloneCustomThemeWithExpand(customTheme); - this.defaultTheme = this.makeTheme(customTheme, ThemeColorMode.SYSTEM); + this.defaultTheme = this.makeTheme(cloneTheme, ThemeColorMode.SYSTEM); // bind new default theme to 0 theme scope this.defaultTheme.bindToScope(0); diff --git a/frameworks/bridge/declarative_frontend/engine/arkTheme.js b/frameworks/bridge/declarative_frontend/engine/arkTheme.js index cd715a9c15abe7920421f5b964af495cf626c782..82dac5e002389faaf99fe215632e467062f041ab 100644 --- a/frameworks/bridge/declarative_frontend/engine/arkTheme.js +++ b/frameworks/bridge/declarative_frontend/engine/arkTheme.js @@ -179,7 +179,7 @@ class ArkThemeCache { } remove(theme) { const index = this.cache.indexOf(theme); - if (index == -1) { + if (index === -1) { return; } this.cache.splice(index, 1); @@ -270,7 +270,7 @@ class ArkThemeBase { } unbindFromScope(themeScopeId) { const index = this.bindedThemeScopesIds.indexOf(themeScopeId); - if (index == -1) { + if (index === -1) { return; } this.scopesCounter--; diff --git a/frameworks/core/components/indexer/indexer_theme.h b/frameworks/core/components/indexer/indexer_theme.h index 707cb7f777014aacde065326b9b17cb9b21d20e1..0709d134669d0e111bee0f9f2dbc9debb43f0830 100644 --- a/frameworks/core/components/indexer/indexer_theme.h +++ b/frameworks/core/components/indexer/indexer_theme.h @@ -299,9 +299,9 @@ private: ParseDimensionAttributes(indexerPattern, theme); ParseTextStyleAttributes(indexerPattern, theme); theme->accessibilityExpand_ = indexerPattern->GetAttr("filter_accessibility_expand", ""); + theme->accessibilityCollapsed_ = indexerPattern->GetAttr("filter_accessibility_expanded", ""); theme->accessibilityExpanded_ = indexerPattern->GetAttr("filter_accessibility_collapse", ""); theme->accessibilityCollapse_ = indexerPattern->GetAttr("filter_accessibility_collapsed", ""); - theme->accessibilityCollapsed_ = indexerPattern->GetAttr("filter_accessibility_expanded", ""); if (Container::GreatOrEqualAPITargetVersion(PlatformVersion::VERSION_TWELVE)) { theme->popupBackgroundColor_ = indexerPattern->GetAttr( "popup_background_color_api_twelve", Color(POPUP_BACKGROUND_COLOR_API_TWELVE)); diff --git a/frameworks/core/components/slider/slider_theme.h b/frameworks/core/components/slider/slider_theme.h index 586ab3d9853407cb7f97d3c918ae80ab606b402a..e42fe8c2b2637b44cf2ab92b48c25dd030868a84 100644 --- a/frameworks/core/components/slider/slider_theme.h +++ b/frameworks/core/components/slider/slider_theme.h @@ -69,14 +69,14 @@ public: const double defaultMarkColorAplpa = 0.1; theme->trackBgColor_ = pattern->GetAttr("track_bg_color", Color::RED); theme->trackSelectedColor_ = pattern->GetAttr("track_color_selected", Color::RED); - theme->markerColor_ = - pattern->GetAttr("marker_color", Color::RED) + theme->markerColor_ = pattern->GetAttr("marker_color", Color::RED) .BlendOpacity(pattern->GetAttr("marker_color_alpha", defaultMarkColorAplpa)); theme->tipTextColor_ = pattern->GetAttr("tip_text_color", Color::RED); theme->tipColor_ = pattern->GetAttr("tip_color", Color::RED); theme->blockHoverColor_ = pattern->GetAttr("block_color_hovered", Color::RED); theme->blockPressedColor_ = pattern->GetAttr("block_color_pressed", BLOCK_COLOR_PRESSED); - theme->blockOuterEdgeColor_ = pattern->GetAttr("block_outer_edge_color", BLOCK_OUTER_EDGE_COLOR); + theme->blockOuterEdgeColor_ = + pattern->GetAttr("block_outer_edge_color", BLOCK_OUTER_EDGE_COLOR); theme->bubbleToCircleCenterDistance_ = pattern->GetAttr("bubble_to_circle_center_distance", BUBBLE_TO_CIRCLE_CENTER_DISTANCE); theme->measureContentDefaultWidth_ = @@ -85,13 +85,14 @@ public: pattern->GetAttr("outset_hot_block_shadow_width", OUTSET_HOT_BLOCK_SHADOW_WIDTH); theme->insetHotBlockShadowWidth_ = pattern->GetAttr("inset_hot_block_shadow_width", INSET_HOT_BLOCK_SHADOW_WIDTH); - theme->focusSideDistance_ = pattern->GetAttr("focus_side_distance", FOCUS_SIDE_DISTANCE); + theme->focusSideDistance_ = + pattern->GetAttr("focus_side_distance", FOCUS_SIDE_DISTANCE); theme->layoutMaxLength_ = pattern->GetAttr("slider_max_length", .0_vp); theme->hoverAnimationDuration_ = pattern->GetAttr("hover_animation_duration", 0.0); theme->pressAnimationDuration_ = pattern->GetAttr("press_animation_duration", 0.0); theme->moveAnimationDuration_ = pattern->GetAttr("move_animation_duration", 0.0); - theme->disabledAlpha_ = pattern->GetAttr("slider_disable_alpha", 0.0); theme->sliderPPI_ = pattern->GetAttr("slider_pixels_per_inch", DEFAULT_SLIDER_PPI); + theme->disabledAlpha_ = pattern->GetAttr("slider_disable_alpha", 0.0); theme->outsetBlockSize_ = pattern->GetAttr("outset_block_size", 16.0_vp); theme->outsetBlockHotSize_ = pattern->GetAttr("outset_block_hot_region_size", 40.0_vp); theme->blockColor_ = pattern->GetAttr("block_color", Color(0xffffffff)); @@ -279,14 +280,14 @@ public: return moveAnimationDuration_; } - double GetDisabledAlpha() const + double GetSliderPPI() const { - return disabledAlpha_; + return sliderPPI_; } - double GetSliderPPI() const + double GetDisabledAlpha() const { - return sliderPPI_; + return disabledAlpha_; } std::string GetSelectedTxt() const diff --git a/frameworks/core/components_ng/render/adapter/rosen_animation_utils.cpp b/frameworks/core/components_ng/render/adapter/rosen_animation_utils.cpp index f918f3e6e62ecd385bc3929b8e29660f1112f0d7..87c83ee04e84511359b8eff8531dccbfa13bf10d 100644 --- a/frameworks/core/components_ng/render/adapter/rosen_animation_utils.cpp +++ b/frameworks/core/components_ng/render/adapter/rosen_animation_utils.cpp @@ -147,7 +147,6 @@ CancelAnimationStatus AnimationUtils::CloseImplicitCancelAnimationReturnStatus(c bool AnimationUtils::IsImplicitAnimationOpen(const RefPtr& context) { auto rsUIContext = GetRSUIContext(context); - CHECK_NULL_RETURN(rsUIContext, false); return Rosen::RSNode::IsImplicitAnimationOpen(rsUIContext); } diff --git a/interfaces/inner_api/ui_session/ui_content_service_interface.h b/interfaces/inner_api/ui_session/ui_content_service_interface.h index 646880749075064a289778619b559989cdee3f87..3c94fbaeaf4984b171815752a26f03dbc00f5fbd 100644 --- a/interfaces/inner_api/ui_session/ui_content_service_interface.h +++ b/interfaces/inner_api/ui_session/ui_content_service_interface.h @@ -55,9 +55,9 @@ public: END_WEB_TRANSLATE, GET_CURRENT_SHOWING_IMAGE, GET_CURRENT_PAGE_NAME, + GET_VISIBLE_TREE, SENDCOMMAND_ASYNC_EVENT, SENDCOMMAND_EVENT, - GET_VISIBLE_TREE, SEND_COMMAND, EXE_APP_AI_FUNCTION, }; diff --git a/interfaces/napi/kits/observer/ui_observer.h b/interfaces/napi/kits/observer/ui_observer.h index d1a5224558c771235b65839209a9b80c6da002b5..54fb0855977df4d39915beae8be0430f655e819b 100644 --- a/interfaces/napi/kits/observer/ui_observer.h +++ b/interfaces/napi/kits/observer/ui_observer.h @@ -186,8 +186,7 @@ private: static std::unordered_map infosForRouterPage_; static std::unordered_map>> specifiedDensityListeners_; - static std::unordered_map>> specifiedDrawListeners_; - static std::unordered_map>> specifiedLayoutListeners_; + static std::unordered_map>> abilityContextWillClickListeners_; static std::unordered_map>> @@ -217,6 +216,9 @@ private: specifiedAfterPanEndListeners_; static std::unordered_map> specifiedNodeRenderStateListeners_; + + static std::unordered_map>> specifiedDrawListeners_; + static std::unordered_map>> specifiedLayoutListeners_; static std::unordered_map abilityUIContextNavDesSwitchListeners_; static std::unordered_map uiContextNavDesSwitchListeners_; diff --git a/interfaces/napi/kits/observer/ui_observer_listener.cpp b/interfaces/napi/kits/observer/ui_observer_listener.cpp index 536fca61680e6534c81f6e53692430667a6b3e7f..d37f2d6cb3d52e5e75bfed8fcdf79493f773a9d5 100644 --- a/interfaces/napi/kits/observer/ui_observer_listener.cpp +++ b/interfaces/napi/kits/observer/ui_observer_listener.cpp @@ -791,8 +791,8 @@ void UIObserverListener::AddGestureEventInfoThree(napi_value objValueEvent, cons napi_set_named_property(env_, objValueEvent, "deviceId", napiDeviceId); napi_create_double(env_, gestureEventInfo.GetTargetDisplayId(), &napiTargetDisplayId); napi_set_named_property(env_, objValueEvent, "targetDisplayId", napiTargetDisplayId); - AddFingerInfosInfo(objValueEvent, gestureEventInfo); AddFingerListInfo(objValueEvent, gestureEventInfo); + AddFingerInfosInfo(objValueEvent, gestureEventInfo); napi_close_handle_scope(env_, scope); } diff --git a/interfaces/native/native_node_napi.h b/interfaces/native/native_node_napi.h index 4075ed953f0f3a724103efee07461e81f1f7be68..9b06fd8680f1b5beb2db02f0fc867bfba251ce1c 100644 --- a/interfaces/native/native_node_napi.h +++ b/interfaces/native/native_node_napi.h @@ -346,7 +346,8 @@ int32_t OH_ArkUI_PostFrameCallback(ArkUI_ContextHandle uiContext, void* userData void (*callback)(uint64_t nanoTimestamp, uint32_t frameCount, void* userData)); /** - * @brief Register a callback to be executed at the end of the next idle frame.If there is no next frame, will request one automatically. + * @brief Register a callback to be executed at the end of the next idle frame. + If there is no next frame, will request one automatically. * * @param uiContext ArkUI_ContextHandle. * @param userData Indicates the custom data to be saved. diff --git a/interfaces/native/node/node_model.h b/interfaces/native/node/node_model.h index 0ee7d24b3c9f804516cab201d1844ec0e069b580..27e556bd12b041c390df29cacf0c28891d0fd6fe 100644 --- a/interfaces/native/node/node_model.h +++ b/interfaces/native/node/node_model.h @@ -47,8 +47,8 @@ struct ArkUI_Node { void* alignRuleOption = nullptr; void* userData = nullptr; void* swiperIndicator = nullptr; - void* imageFrameInfos = nullptr; void* drawableDescriptor = nullptr; + void* imageFrameInfos = nullptr; int32_t linearGradientDirection = -1; void* customEventListeners = nullptr; void* altDrawableDescriptor = nullptr;