!48791 【RichEditor】修改动态设置margin时显示异常

Merge pull request !48791 from xuyue/dynamicMarginError
This commit is contained in:
openharmony_ci 2024-11-18 13:47:33 +00:00 committed by Gitee
commit 557d514ef0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 0 additions and 12 deletions

View File

@ -622,7 +622,6 @@ bool RichEditorPattern::OnDirtyLayoutWrapperSwap(const RefPtr<LayoutWrapper>& di
}
auto host = GetHost();
CHECK_NULL_RETURN(host, ret);
SupplementIdealSizeWidth(host);
auto context = host->GetRenderContext();
CHECK_NULL_RETURN(context, ret);
if (context->GetClipEdge().has_value()) {
@ -673,16 +672,6 @@ void RichEditorPattern::FireOnReady()
isRichEditorInit_ = true;
}
void RichEditorPattern::SupplementIdealSizeWidth(const RefPtr<FrameNode>& frameNode)
{
auto layoutProperty = frameNode->GetLayoutProperty<RichEditorLayoutProperty>();
CHECK_NULL_VOID(layoutProperty);
auto&& constraint = layoutProperty->GetCalcLayoutConstraint();
if (!constraint || !constraint->selfIdealSize.has_value() || !constraint->selfIdealSize->Width().has_value()) {
layoutProperty->UpdateUserDefinedIdealSize(CalcSize(CalcLength(frameRect_.Width()), std::nullopt));
}
}
void RichEditorPattern::MoveCaretOnLayoutSwap()
{
MoveCaretAfterTextChange();

View File

@ -383,7 +383,6 @@ public:
bool OnDirtyLayoutWrapperSwap(const RefPtr<LayoutWrapper>& dirty, const DirtySwapConfig& config) override;
void HandleSelectOverlayOnLayoutSwap();
void FireOnReady();
void SupplementIdealSizeWidth(const RefPtr<FrameNode>& frameNode);
void MoveCaretOnLayoutSwap();
void UpdateEditingValue(const std::shared_ptr<TextEditingValue>& value, bool needFireChangeEvent = true) override;