Closed Bug 1493081 Opened 6 years ago Closed 6 years ago

popups incorrectly placed and sized

Categories

(Core :: Widget: Gtk, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla65
Tracking Status
firefox-esr60 --- unaffected
firefox62 --- unaffected
firefox63 --- unaffected
firefox64 --- fixed
firefox65 --- verified

People

(Reporter: heycam, Assigned: jhorak)

References

Details

Attachments

(1 file, 1 obsolete file)

On my 2ppx display, I get incorrect placement and sizing of popups (they are placed at 50% of the (x, y) position I expect them to be, and have half the expected width/height). I confirmed that backing out bug 1490297 resolves the issue for me. I am not using Wayland.
Flags: needinfo?(jhorak)
FWIW I only have a single monitor setup.
Thanks for the report, what distro and its version do you have? Or what gtk version does your system have.
Flags: needinfo?(jhorak)
I am using Linux Mint 18.3 Sylvia, with libgtk-3-0 package version 3.18.9-1ubuntu3.3.
I'm not at my computer now so I can't give an GTK version but I was seeing this on Ubuntu 18.04 today with a dual monitor setup.
Using GetParentWindowScaleFactor also for the X11 led to wrong placement of the popup menus on hidpi monitors. This is because it returns always 1 instead of 2 or so on the hidpi monitors. Changing the implementaion of gtk/nsWindow code could lead to serious regressions, so we're returning to call GetDesktopToDeviceScale as it was before fix for bug 1432502 landed. Also for detecting Wayland environment we use GetNativeData(NS_NATIVE_DISPLAY) which returns nullptr in Wayland.
same thing happens to me too. I'm using gtk3 3.24.1 on Antergos Linux with resolution 3200x1800@200% scaling.
Assignee: nobody → jhorak
We've added nsIWidget::GetDesktopToDeviceScaleByScreen which will return scale factor of the newly placed window according to its position on the display. This change is to move implementation to the nsIWidget derived classes. We need that for GTK Wayland, because on the Wayland we cannot determine absolute position of the window, we need to use parent's window scale factor. For other platforms the GetDesktopToDeviceScaleByScreen is implemented in nsBaseWidget.
Keywords: checkin-needed
Attachment #9010941 - Attachment is obsolete: true
Pushed by nbeleuzu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3bc82182725e Added nsIWidget::GetDesktopToDeviceScaleByScreen for scale factor lookup by window position; r=mattwoodrow
Keywords: checkin-needed
Flags: needinfo?(jhorak)
:heycam, Can you check this binary (try build) to see if your issues were fixed?
Flags: needinfo?(cam)
With that try build I don't see any incorrect placement of popups, thanks!
Flags: needinfo?(cam)
Keywords: checkin-needed
Pushed by ebalazs@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9a3a43e8743d Added nsIWidget::GetDesktopToDeviceScaleByScreen for scale factor lookup by window position; r=mattwoodrow
Keywords: checkin-needed
Backed out for bustages on AccessibleWrap.cpp backout: https://hg.mozilla.org/integration/autoland/rev/5d7093d30ed3cb97eb09034826bfb64f4f080e0a push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=9a3a43e8743da65561b9ba4aa1f47777b6a61528&searchStr=android failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=206924815&repo=autoland&lineNumber=25244 [task 2018-10-22T08:55:57.112Z] 08:55:57 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/accessible/base' [task 2018-10-22T08:55:58.707Z] 08:55:58 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/accessible/android' [task 2018-10-22T08:55:58.707Z] 08:55:58 INFO - /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/clang/bin/clang++ --target=i686-linux-android -o AccessibleWrap.o -c -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/accessible/android -I/builds/worker/workspace/build/src/obj-firefox/accessible/android -I/builds/worker/workspace/build/src/accessible/base -I/builds/worker/workspace/build/src/accessible/generic -I/builds/worker/workspace/build/src/accessible/html -I/builds/worker/workspace/build/src/accessible/ipc -I/builds/worker/workspace/build/src/accessible/ipc/other -I/builds/worker/workspace/build/src/accessible/xul -I/builds/worker/workspace/build/src/dom/base -I/builds/worker/workspace/build/src/widget -I/builds/worker/workspace/build/src/widget/android -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/ipc/glue -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -isystem /builds/worker/workspace/build/src/android-ndk/sysroot/usr/include/i686-linux-android -isystem /builds/worker/workspace/build/src/android-ndk/sysroot/usr/include -gcc-toolchain /builds/worker/workspace/build/src/android-ndk/toolchains/x86-4.9/prebuilt/linux-x86_64 -D__ANDROID_API__=16 -Qunused-arguments -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -fno-short-enums -fno-exceptions -I/builds/worker/workspace/build/src/android-ndk/sources/cxx-stl/llvm-libc++/include -I/builds/worker/workspace/build/src/android-ndk/sources/android/support/include -I/builds/worker/workspace/build/src/android-ndk/sources/cxx-stl/llvm-libc++abi/include -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pipe -g -Oz -fno-omit-frame-pointer -funwind-tables -Werror -Wno-error=shadow -MD -MP -MF .deps/AccessibleWrap.o.pp /builds/worker/workspace/build/src/accessible/android/AccessibleWrap.cpp [task 2018-10-22T08:55:58.708Z] 08:55:58 INFO - /builds/worker/workspace/build/src/accessible/android/AccessibleWrap.cpp:334:65: error: expected unqualified-id [task 2018-10-22T08:55:58.708Z] 08:55:58 INFO - collectionInfo, "isHierarchical", java::sdk::Boolean::TRUE()); [task 2018-10-22T08:55:58.708Z] 08:55:58 INFO - ^ [task 2018-10-22T08:55:58.709Z] 08:55:58 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/unicode/umachine.h:240:18: note: expanded from macro 'TRUE' [task 2018-10-22T08:55:58.709Z] 08:55:58 INFO - # define TRUE 1 [task 2018-10-22T08:55:58.709Z] 08:55:58 INFO - ^ [task 2018-10-22T08:55:58.710Z] 08:55:58 INFO - 1 error generated. [task 2018-10-22T08:55:58.710Z] 08:55:58 INFO - /builds/worker/workspace/build/src/config/rules.mk:1126: recipe for target 'AccessibleWrap.o' failed [task 2018-10-22T08:55:58.710Z] 08:55:58 INFO - make[4]: *** [AccessibleWrap.o] Error 1 [task 2018-10-22T08:55:58.710Z] 08:55:58 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/accessible/android' [task 2018-10-22T08:55:58.711Z] 08:55:58 INFO - make[4]: *** Waiting for unfinished jobs....
Flags: needinfo?(jhorak)
Hm, there are changes in moz.build solving the android build issue: https://phabricator.services.mozilla.com/D7290 These wasn't pushed to inbound, how come? How to proceed now?
Flags: needinfo?(jhorak) → needinfo?(ncsoregi)
Flags: needinfo?(ncsoregi) → needinfo?(jhorak)
I've rewritten the patch to not touch the header files which caused the problem on Android. Hope that fix all the issues, see latest try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e4e8f6797f184a58f27512854975cee8a93fcbdf
Flags: needinfo?(jhorak)
Hope that will finally land successfully. Sorry for the trouble.
Keywords: checkin-needed
Pushed by rvandermeulen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/33523dc590fe Added nsIWidget::GetDesktopToDeviceScaleByScreen for scale factor lookup by window position; r=mattwoodrow
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Hey Cam, can you confirm that this is fixed for you now?
Flags: needinfo?(cam)
Yes, popup positions seem fine lately.
Flags: needinfo?(cam)
Based on the comment above, I will mark this bug as verified. Thank you!
Status: RESOLVED → VERIFIED
Please request Beta approval on this when you get a chance.
Flags: needinfo?(jhorak)
(In reply to Ryan VanderMeulen [:RyanVM] from comment #27) > Please request Beta approval on this when you get a chance. I don't think that's necessary. The regression has been resolved by backout of the bug 1490297. This bug actually solves the bug 1490297 by different approach.
Flags: needinfo?(jhorak)
Keywords: regression
Ah, I see. Thanks for the info.

Perhaps this bug is back or I have found another issue.

When clicking and holding on the back button, the list of previous sites is not opened in the correct location. (it open much further down)

Additionally, the right click popup menu while inside the webpage content area also opens in the incorrect location.

Running:

  • Ubuntu 19.04 (gnome-shell 3.32.1, mutter 3.32.1)
  • Firefox 67.0.1

Dual monitor: yes

Scaling: both monitors set to 100%

I have a screenshot if that helps, but can't see where to attach one.

Should this be re-opened as a regression?

Flags: needinfo?(stransky)

Scott, please file a new bug for it.

Flags: needinfo?(stransky)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: