Closed Bug 1573813 Opened 4 months ago Closed 2 months ago

[wayland][hidpi] when window moved from normal dpi to hidpi the menus are wrongly scaled

Categories

(Core :: Widget: Gtk, defect)

defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 1582679

People

(Reporter: jhorak, Assigned: jhorak)

Details

(Whiteboard: [test-isolation-backout])

Attachments

(2 obsolete files)

Steps to reproduce:
0. have hidpi and normal dpi monitor setup

  1. start firefox
  2. open main menu
  3. move the window to other monitor and open the same menu again

Result:
The menu is wrongly scaled

Reason:
This is because the hidden windows are not notified about scale changes therefore it is shown with wrong scale.

Resolution:
Use toplevel (parent) window of the menu to get valid scale factor.

For popup windows with parent we need to get scale factor of the parent
window. Because when the windows are hidden they're not receiving updates
about changing scaling factor. So when moving from normal dpi to
the hidpi monitor the newly opened popup windows will have the same scale

Pushed by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4f82f0b92629
use parent window scale factor for the popup/tooltips; r=stransky

Keywords: checkin-needed

Backed out for crashes on /browser_bookmarkProperties_folderSelection.js with crashes on @ libgobject-2.0.so.0.4800.2 + 0x348f0

backout: https://hg.mozilla.org/integration/autoland/rev/64ae9ab76db043f763982b086ecbfe6f35dc1d14

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&searchStr=linux%2Cx64%2Cdebug%2Cmochitests%2Ctest-linux64%2Fdebug-mochitest-browser-chrome-e10s-6%2Cm%28bc6%29&revision=4f82f0b92629af3ebb20dadd661c2149f3c48f8b

failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=262530462&repo=autoland&lineNumber=10942

[task 2019-08-20T18:34:39.125Z] 18:34:39 ERROR - TEST-UNEXPECTED-FAIL | browser/components/places/tests/browser/browser_bookmarkProperties_folderSelection.js | application terminated with exit code 11
[task 2019-08-20T18:34:39.126Z] 18:34:39 INFO - runtests.py | Application ran for: 0:00:25.360105
[task 2019-08-20T18:34:39.126Z] 18:34:39 INFO - zombiecheck | Reading PID log: /tmp/tmpSmXKmdpidlog
[task 2019-08-20T18:34:39.127Z] 18:34:39 INFO - ==> process 3118 launched child process 3136
[task 2019-08-20T18:34:39.127Z] 18:34:39 INFO - ==> process 3118 launched child process 3167
[task 2019-08-20T18:34:39.127Z] 18:34:39 INFO - ==> process 3118 launched child process 3190
[task 2019-08-20T18:34:39.128Z] 18:34:39 INFO - ==> process 3118 launched child process 3243
[task 2019-08-20T18:34:39.128Z] 18:34:39 INFO - ==> process 3118 launched child process 3271
[task 2019-08-20T18:34:39.128Z] 18:34:39 INFO - ==> process 3118 launched child process 3302
[task 2019-08-20T18:34:39.128Z] 18:34:39 INFO - ==> process 3118 launched child process 3323
[task 2019-08-20T18:34:39.130Z] 18:34:39 INFO - ==> process 3118 launched child process 3350
[task 2019-08-20T18:34:39.130Z] 18:34:39 INFO - ==> process 3118 launched child process 3371
[task 2019-08-20T18:34:39.131Z] 18:34:39 INFO - ==> process 3118 launched child process 3397
[task 2019-08-20T18:34:39.131Z] 18:34:39 INFO - zombiecheck | Checking for orphan process with PID: 3136
[task 2019-08-20T18:34:39.132Z] 18:34:39 INFO - zombiecheck | Checking for orphan process with PID: 3397
[task 2019-08-20T18:34:39.132Z] 18:34:39 INFO - zombiecheck | Checking for orphan process with PID: 3371
[task 2019-08-20T18:34:39.132Z] 18:34:39 INFO - zombiecheck | Checking for orphan process with PID: 3350
[task 2019-08-20T18:34:39.133Z] 18:34:39 INFO - zombiecheck | Checking for orphan process with PID: 3302
[task 2019-08-20T18:34:39.133Z] 18:34:39 INFO - zombiecheck | Checking for orphan process with PID: 3271
[task 2019-08-20T18:34:39.133Z] 18:34:39 INFO - zombiecheck | Checking for orphan process with PID: 3243
[task 2019-08-20T18:34:39.134Z] 18:34:39 INFO - zombiecheck | Checking for orphan process with PID: 3190
[task 2019-08-20T18:34:39.135Z] 18:34:39 INFO - zombiecheck | Checking for orphan process with PID: 3323
[task 2019-08-20T18:34:39.135Z] 18:34:39 INFO - zombiecheck | Checking for orphan process with PID: 3167
[task 2019-08-20T18:34:39.136Z] 18:34:39 INFO - mozcrash Copy/paste: /builds/worker/workspace/build/linux64-minidump_stackwalk /tmp/tmphQJ7oQ.mozrunner/minidumps/70fcf16f-3abc-ad18-5c60-9706da586e71.dmp /builds/worker/workspace/build/symbols
[task 2019-08-20T18:34:45.595Z] 18:34:45 INFO - mozcrash Saved minidump as /builds/worker/workspace/build/blobber_upload_dir/70fcf16f-3abc-ad18-5c60-9706da586e71.dmp
[task 2019-08-20T18:34:45.595Z] 18:34:45 INFO - mozcrash Saved app info as /builds/worker/workspace/build/blobber_upload_dir/70fcf16f-3abc-ad18-5c60-9706da586e71.extra
[task 2019-08-20T18:34:45.749Z] 18:34:45 INFO - PROCESS-CRASH | browser/components/places/tests/browser/browser_bookmarkProperties_folderSelection.js | application crashed [@ libgobject-2.0.so.0.4800.2 + 0x348f0]

Flags: needinfo?(jhorak)

Other crashes: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=262547229&repo=autoland&lineNumber=28508

[task 2019-08-20T20:45:40.925Z] 20:45:40 INFO - REFTEST PROCESS-CRASH | file:///builds/worker/workspace/build/tests/reftest/tests/xpcom/string/crashtests/1113005.html (finished) | application crashed [@ g_type_check_instance_cast + 0x20]

I see, thanks. Looks like mToplevelParentWindow may not always have valid GdkWindow and gtk_widget_get_window() returns nullptr (may it be already deleted?).

Whiteboard: [test-isolation-backout]
Flags: needinfo?(jhorak)
Keywords: checkin-needed

Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9b5ceca1eedf
use parent window scale factor for the popup/tooltips; r=stransky

Keywords: checkin-needed
Backout by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3b09fca43df9
Backed out changeset 9b5ceca1eedf for failures at /crashtests/1113005.html on a CLOSED TREE.

Backed out changeset 9b5ceca1eedf (bug 1573813) for failures at /crashtests/1113005.html on a CLOSED TREE.

Backout link: https://hg.mozilla.org/integration/autoland/rev/3b09fca43df93b0f2ba1a1ada33053f504dfea16

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&failure_classification_id=2&revision=9b5ceca1eedf6bbaddee2a67bf027db5c7b90404&selectedJob=263862267

Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=263862267&repo=autoland&lineNumber=122764

