mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-03-04 19:58:43 +01:00
43 lines
2.0 KiB
Diff
43 lines
2.0 KiB
Diff
|
diff --git ui/display/screen.cc ui/display/screen.cc
|
||
|
index b74a058c4034e..441ccadf6a729 100644
|
||
|
--- ui/display/screen.cc
|
||
|
+++ ui/display/screen.cc
|
||
|
@@ -107,13 +107,13 @@ base::TimeDelta Screen::CalculateIdleTime() const {
|
||
|
gfx::Rect Screen::ScreenToDIPRectInWindow(gfx::NativeWindow window,
|
||
|
const gfx::Rect& screen_rect) const {
|
||
|
float scale = GetDisplayNearestWindow(window).device_scale_factor();
|
||
|
- return ScaleToEnclosingRect(screen_rect, 1.0f / scale);
|
||
|
+ return ScaleToEnclosedRect(screen_rect, 1.0f / scale);
|
||
|
}
|
||
|
|
||
|
gfx::Rect Screen::DIPToScreenRectInWindow(gfx::NativeWindow window,
|
||
|
const gfx::Rect& dip_rect) const {
|
||
|
float scale = GetDisplayNearestWindow(window).device_scale_factor();
|
||
|
- return ScaleToEnclosingRect(dip_rect, scale);
|
||
|
+ return ScaleToEnclosedRect(dip_rect, scale);
|
||
|
}
|
||
|
|
||
|
bool Screen::GetDisplayWithDisplayId(int64_t display_id,
|
||
|
diff --git ui/display/win/screen_win.cc ui/display/win/screen_win.cc
|
||
|
index 1bddf0a8b84b4..da4b443f5f5a9 100644
|
||
|
--- ui/display/win/screen_win.cc
|
||
|
+++ ui/display/win/screen_win.cc
|
||
|
@@ -580,7 +580,7 @@ gfx::Rect ScreenWin::ScreenToDIPRect(HWND hwnd, const gfx::Rect& pixel_bounds) {
|
||
|
gfx::PointF(pixel_bounds.origin()), screen_win_display));
|
||
|
const float scale_factor =
|
||
|
1.0f / screen_win_display.display().device_scale_factor();
|
||
|
- return {origin, ScaleToEnclosingRect(pixel_bounds, scale_factor).size()};
|
||
|
+ return {origin, ScaleToEnclosedRect(pixel_bounds, scale_factor).size()};
|
||
|
}
|
||
|
|
||
|
// static
|
||
|
@@ -595,7 +595,7 @@ gfx::Rect ScreenWin::DIPToScreenRect(HWND hwnd, const gfx::Rect& dip_bounds) {
|
||
|
const gfx::Point origin =
|
||
|
display::win::DIPToScreenPoint(dip_bounds.origin(), screen_win_display);
|
||
|
const float scale_factor = screen_win_display.display().device_scale_factor();
|
||
|
- return {origin, ScaleToEnclosingRect(dip_bounds, scale_factor).size()};
|
||
|
+ return {origin, ScaleToEnclosedRect(dip_bounds, scale_factor).size()};
|
||
|
}
|
||
|
|
||
|
// static
|