Граф коммитов

1285 Коммитов

Автор SHA1 Сообщение Дата
Martin Stransky f6623f64ce Bug 1433068 - Reload WidgetstyleCache when theme changes, r=jhorak
MozReview-Commit-ID: 1cZmJNWjS4N

--HG--
extra : rebase_source : 1e9406c2090b19049c37ac21eff11e05e0be2cc9
2018-02-20 13:15:52 +01:00
Masayuki Nakano ed18f14624 Bug 1036008 - Use alternative ASCII capable keyboard layout information to decide keyCode even if the key produces an ASCII punctuation character r=smaug
Gecko decides keyCode from an ASCII character which is produced by the key
by itself or with Shift on active keyboard layout or alternative ASCII capable
keyboard layout if active keyboard layout isn't ASCII capable.  However, we've
ignored alternative ASCII capable keyboard layout's character if both the
key itself and with Shift don't produce ASCII alphabet nor ASCII numeral,
i.e., ASCII punctuation characters are not used in alternative ASCII capable
keyboard layout because of avoiding mapping a keyCode value to 2 or more keys.

However, setting 0 to keyCode value makes Firefox unusable with some web
applications which are aware of neither KeyboardEvent.key nor
KeyboardEvent.code.  So, even if we map same keyCode value to a key, we should
avoid setting keyCode value to 0 as far as possible.

This patch's approach is, we behave same keyCode value as the alternative ASCII
capable keyCode is selected when computed keyCode value of active keyboard
layout is 0.  This means that we will make some language users whose keyboard
layout for their language is not ASCII capable can use global web services
which support US keyboard layout of Firefox since the new keyCode values
are mostly computed with US layout on Windows or actual alternative ASCII
capable keyboard layout on macOS and Linux.  In other words, we cannot improve
compatibility with web applications which don't support Firefox  by this patch
since our keyCode values are really different from Chrome's.  So, unfortunately,
if we'd use exactly same keyCode computation as Chromium, we'd break
compatibility with existing web applications which are aware of Firefox since
it's necessary to check UA name or something before using keyCode values.

Note that the most important difference between Windows and the others is,
such keyCode value is computed with alternative ASCII capable keyboard
layout on macOS and Linux but only on Windows, it's computed with OEM virtual
keycode.  This means that only on Windows, the keyCode value may be different
from actual alternative ASCII capable keyboard layout's keyCode.

MozReview-Commit-ID: As289r9wp6i

--HG--
extra : rebase_source : 66181403dbe8ca8dab893edc8f4eec1991d544d0
2018-02-16 15:54:07 +09:00
Jan Horak 6c58e369e7 Bug 1431337 - Scale content for the actual 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.

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.

We also need to check layout.css.devPixelsPerPx because we cannot
scale per monitor when this preference is set to positive number.

MozReview-Commit-ID: AwT2NvkEqvz

--HG--
extra : rebase_source : 5b956a6abd7d215b06ebcd8c56e34c038d012940
2018-01-18 11:52:59 +01:00
Jan Horak 6234216f8c Bug 1417847 - [CSD] Doubleclick event on draggable area restores/maximizes window; r=stransky
The drag area should process doubleclick event as request for restore/maximize
because otherwise there's no other option to do the action when Firefox
is drawing window decoration. We follow similar path as mac which handles this
in mouseUp event.

MozReview-Commit-ID: KpCnHTdteLr

--HG--
extra : rebase_source : bf0680e33fd5a5b6c931b5260430fdd3fd995769
2018-02-15 09:50:56 +01:00
Martin Stransky 45ea89eb15 Bug 1433866 - Rename CSD_SUPPORT_FULL/FLAT to better names, r=jhorak
MozReview-Commit-ID: 8btSuxa5oeT

--HG--
extra : rebase_source : 775f98623f5fd9b11c6d7bb152ddf74fc8c7d7e1
2018-02-19 16:35:43 +01:00
Martin Stransky 1bca24f221 Bug 1423985 - Force CSD titlebar mode when GTK_CSD is set, r=jhorak
MozReview-Commit-ID: KxKI20TEY7U

--HG--
extra : rebase_source : a4194276c65c22d5c45429469e4a8cda6f6bb040
2018-02-19 16:26:50 +01:00
Martin Stransky d59d4f1d86 Bug 1434572 - [Wayland] Implement Gtk+ clipboard shortcut for copy->paste between Firefox windows, r=jhorak
When we perform copy -> paste in one Firefox process on Wayland we're locked because Wayland clipboard paste
operation just reads data from filedescriptor and does not run main event loop.

A solution is to use Gtk+ shortcut here, when clipboard selection owner is the same as data receiver.
Gtk+ then does not go through X11/Wayland but calls clipboard data getter callback directly,
which we can use on Wayland because it also does not main event loop and the operation
stays synchronous.

MozReview-Commit-ID: G8myCBUSzxb

--HG--
extra : rebase_source : 34cb3095be4b2f00d19c589dc5f676b1b895eb15
2018-02-01 11:23:01 +01:00
Chris Peterson fe5cd3d5d9 Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj
MozReview-Commit-ID: 8pjYjEvQF42

--HG--
extra : rebase_source : 5eb0bea2ef5f06a811b4f3daf57ce8720f12dd07
2018-02-08 21:22:43 -08:00
Chris Peterson d09123f248 Bug 1436263 - Part 1: Replace `final override` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D

--HG--
extra : rebase_source : 94831c1e13a840dd2ea0600f64bcf70c2bf938d9
extra : source : cf9283bf1b0bca3a6311c98e227329d451f80ecb
2018-02-05 22:46:57 -08:00
Boris Zbarsky 9bdcffc985 Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8
The change to RootAccessible.cpp fixes an obvious bug introduced in bug 741707.

The visibility changes in gfx/thebes are because NS_DECL_ISUPPORTS has a
trailing "public:" that those classes were relying on to have public
constructors.

MozReview-Commit-ID: IeB8KIJCGhU
2018-02-12 15:44:40 -05:00
Tooru Fujisawa 48bb8e02c7 Bug 1424107 - Pass the triggering principal URI across processes in drag-and-drop. r=smaug 2018-02-09 10:43:53 +09:00
Jan Steffens 949517d131 Bug 1435965 - Stub gtk_widget_set_valign in mozgtk2; r=karlt
MozReview-Commit-ID: 4DenCpHmLlK

--HG--
extra : rebase_source : 3e95671acf5b61c98e07fa4a798423bfd9ac18f1
2018-02-06 10:07:07 +01:00
Gurzau Raul 476c3b3a55 Merge inbound to mozilla-central. a=merge 2018-02-06 23:53:56 +02:00
Arthur Edelstein f54d08d271 Bug 1433357 - Part 2: Suppress upload-file-dialog proxy bypass in Linux r=karlt
--HG--
extra : rebase_source : ee2386e3540f44566ac1f5c21199a817cc55a892
2018-02-02 14:44:00 +02:00
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