Log snippet:
[task 2019-08-28T13:32:08.989Z] 13:32:08 INFO - [Child 1159, Chrome_ChildThread] WARNING: pipe error (3): Connection reset by peer: file /builds/worker/workspace/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 358
[task 2019-08-28T13:32:08.992Z] 13:32:08 INFO - Exiting due to channel error.
[task 2019-08-28T13:32:08.992Z] 13:32:08 INFO - [RDD 1216, Main Thread] WARNING: Shutting down RDD process early due to a crash!: file /builds/worker/workspace/build/src/dom/media/ipc/RDDParent.cpp, line 209
[task 2019-08-28T13:32:08.994Z] 13:32:08 INFO - Exiting due to channel error.
[task 2019-08-28T13:32:09.076Z] 13:32:09 ERROR - TEST-UNEXPECTED-FAIL | file:///builds/worker/workspace/build/tests/reftest/tests/xpcom/string/crashtests/1113005.html (finished) | application terminated with exit code 11
[task 2019-08-28T13:32:09.077Z] 13:32:09 INFO - REFTEST INFO | Copy/paste: /builds/worker/workspace/build/linux64-minidump_stackwalk /tmp/tmpdtxKX_.mozrunner/minidumps/7ef34d2a-d398-da3d-84f3-b61453bd2b1c.dmp /builds/worker/workspace/build/symbols
[task 2019-08-28T13:32:14.767Z] 13:32:14 INFO - REFTEST INFO | Saved minidump as /builds/worker/workspace/build/blobber_upload_dir/7ef34d2a-d398-da3d-84f3-b61453bd2b1c.dmp
[task 2019-08-28T13:32:14.767Z] 13:32:14 INFO - REFTEST INFO | Saved app info as /builds/worker/workspace/build/blobber_upload_dir/7ef34d2a-d398-da3d-84f3-b61453bd2b1c.extra
[task 2019-08-28T13:32:14.931Z] 13:32:14 INFO - REFTEST PROCESS-CRASH | file:///builds/worker/workspace/build/tests/reftest/tests/xpcom/string/crashtests/1113005.html (finished) | application crashed [@ libgobject-2.0.so.0.4800.2 + 0x348f0]
[task 2019-08-28T13:32:14.931Z] 13:32:14 INFO - Crash dump filename: /tmp/tmpdtxKX_.mozrunner/minidumps/7ef34d2a-d398-da3d-84f3-b61453bd2b1c.dmp
[task 2019-08-28T13:32:14.931Z] 13:32:14 INFO - Operating system: Linux
[task 2019-08-28T13:32:14.932Z] 13:32:14 INFO - 0.0.0 Linux 4.4.0-1014-aws #14taskcluster1-Ubuntu SMP Tue Apr 3 10:27:00 UTC 2018 x86_64
[task 2019-08-28T13:32:14.932Z] 13:32:14 INFO - CPU: amd64
[task 2019-08-28T13:32:14.932Z] 13:32:14 INFO - family 6 model 85 stepping 4
[task 2019-08-28T13:32:14.932Z] 13:32:14 INFO - 1 CPU
[task 2019-08-28T13:32:14.933Z] 13:32:14 INFO -
[task 2019-08-28T13:32:14.933Z] 13:32:14 INFO - GPU: UNKNOWN
[task 2019-08-28T13:32:14.934Z] 13:32:14 INFO -
[task 2019-08-28T13:32:14.934Z] 13:32:14 INFO - Crash reason: SIGSEGV /0x00000080
[task 2019-08-28T13:32:14.934Z] 13:32:14 INFO - Crash address: 0x0
[task 2019-08-28T13:32:14.934Z] 13:32:14 INFO - Process uptime: not available
[task 2019-08-28T13:32:14.934Z] 13:32:14 INFO -
[task 2019-08-28T13:32:14.934Z] 13:32:14 INFO - Thread 0 (crashed)
[task 2019-08-28T13:32:14.934Z] 13:32:14 INFO - 0 libgobject-2.0.so.0.4800.2 + 0x348f0
[task 2019-08-28T13:32:14.934Z] 13:32:14 INFO - rax = 0x00007f2912af4350 rdx = 0x00007f2912b00020
[task 2019-08-28T13:32:14.934Z] 13:32:14 INFO - rcx = 0x0000000000000000 rbx = 0x00007f28e948f630
[task 2019-08-28T13:32:14.934Z] 13:32:14 INFO - rsi = 0x00007f2912af4350 rdi = 0x00007f28e948f630
[task 2019-08-28T13:32:14.935Z] 13:32:14 INFO - rbp = 0x00007ffd29288990 rsp = 0x00007ffd29288940
[task 2019-08-28T13:32:14.935Z] 13:32:14 INFO - r8 = 0x0000000000000000 r9 = 0x00000000000001c5
[task 2019-08-28T13:32:14.935Z] 13:32:14 INFO - r10 = 0xe5e5e5e5e5e5e5e5 r11 = 0x0000000000000000
[task 2019-08-28T13:32:14.935Z] 13:32:14 INFO - r12 = 0x00007ffd292889b0 r13 = 0x00007f28ec335190
[task 2019-08-28T13:32:14.935Z] 13:32:14 INFO - r14 = 0x00000000000000ad r15 = 0x00007f28e2393800
[task 2019-08-28T13:32:14.935Z] 13:32:14 INFO - rip = 0x00007f290ee208f0
[task 2019-08-28T13:32:14.935Z] 13:32:14 INFO - Found by: given as instruction pointer in context
[task 2019-08-28T13:32:14.935Z] 13:32:14 INFO - 1 libxul.so!nsWindow::GetScreenBounds() [nsWindow.cpp:9b5ceca1eedf6bbaddee2a67bf027db5c7b90404 : 1629 + 0xf]
[task 2019-08-28T13:32:14.935Z] 13:32:14 INFO - rbp = 0x00007ffd292889e0 rsp = 0x00007ffd292889a0
[task 2019-08-28T13:32:14.935Z] 13:32:14 INFO - rip = 0x00007f2902d87faf
[task 2019-08-28T13:32:14.935Z] 13:32:14 INFO - Found by: previous frame's frame pointer

