Bug 1603579 [Linux] Use DevicePixelsToGdkCoordRoundUp() to calculate un-scaled coordinates, r=jhorak

this one depends on https://phabricator.services.mozilla.com/D56999 which needs to be landed first.

Differential Revision: https://phabricator.services.mozilla.com/D57000

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Martin Stransky 2019-12-13 07:48:59 +00:00
Родитель be17f712d1
Коммит 9a2b0f2ed2
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -4821,9 +4821,8 @@ void nsWindow::UpdateOpaqueRegion(const LayoutDeviceIntRegion& aOpaqueRegion) {
gtk_window_get_window_type(GTK_WINDOW(mShell)) == GTK_WINDOW_POPUP);
}
int scale = GdkScaleFactor();
int width = mBounds.width / scale;
int height = mBounds.height / scale;
int width = DevicePixelsToGdkCoordRoundDown(mBounds.width);
int height = DevicePixelsToGdkCoordRoundDown(mBounds.height);
cairo_rectangle_int_t rect = {decorationSize.left, decorationSize.top,
width, height};
@ -7642,9 +7641,8 @@ GtkTextDirection nsWindow::GetTextDirection() {
void nsWindow::LockAspectRatio(bool aShouldLock) {
if (aShouldLock) {
gint scale = GdkScaleFactor();
float width = (float)mBounds.Width() / scale;
float height = (float)mBounds.Height() / scale;
float width = (float)DevicePixelsToGdkCoordRoundDown(mBounds.width);
float height = (float)DevicePixelsToGdkCoordRoundDown(mBounds.height);
if (mCSDSupportLevel == CSD_SUPPORT_CLIENT) {
GtkBorder decorationSize = GetCSDDecorationSize(