From e46e2276aa486d1fb5c2dee4146a8b63511e4368 Mon Sep 17 00:00:00 2001 From: yjliu Date: Mon, 18 Oct 2021 04:30:54 +0000 Subject: [PATCH] [wayland] removed pending initial bounds for popup. Removed |pending_initial_bounds_px_| which was no longer in use. Bug: n/a Change-Id: I098b1f8a4c18eff73f08697c1f06cc626a01cbf5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3227775 Commit-Queue: Alexander Dunaev Auto-Submit: Jun Liu Reviewed-by: Alexander Dunaev Cr-Commit-Position: refs/heads/main@{#932414} --- ui/ozone/platform/wayland/host/wayland_popup.cc | 6 +----- ui/ozone/platform/wayland/host/wayland_popup.h | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ui/ozone/platform/wayland/host/wayland_popup.cc b/ui/ozone/platform/wayland/host/wayland_popup.cc index b3faa8ebbdcc15..abf130d608b623 100644 --- a/ui/ozone/platform/wayland/host/wayland_popup.cc +++ b/ui/ozone/platform/wayland/host/wayland_popup.cc @@ -37,11 +37,7 @@ WaylandPopup::~WaylandPopup() = default; bool WaylandPopup::CreateShellPopup() { DCHECK(parent_window() && !shell_popup_); - // Set pending initial bounds and notify the delegate. - if (!pending_initial_bounds_px_.IsEmpty()) { - SetBounds(pending_initial_bounds_px_); - pending_initial_bounds_px_ = gfx::Rect(); - } else if (window_scale() != parent_window()->window_scale()) { + if (window_scale() != parent_window()->window_scale()) { // If scale changed while this was hidden (when WaylandPopup hides, parent // window's child is reset), update buffer scale accordingly. UpdateWindowScale(true); diff --git a/ui/ozone/platform/wayland/host/wayland_popup.h b/ui/ozone/platform/wayland/host/wayland_popup.h index b684ae38291ced..724da7a7bfa707 100644 --- a/ui/ozone/platform/wayland/host/wayland_popup.h +++ b/ui/ozone/platform/wayland/host/wayland_popup.h @@ -59,8 +59,6 @@ class WaylandPopup : public WaylandWindow { PlatformWindowShadowType shadow_type_ = PlatformWindowShadowType::kNone; - gfx::Rect pending_initial_bounds_px_; - // Helps to avoid reposition itself if HandlePopupConfigure was called, which // resulted in calling SetBounds. bool wayland_sets_bounds_ = false;