Flags: needinfo?(jhorak)

For popup windows with parent we need to get scale factor of the parent
window. Because when the windows are hidden they're not receiving updates
about changing scaling factor. So when moving from normal dpi to
the hidpi monitor the newly opened popup windows will have the same scale.

Attachment #9085424 - Attachment is obsolete: true
Keywords: checkin-needed

Pushed by rmaries@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/84302aebbe43
use parent window scale factor for the popup/tooltips; r=stransky

Keywords: checkin-needed
Backout by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/259ebccb8ae8
Backed out changeset 84302aebbe43 for failing mochitest jobs on a CLOSED TREE.

Backed out changeset 84302aebbe43 (bug 1573813) for failing mochitest jobs on a CLOSED TREE.

Backout link: https://hg.mozilla.org/integration/autoland/rev/259ebccb8ae8529c35098445b1583bdbba403f78

**Push with failures:**https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=266338185&resultStatus=testfailed%2Cbusted%2Cexception&revision=84302aebbe43e2ed1ebb9201ca76b11aa5650599

Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=266338185&repo=autoland&lineNumber=4854

Log snippet:
[task 2019-09-12T15:17:37.268Z] 15:17:37 INFO - Extension loaded
[task 2019-09-12T15:17:37.268Z] 15:17:37 INFO - Extension loaded
[task 2019-09-12T15:17:37.268Z] 15:17:37 INFO - Console message: Warning: attempting to write 6469 bytes to preference extensions.webextensions.uuids. This is bad for general performance and memory usage. Such an amount of data should rather be written to an external file. This preference will not be sent to any content processes.
[task 2019-09-12T15:17:37.269Z] 15:17:37 INFO - Console message: Warning: attempting to write 6567 bytes to preference extensions.webextensions.uuids. This is bad for general performance and memory usage. Such an amount of data should rather be written to an external file. This preference will not be sent to any content processes.
[task 2019-09-12T15:17:37.269Z] 15:17:37 INFO - Buffered messages logged at 15:17:34
[task 2019-09-12T15:17:37.269Z] 15:17:37 INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "moz-extension://aff17419-d3b0-4dcb-9bc3-de7af31d579b/ext2.html" line: 0}]
[task 2019-09-12T15:17:37.271Z] 15:17:37 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_chrome_settings_overrides_home.js | ext2 is in control -
[task 2019-09-12T15:17:37.271Z] 15:17:37 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_chrome_settings_overrides_home.js | The extension name is in the popup -
[task 2019-09-12T15:17:37.271Z] 15:17:37 INFO - Buffered messages logged at 15:17:35
[task 2019-09-12T15:17:37.271Z] 15:17:37 INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "moz-extension://fc7078dd-816d-42a3-aa3e-bc664074e0ee/ext1.html" line: 0}]
[task 2019-09-12T15:17:37.272Z] 15:17:37 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_chrome_settings_overrides_home.js | ext1 is in control -
[task 2019-09-12T15:17:37.272Z] 15:17:37 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_chrome_settings_overrides_home.js | The extension name is in the popup -
[task 2019-09-12T15:17:37.272Z] 15:17:37 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_chrome_settings_overrides_home.js | The homepage is still the set -
[task 2019-09-12T15:17:37.272Z] 15:17:37 INFO - Console message: Warning: attempting to write 6510 bytes to preference extensions.webextensions.uuids. This is bad for general performance and memory usage. Such an amount of data should rather be written to an external file. This preference will not be sent to any content processes.
[task 2019-09-12T15:17:37.274Z] 15:17:37 INFO - Console message: Warning: attempting to write 6412 bytes to preference extensions.webextensions.uuids. This is bad for general performance and memory usage. Such an amount of data should rather be written to an external file. This preference will not be sent to any content processes.
[task 2019-09-12T15:17:37.274Z] 15:17:37 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_chrome_settings_overrides_home.js | The confirmation is cleaned up on uninstall -
[task 2019-09-12T15:17:37.274Z] 15:17:37 INFO - Leaving test bound test_doorhanger_new_window
[task 2019-09-12T15:17:37.274Z] 15:17:37 INFO - Entering test bound test_overriding_home_page_incognito_not_allowed
[task 2019-09-12T15:17:37.274Z] 15:17:37 INFO - Extension loaded
[task 2019-09-12T15:17:37.275Z] 15:17:37 INFO - Console message: Warning: attempting to write 6510 bytes to preference extensions.webextensions.uuids. This is bad for general performance and memory usage. Such an amount of data should rather be written to an external file. This preference will not be sent to any content processes.
[task 2019-09-12T15:17:37.275Z] 15:17:37 INFO - Buffered messages logged at 15:17:36
[task 2019-09-12T15:17:37.275Z] 15:17:37 INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "moz-extension://6b5e2519-3589-4a20-b5d5-cc31134cbedf/home.html" line: 0}]
[task 2019-09-12T15:17:37.277Z] 15:17:37 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_chrome_settings_overrides_home.js | The extension name is in the popup -
[task 2019-09-12T15:17:37.277Z] 15:17:37 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_chrome_settings_overrides_home.js | The expected popup notification is visible -
[task 2019-09-12T15:17:37.277Z] 15:17:37 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_chrome_settings_overrides_home.js | extension is in control -
[task 2019-09-12T15:17:37.277Z] 15:17:37 INFO - Buffered messages finished
[task 2019-09-12T15:17:37.277Z] 15:17:37 ERROR - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_chrome_settings_overrides_home.js | application terminated with exit code 11
[task 2019-09-12T15:17:37.279Z] 15:17:37 INFO - runtests.py | Application ran for: 0:01:36.032082
[task 2019-09-12T15:17:37.279Z] 15:17:37 INFO - zombiecheck | Reading PID log: /tmp/tmpqzhes8pidlog
[task 2019-09-12T15:17:37.279Z] 15:17:37 INFO - ==> process 1151 launched child process 1169
[task 2019-09-12T15:17:37.279Z] 15:17:37 INFO - ==> process 1151 launched child process 1204
[task 2019-09-12T15:17:37.279Z] 15:17:37 INFO - ==> process 1151 launched child process 1227
[task 2019-09-12T15:17:37.279Z] 15:17:37 INFO - ==> process 1151 launched child process 1280

Flags: needinfo?(jhorak)
Whiteboard: [test-isolation-backout] → [test isolation backout]
Whiteboard: [test isolation backout] → [test-isolation-backout]
Attachment #9092316 - Attachment is obsolete: true

This should be fixed by bug 1582679.

Flags: needinfo?(jhorak)
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1582679
You need to log in before you can comment on or make changes to this bug.