From 2f0d7040ea68bd6d856adef8b5633c3d7701374a Mon Sep 17 00:00:00 2001 From: "lxlxlx310@163.com" Date: Thu, 16 May 2024 21:55:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8A=A0=E8=BD=BD=E5=90=8Ere?= =?UTF-8?q?size=EF=BC=8CWeb=E5=86=85=E5=AE=B9=E6=94=BE=E5=A4=A7=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lxlxlx310@163.com --- blink/renderer/core/frame/rotation_viewport_anchor.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blink/renderer/core/frame/rotation_viewport_anchor.cc b/blink/renderer/core/frame/rotation_viewport_anchor.cc index c8c03e25b..9897794f1 100644 --- a/blink/renderer/core/frame/rotation_viewport_anchor.cc +++ b/blink/renderer/core/frame/rotation_viewport_anchor.cc @@ -181,9 +181,13 @@ void RotationViewportAnchor::SetAnchor() { } void RotationViewportAnchor::RestoreToAnchor() { +#if defined(OHOS_INPUT_EVENTS) + float new_page_scale_factor = old_page_scale_factor_; +#else float new_page_scale_factor = old_page_scale_factor_ / old_minimum_page_scale_factor_ * page_scale_constraints_set_->FinalConstraints().minimum_scale; +#endif new_page_scale_factor = page_scale_constraints_set_->FinalConstraints().ClampToConstraints( new_page_scale_factor); -- Gitee