mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-24 07:31:57 +00:00
修复安全告警4-2
Signed-off-by: zhouyan <zhouyan162@huawei.com> Change-Id: I3e8566a63c302afa5ccbd90d6725be70883e7c66
This commit is contained in:
parent
df19d5a164
commit
8799377402
@ -1982,7 +1982,7 @@ class TextMenuItemId {
|
||||
}
|
||||
|
||||
equals(id) {
|
||||
return id.id_ == this.id_;
|
||||
return id.id_ === this.id_;
|
||||
}
|
||||
|
||||
static get CUT() {
|
||||
|
@ -339,15 +339,20 @@ void JSSearch::SetCancelDefaultIcon()
|
||||
|
||||
void JSSearch::SetCancelSymbolIcon(const JSCallbackInfo& info)
|
||||
{
|
||||
std::function<void(WeakPtr<NG::FrameNode>)> iconSymbol = nullptr;
|
||||
auto param = JSRef<JSObject>::Cast(info[0]);
|
||||
auto iconProp = param->GetProperty("icon");
|
||||
SetSymbolOptionApply(info, iconSymbol, iconProp);
|
||||
SearchModel::GetInstance()->SetCancelSymbolIcon(iconSymbol);
|
||||
if (info[0]->IsObject()) {
|
||||
std::function<void(WeakPtr<NG::FrameNode>)> iconSymbol = nullptr;
|
||||
auto param = JSRef<JSObject>::Cast(info[0]);
|
||||
auto iconProp = param->GetProperty("icon");
|
||||
SetSymbolOptionApply(info, iconSymbol, iconProp);
|
||||
SearchModel::GetInstance()->SetCancelSymbolIcon(iconSymbol);
|
||||
}
|
||||
}
|
||||
|
||||
void JSSearch::SetCancelImageIcon(const JSCallbackInfo& info)
|
||||
{
|
||||
if (!info[0]->IsObject()) {
|
||||
return;
|
||||
}
|
||||
auto param = JSRef<JSObject>::Cast(info[0]);
|
||||
auto theme = GetTheme<SearchTheme>();
|
||||
CHECK_NULL_VOID(theme);
|
||||
@ -401,6 +406,9 @@ void JSSearch::SetSearchSymbolIcon(const JSCallbackInfo& info)
|
||||
|
||||
void JSSearch::SetSearchImageIcon(const JSCallbackInfo& info)
|
||||
{
|
||||
if (!info[0]->IsObject()) {
|
||||
return;
|
||||
}
|
||||
auto param = JSRef<JSObject>::Cast(info[0]);
|
||||
auto theme = GetTheme<SearchTheme>();
|
||||
CHECK_NULL_VOID(theme);
|
||||
|
@ -188,7 +188,7 @@ public:
|
||||
const OffsetF& rightTop, const OffsetF& leftTop);
|
||||
|
||||
void OnSelectionMenuOptionsUpdate(
|
||||
const NG::OnCreateMenuCallback && onCreateMenuCallback, const NG::OnMenuItemClickCallback && onMenuItemClick);
|
||||
const NG::OnCreateMenuCallback&& onCreateMenuCallback, const NG::OnMenuItemClickCallback&& onMenuItemClick);
|
||||
|
||||
float GetHandleDiameter();
|
||||
VectorF GetHostScale();
|
||||
|
@ -1945,7 +1945,7 @@ SymbolSpanStyle TextPattern::GetSymbolSpanStyleObject(const RefPtr<SpanNode>& no
|
||||
}
|
||||
symbolSpanStyle.fontWeight = static_cast<int32_t>(node->GetFontWeightValue(FontWeight::NORMAL));
|
||||
symbolSpanStyle.renderingStrategy = static_cast<int32_t>(node->GetSymbolRenderingStrategyValue(0));
|
||||
symbolSpanStyle.effectStrategy = node->GetSymbolEffectStrategyValue(0);
|
||||
symbolSpanStyle.effectStrategy = static_cast<int32_t>(node->GetSymbolEffectStrategyValue(0));
|
||||
return symbolSpanStyle;
|
||||
}
|
||||
|
||||
|
@ -515,7 +515,7 @@ bool TxtParagraph::ComputeOffsetForCaretUpstream(int32_t extent, CaretMetricsF&
|
||||
// when text_ ends with a \n, return the top position of the next line.
|
||||
auto preIsPlaceholder = CalCulateAndCheckPreIsPlaceholder(extent - 1, extent);
|
||||
prevChar = text_[std::max(0, extent - 1)];
|
||||
if (prevChar == NEWLINE_CODE && !text_[extent] && !preIsPlaceholder) {
|
||||
if (prevChar == NEWLINE_CODE && !text_[static_cast<size_t>(extent)] && !preIsPlaceholder) {
|
||||
// Return the start of next line.
|
||||
result.offset.SetX(MakeEmptyOffsetX());
|
||||
#ifndef USE_GRAPHIC_TEXT_GINE
|
||||
|
Loading…
Reference in New Issue
Block a user