Skip to content
Commit 21054d08 authored by Antonio Gomes's avatar Antonio Gomes Committed by Chromium LUCI CQ
Browse files

[ozone/wayland] Standardize calls to gfx::ScaleToEnclosingRectIgnoringError()

The predecessor CL [1] changed how gfx::ScaleToEnclosingRectIgnoringError() is called in both
WaylandWindow::RequestState() and WaylandPopup::OnInitialize(),
when setting the value of PlatformWindowDelegate::State::size_px :

  Now, instead of passing PlatformWindowDelegate::State::bounds_dip
  rect as parameter to gfx::ScaleToEnclosingRectIgnoringError(), only
  PlatformWindowDelegate::State::bounds_dip's size is used (see
  comment message of [1] for details).

This is follow up CL that also applies the same logic in the newly
added [2] WaylandBubble::OnInitialize() method. In practice, it won't
change any behavior, since WaylandWindow::RequestState() is usually
called after WaylandBubble::OnInitialize(), and `size_px` value is
"fixed" there. Nonetheless, it is good to have consistency.

[1] https://crrev.com/c/5384752
[2] https://crrev.com/c/5301619

R=msisov@igalia.com

Bug: 40876438
Change-Id: I253c6872a12ca63e258dfd064c1767d8983f2eb0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5419514


Reviewed-by: default avatarMaksim Sisov <msisov@igalia.com>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1282370}
parent b7f2ffa3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment