Commit Graph

1271 Commits

Author SHA1 Message Date
decltype
a67756af6a Bug 1134077 - X11: Set EWMH property to keep top-level nsWindows composited. r=karlt
Some compositors such as GNOME mutter use heuristics to unredirect fullscreen
windows in an effort to reduce output latency. This works fine for applications
that take the proper steps to ensure all framebuffer updates happen in the
vblank interval. Since this is not currently the case for Firefox, bypassing
the compositor will lead to frame tearing.

Set _NET_WM_BYPASS_COMPOSITOR to 2 to opt out of fullscreen unredirection.

MozReview-Commit-ID: 1xW2VAnbiJw

--HG--
extra : rebase_source : 77c4ae490413057d8d9dadf9b155c86ddbbcb4b5
2018-02-02 18:39:37 +01:00
Martin Stransky
fe3d3e4f1e Bug 1435244 - don't call wl_display_roundtrip_queue() with null wl_queue but rather use wl_display_roundtrip(), r=jhorak
MozReview-Commit-ID: BQzAuCFJgBS

--HG--
extra : rebase_source : 1cbcb7e71e56025b35659a7ec3ebe967739bbeec
2018-02-02 14:42:32 +01:00
Martin Stransky
299c2a6d50 Bug 1433863 - Use client titlebar decorations on GNOME Flashback (former fallback) DE, r=jhorak
Also comment existing entries at nsWindow::GetCSDSupportLevel().

MozReview-Commit-ID: 1YzZhv7WrQj

--HG--
extra : rebase_source : c1dd1a3452e13e2479afee3c34d396757dae4cfd
2018-01-29 15:31:59 +01:00
Martin Stransky
98ca29f1fb Bug 1434202 - [Wayland] Set popups as app paintable on Wayland as we paint them ourself there, r=jhorak
MozReview-Commit-ID: 9kpovSmmZss

--HG--
extra : rebase_source : 0a4393b890bf2a499e3a69eba507d0714d13cdd0
2018-01-30 10:36:24 +01:00
Martin Stransky
afa356a144 Bug 1408335 - Render titlebar icons as themed ones, r=jhorak
Render titlebar button icons as a part of -moz-window-button-* appearence. It allows us to
theme the icons accordingly. We add a GtkImage widget to header bar buttons as Gtk+ does and
store icon pixel data there and render it at moz_gtk_header_bar_button_paint() as a part
of the buttons. It means that the toolbar buttons are not containers and
moz_gtk_get_widget_border() returns zero border for them.

Also implement GetToolbarButtonMetrics() per button.

MozReview-Commit-ID: gkAu3VmE3q

--HG--
extra : rebase_source : d1df34537901342969d1e33524b414a2786df541
2018-01-25 11:13:12 +01:00
Martin Stransky
db7fdb4a6d Bug 1433869 - Disable CSD titlebar mode on untested/unknown systems for Release/Beta, r=jhorak
MozReview-Commit-ID: JRF0BAbtkRN

--HG--
extra : rebase_source : 42f68009ca1dafcd71ca9dacb33eeec98e598178
2018-01-29 11:35:31 +01:00
Martin Stransky
e954424179 Bug 1432385 - Use window manager borders on LXQt, r=jhorak
MozReview-Commit-ID: JkyBMBovCIG

--HG--
extra : rebase_source : b993e7d679b8fecbfa1fdf09f4edbb8804a5a7d1
2018-01-25 15:52:06 +01:00
Martin Stransky
6000bcea15 Bug 1431049 - don't crash when keyboard is not present, based on patch by Takuro Ashie. r=jhorak
MozReview-Commit-ID: 4o7P8Dzui22

--HG--
extra : rebase_source : 41406951fe82f357c5a743958b4942e45f1c355a
2018-01-19 10:08:48 +01:00
Martin Stransky
0594ae2db5 Bug 1427999 - Use GetToolbarButtonMetrics() to get correct titlebar button size at nsNativeThemeGTK::GetMinimumWidgetSize, r=jhorak
MozReview-Commit-ID: HfPUk30LaJn

--HG--
extra : rebase_source : ef406e78e686a6ae190a0fbdb9aa945e40503ac6
2018-01-22 12:09:09 +01:00
Martin Stransky
e77fe4bfe2 Bug 1427999 - Implement GetToolbarButtonMetrics() to get titlebar button size and border, r=jhorak
Titlebar button on Gtk+ >= 3.20 can have defined its size as min-width and min-height
and can leave CSS styles border/padding empty. To render the button icon at center we need to
calculate button widget border from gap between icon and button.

This is done by GetToolbarButtonMetrics() which also stores final values to
ToolbarButtonGTKMetrics cache.

MozReview-Commit-ID: 5sMJATWHUNX

--HG--
extra : rebase_source : b0bda7c78106088a819b98c197cbb0cd099e47df
2018-01-22 12:14:13 +01:00
Noemi Erli
a111747a97 Backed out 2 changesets (bug 1431337) for M15 failures in parser/htmlparser/tests/mochitest/test_img_picture_preload.html on a CLOSED TREE
Backed out changeset c70e75e993fc (bug 1431337)
Backed out changeset 016f4ce0803b (bug 1431337)
2018-01-24 18:09:50 +02:00
Jan Horak
e5a072e76a Bug 1431337 Scale widget size to the current monitor, not the first one; r=stransky
We need to use scaling factor of the monitor on which application is actually positioned.
Previously we used ScreenHelperGTK::GetGTKMonitorScaleFactor() which use the first monitor.
This does not work on hidpi+normal dpi monitors setup.

MozReview-Commit-ID: 1dVYOe48tPJ

--HG--
extra : rebase_source : af804d3104da91be459b219b261949d84b4f7c26
2018-01-18 11:52:59 +01:00
Jan Horak
14cc9080e2 Bug 1431337 - Scale font for the actual monitor, not the first one; r=stransky
The GetSystemFontInfo() cannot return scaled value of the font by default monitor
scale factor. We need to scale it in nsLookAndFeel::GetFontImpl
by aDevPixPerCSSPixel like implementation for Windows does.

MozReview-Commit-ID: 5okD8vUu9UK

--HG--
extra : rebase_source : 39f3dec4acd434501860a8b716a42c45aadf3b61
2018-01-18 11:10:18 +01:00
Martin Stransky
0cd098101c Bug 1432414 - Use gtk_get_current_event_time() instead of gdk_x11_display_get_user_time() on Wayland, r=jhorak
Emulate what gtk+/gtkwindow.c gtk_window_present_with_time() does - use gdk_x11_display_get_user_time() on X11
and gtk_get_current_event_time() on Wayland to get event timestamp.

MozReview-Commit-ID: GEU6ZrQxq6v

--HG--
extra : rebase_source : db2f3ac03ae4ec9f9c1655cf682bff60a96dd3da
2018-01-23 11:01:11 +01:00
Martin Stransky
051d31ae00 Bug 1431052 - Don't crash when mContainer is missing (GdkWindow is hidden for instance), r=jhorak
Original patch author is Takuro Ashie.

MozReview-Commit-ID: 9nJmELBxSTA

--HG--
extra : rebase_source : 023b909a2888effaf2c40fa578f2c68ab6f1e0f1
2018-01-18 15:01:30 +01:00
Lee Salzman
a9ae481da3 Bug 1418361 - push GTK window background color rect for WR. r=nical
MozReview-Commit-ID: DUiFHtFGwQF
2018-01-22 08:01:09 -05:00
Hiroyuki Ikezoe
052a0b70ad Bug 1431295 - Include "X11UndefineNone.h" after including gdx.h in nsWindow.h. r=botond
MozReview-Commit-ID: 9SumgYc5pNE

--HG--
extra : rebase_source : 1fa191d22d7c2b5d696aeaff0e6a44dabd59e585
2018-01-18 14:12:51 +09:00
Jan Horak
e55996cc86 Bug 1411579 - add system handler when Firefox runs in flatpak; r=stransky
Firefox in Flatpak sandboxed environment does not get the list
of installed applications on the system because application should
know about the environment as little as possible. Introducing
nsFlatpakHandlerApp which forwards requests for opening downloaded files
to the system by utilizing gtk_show_uri fuction.

This changeset also removes nsIGIOMimeApp::Launch method from the interface
because it can be fully replaced with LaunchWithUri from nsIHandlerApp
interface.

The TMPDIR where files are downloaded when user choose to open them
needs to be accessible from sandbox and host. The default settings
TMPDIR=/tmp is accessible only to the sandbox.

To workaround for is to set TMPDIR environment variable to
$XDG_CACHE_HOME/tmp before executing Firefox.

MozReview-Commit-ID: CSBv0QcETpd

--HG--
extra : rebase_source : 8155c33fa9c402d2668bdfb07094ba6758fe6203
2018-01-12 16:32:53 +01:00
Martin Stransky
86a6393324 Bug 1420818 - For rendering to titlebar make CSD window decorations mode default, enable WM decorations on Elementary OS, r=jhorak
MozReview-Commit-ID: FhF53Z34JS6

--HG--
extra : rebase_source : c3c4dd0700d36b6f58b287195dcb9e1543ce4c3e
2018-01-12 08:41:00 +01:00
Martin Stransky
eadbb73d1e Bug 1430725 - Undefine X11 None at ScreenHelperGTK.h as it conflicts our JS code, r=jhorak
MozReview-Commit-ID: AZr8GuPb8wx

--HG--
extra : rebase_source : 93d85a871f450e425e8dfe352c140195e3eec5c1
2018-01-16 10:09:36 +01:00
Martin Stransky
2f4754864f Bug 1430725 - Include nsClipboardWayland.cpp to wayland build, r=jhorak
MozReview-Commit-ID: 6P6AHs1bWhs

--HG--
extra : rebase_source : 158100293fe265bc961cfb88e62f4d8ac7a8ec1d
2018-01-16 10:08:25 +01:00
Martin Stransky
fc7143cd51 Bug 1430725 - dlsym gdk_wayland_display_get_wl_display() function, r=jhorak
MozReview-Commit-ID: 7TBNP1Q1YyO

--HG--
extra : rebase_source : 6ae7f8dc9359bc57a2173999ffd33e1091b3e818
2018-01-16 10:07:45 +01:00
Martin Stransky
400e666940 Bug 1430725 - Use mozilla::widget namespace explicitly for ScreenHelperGTK::GetGTKMonitorScaleFactor() call, r=jhorak
MozReview-Commit-ID: 9rqYsZTdwRC

--HG--
extra : rebase_source : 14001be1eeec358c9082f2747bea49ed4b52988e
2018-01-16 10:07:03 +01:00
Martin Stransky
ecb1224028 Bug 1430728 - [Wayland] - position wl_subsurface when attached GtkWidget allocation changes, r=jhorak
MozReview-Commit-ID: 1q3XIouxavQ

--HG--
extra : rebase_source : 59fcb138c55fe1250b26c4e1ec120a14c8c4c4ad
2018-01-16 10:26:58 +01:00
Martin Stransky
2b78638c46 Bug 1417933 - enable CSD titlebar rendering mode on Unity desktop, r=jhorak
MozReview-Commit-ID: AWKJWnsrb7i

--HG--
extra : rebase_source : 5408017b0852cdabc42103c9352d6333df60799b
2018-01-09 11:31:40 +01:00
Martin Stransky
31b29e4907 Bug 1417933 - enable CSD titlebar rendering mode as Bug 1424974 regression is fixed, r=jhorak
MozReview-Commit-ID: 7SCjbJr9Arl

--HG--
extra : rebase_source : 0d6f4d24e182eaecd7f6290d800a8e43e0241dc0
2018-01-09 11:27:34 +01:00
Martin Stransky
e3eeda85f0 Bug 1430018 - dlsym gdk_wayland_* routines as those are available at Gtk+ > 3.8, r=jhorak
MozReview-Commit-ID: EUgmc9QNeoI

--HG--
extra : rebase_source : 9be69563a2b6c25eb5e593bee7bdd48e92af0c8c
2018-01-12 13:22:48 +01:00
Martin Stransky
2f65f5a5ab Bug 1430018 - Add namespace mozilla::widget to nsNativeThemeGTK.cpp as it's needed by ScreenHelperGTK, r=jhorak
MozReview-Commit-ID: HG7Zt0LaOU8

--HG--
extra : rebase_source : cf4bf90241461a9cee3352abda93aec9efe3b6ca
2018-01-12 12:40:14 +01:00
Martin Stransky
194159f24b Bug 1430018 - Don't call gdk_flush() from expose event on Wayland as it crashes Gtk+ (Gnome BZ #773307), r=jhorak
MozReview-Commit-ID: EmwcG3VzHYn

--HG--
extra : rebase_source : 145821841dfc40002b1a951f2a2f453714cee9de
2018-01-12 11:07:23 +01:00
Martin Stransky
ff73291729 Bug 1430018 - Don't use gdk_x11_screen_supports_net_wm_hint(_NET_WM_STATE_FULLSCREEN) on Wayland, r=jhorak
MozReview-Commit-ID: 9ZmQhkftunW

--HG--
extra : rebase_source : 12a367ec4663009ab581fa8e55ab24d448eb1b0c
2018-01-12 10:47:36 +01:00
Martin Stransky
a0494bb534 Bug 1430018 - Unify GtkCompositorWidgetInitData() call for X11 and Wayland, r=jhorak
MozReview-Commit-ID: 1sv3X59dMvZ

--HG--
extra : rebase_source : 7dc00f826e05f82fae5bb42752f83a3f28c351bb
2018-01-12 10:43:31 +01:00
Martin Stransky
0581a38578 Bug 1430018 - Add runnable function name to NewRunnableFunction() calls, r=jhorak
MozReview-Commit-ID: CmN0U8WH8De

--HG--
extra : rebase_source : 464c0293c85fd32a1df9ea8d84c0cae540d6a492
2018-01-12 10:33:28 +01:00
Martin Stransky
54fb55b16f Bug 1430018 - Don't use nsWindow::IsX11Display() as it's not implemented, r=jhorak
MozReview-Commit-ID: cR6q3fBhTo

--HG--
extra : rebase_source : ab137c3fe504555155f998b7d7e4332f9f802fae
2018-01-12 10:30:38 +01:00
Martin Stransky
a65c7eb6a0 Bug 1409707 - [Wayland] - provide library shell, r=jhorak
We don't add build-time dependency on Wayland libraries; that allows Wayland enabled Firefox
builds to run on systems without Wayland support.

We also can't dlsym() Wayland symbols directly from libwayland-client.so library as we miss
global data entries referenced by code at wayland-client.h then.

As a partial solution (for glibc systems only) we create dummy libwayland-client.so library
implementation and place it *after* Gtk+ 3.0 libraries at linking time.

It fixes build-time dependencies (we link against our libwayland-client.so library).
Run-time dependency is resolved by ld.so - when Gtk+ 3.0 libraries are linked with
system libwayland-client.so library, wayland symbols are pulled from there instead
from our dummy libwayland-client.so library.

When Gtk+ 3.0 is not linked with system libwayland-client.so it means we're running
on system without Wayland support. Our dummy libwayland-client.so implementation
is used (symbols are pulled run-time from there) and Firefox Wayland support is
disabled then.

MozReview-Commit-ID: IyaePwp4MxV

--HG--
extra : rebase_source : 852955d001657176e0bf69c099580be862d0b448
2017-10-18 14:34:27 +02:00
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Jonathan Watt
f38fde0cc7 Bug 144114 part 3 - Clean up the headers of the nsPrintSettingsService subclasses. r=bobowen
* * *
[mq]: dtor

MozReview-Commit-ID: 8ghrXxeKiHF
2017-12-19 11:05:37 +00:00
Jonathan Watt
f9157dfa53 Bug 144114 part 2 - Rename nsPrintOptions and its subclasses to nsPrintSettingsService*. r=bobowen
MozReview-Commit-ID: HQSmyrMBdS8
2017-12-19 10:42:15 +00:00
Jonathan Watt
94df748ddb Bug 144114 part 1 - Rename the files for nsPrintOptions and its subclasses. r=bobowen
MozReview-Commit-ID: EcotGH6pXCR

--HG--
rename : widget/android/nsPrintOptionsAndroid.cpp => widget/android/nsPrintSettingsServiceAndroid.cpp
rename : widget/android/nsPrintOptionsAndroid.h => widget/android/nsPrintSettingsServiceAndroid.h
rename : widget/cocoa/nsPrintOptionsX.h => widget/cocoa/nsPrintSettingsServiceX.h
rename : widget/cocoa/nsPrintOptionsX.mm => widget/cocoa/nsPrintSettingsServiceX.mm
rename : widget/gtk/nsPrintOptionsGTK.cpp => widget/gtk/nsPrintSettingsServiceGTK.cpp
rename : widget/gtk/nsPrintOptionsGTK.h => widget/gtk/nsPrintSettingsServiceGTK.h
rename : widget/nsPrintOptionsImpl.cpp => widget/nsPrintSettingsService.cpp
rename : widget/nsPrintOptionsImpl.h => widget/nsPrintSettingsService.h
rename : widget/windows/nsPrintOptionsWin.cpp => widget/windows/nsPrintSettingsServiceWin.cpp
rename : widget/windows/nsPrintOptionsWin.h => widget/windows/nsPrintSettingsServiceWin.h
2017-12-19 10:06:39 +00:00
Paolo Amadini
b7e6979a9f Bug 1284391 - Remove ui.allow_platform_file_picker pref on GTK widget. r=karlt
MozReview-Commit-ID: Gdiww1Gbwpk

--HG--
extra : rebase_source : a215c514f75971dc660b0d1f689ec4e8cde826a4
2018-01-11 13:10:28 +00:00
Sylvestre Ledru
424664ff30 Bug 1278282 - Remove the 'MOZ_WIDGET_GTK == 2' defines r=karlt,lsalzman
MozReview-Commit-ID: 3v8D600g8St

--HG--
extra : rebase_source : 34ea6f9868c1b322076c24daa75dc33e27b6704e
2018-01-10 08:52:04 +01:00
Sylvestre Ledru
2c6660f219 Bug 1278282 - Ride along Remove some trailing whitespaces r=lsalzman
MozReview-Commit-ID: 8W6VKIW8PQV

--HG--
extra : rebase_source : 23b5c300dd4bebe2b8808bdb03373073aab80b9f
2017-12-19 11:38:59 +01:00
Sylvestre Ledru
eabcdd21b2 Bug 1278282 - Replace #if (MOZ_WIDGET_GTK == 3) by #ifdef MOZ_WIDGET_GTK r=lsalzman
MozReview-Commit-ID: Bo0m7n078oh

--HG--
extra : rebase_source : 1874ac3e0abca65b821b5d04a6610a5cbb63fe24
2018-01-09 11:51:07 +01:00
Martin Stransky
f6c750837a Bug 1417890 - Install nsClipboard hook at nsWindow init, r=jhorak
MozReview-Commit-ID: GA3USkXtEhe

--HG--
extra : rebase_source : 4dca587977c9d09ee50735931e789620e0099e81
2017-12-18 13:39:00 +01:00
Martin Stransky
38f5ee6fb8 Bug 1417890 - Use nsRetrievalContextWayland for Wayland displays, r=jhorak
MozReview-Commit-ID: 1Z7uUhHPnaq

--HG--
extra : rebase_source : 2a64c910643f4e5f57f1b872a2918e8ebf906cfa
2017-12-18 13:37:46 +01:00
Martin Stransky
36864b87c5 Bug 1417890 - Implement nsRetrievalContextWayland, r=jhorak
MozReview-Commit-ID: 3wrOXg9KRtC

--HG--
extra : rebase_source : ddaa10cdd6ef3242e4c19aa7b1b5c59fde2d4e83
2017-12-18 13:36:12 +01:00
Martin Stransky
f355ee7a5c Bug 1417890 - rename nsRetrievalContext::WaitForClipboardContext() to nsRetrievalContext::GetClipboardData() and implement nsRetrievalContext::ReleaseClipboardData(), r=jhorak
Make the clipboard data getter function more explicitly named and also create a counterpart to release clipboard data.

MozReview-Commit-ID: 3pWsQgCFDuG

--HG--
extra : rebase_source : c4eae554f5a24d998801550ac91b0859ac8e116e
2017-12-18 13:34:38 +01:00
Jonathan Watt
53631ea19f Bug 1425190 - Stop checking for GTK >= 2.24 in the printing code. r=karlt
MozReview-Commit-ID: CEvccM9YzgC
2017-12-08 09:44:17 +00:00
Jonathan Watt
b0ddef10f5 Bug 1425188 - Remove the ability to save as Postscript from the print dialog on Linux. r=karlt
Saving to PDF will now be the only option.

MozReview-Commit-ID: 9WIDws6lByG
2017-12-07 14:52:25 +00:00
Jan Steffens
00146cbcf0 Bug 1427520 - Stub gtk_widget_get_preferred_width/height in mozgtk2; r=karlt
MozReview-Commit-ID: HUMEwgcwioX

--HG--
extra : rebase_source : 8647f8bd01ba774b3c57cab93af1733a069067b2
2018-01-01 06:34:23 +01:00
Emilio Cobos Álvarez
c8eb630ebe Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00