Commit Graph

1299 Commits

Author SHA1 Message Date
Kartikaya Gupta
45d31fa895 Bug 1442627 - Stop exporting APZCTreeManager.h in mozilla/layers/. r=botond
MozReview-Commit-ID: GC5fSWOYtF5

--HG--
extra : rebase_source : e2dfe679595bf9208e082699a99375cd509b66e3
2018-03-06 10:25:39 -05:00
Martin Stransky
ae33d849f9 Bug 1438132 - Don't return false-positive data from clipboard, r=jhorak
MozReview-Commit-ID: 5I9DbpYJ8EL

--HG--
extra : rebase_source : 6b7207cd45b2b6f758f6e882c0829538ca2fe95e
2018-03-01 14:07:15 +01:00
Martin Stransky
066945c7bc Bug 1434646 - Titlebar rendering - Place titlebar buttons in GtkBox, r=jhorak
Some themes (Ambiance for instance) uses first-child/last-child css selectors
to style titlebar buttons. Ubuntu Ambiance theme places titlebar buttons closer
by negative margin applied to them.

We put titlebar buttons to GtkBox as well as Gtk+ does and also keep
the button order here to match first-child/last-child selectors. It also means
we must have maximize/restore as one button to keep the correct order.

MozReview-Commit-ID: 9mqljOa4Vu7

--HG--
extra : rebase_source : 9c31a2073d1bb247ce9d0240333143661b8ae4b8
2018-02-23 21:28:37 +01:00
Narcis Beleuzu
1d1a8b086b Backed out changeset 9d1f52cabe41 (bug 1440461) for build bustages on nsWindow.cpp 2018-03-01 05:32:33 +02:00
Martin Stransky
b75128438f Bug 1440461 - Disable titlebar rendering for Linux/Firefox 59, r=glandium
The titlebar rendering on Linux/Gtk+ is recently enabled at Beta59 but with many bugs fixed at Nightly.
Let's disable this feature for Beta / Release 59 and ship it at Firefox 60 where majority of the issues are fixed.

MozReview-Commit-ID: FQL7tNhcvUG

--HG--
extra : rebase_source : 03a495ebc81b5ae5b4093406bd40daf83251343a
2018-02-22 21:56:58 +01:00
Martin Stransky
6e94e535b0 Bug 1433092 - Add spacing around titlebar buttons, r=jhorak
GtkHeaderBar has property "spacing" which defines space between buttons at titlebar.
Get this property and apply as margin to titlebar buttons when there's more than one.
Also cache this value for furter use at titlebar metrics cache.

MozReview-Commit-ID: J7qAIWEnK4Y

--HG--
extra : rebase_source : 73f0f605444cf4e4ada3da335ff003e9df05c9c4
2018-02-23 10:37:07 +01:00
Jan Horak
2fec7aac11 Bug 1440413 - Use original mouse event position when checking for doubleclick on titlebar; r=stransky
The DispatchEvent can manipulate with the mRefPoint we're later using to check if the
double click happened on the titlebar. We need to save it for later check to avoid
unwanted restore/maximize event when mouse event occurs near top border of any widget.

Also don't handle doubleclick on titlebar when CSD is not enabled.

MozReview-Commit-ID: KjxM1EsT4Lg

--HG--
extra : rebase_source : b880e4d89ebe3546b7ef70e3d94926a628f98598
2018-02-26 16:23:34 +01:00
Jan Horak
b69949883c Bug 1441108 - Don't print warning for less than 1 scaling factor; r=stransky
A lot of "WARNING: Invalid monitor scale: -1" appering for the puppet widget since
fix for bug 1439881 landed. We don't need to print the warning, fallback to 1 is
sufficient enough.

MozReview-Commit-ID: 73BGc8neUmu

--HG--
extra : rebase_source : 74b2a818a29514095b5c56b05966cff5e4e9ba60
2018-02-26 11:44:25 +01:00
Jan Horak
6958445862 Bug 1439881 - Avoid returning monitor scale 0; r=stransky
Because of rounding errors there's a change that returned monitor scale
is 0. That would lead to SIGFPE because it's later used in division.

MozReview-Commit-ID: 4d7nHaBm4XG

--HG--
extra : rebase_source : d7fb5c64698d1e99afc223d401b30e0eb168fdb4
2018-02-22 13:59:38 +01:00
Jan Horak
f77af604c8 Bug 1439857 - Fix too big fonts when devPixelsPerPx is set; r=stransky
This fixes regression introduced by hidpi support for wayland in
case devPixelsPerPx is set (bug 1431337).

MozReview-Commit-ID: DOh0aTcxbVG

--HG--
extra : rebase_source : ac3ac449a99e0123b8a64ea36f25d312bb3c4483
2018-02-22 10:41:30 +01:00
Adrian Wielgosik
2d4df58ad8 Bug 1439751 - Remove all members from nsIDOMHTMLInputElement. r=qdot
MozReview-Commit-ID: JVagEzvSONN

--HG--
extra : rebase_source : a7e1cf2e5ccc1925f3a11c7d935438ef6307c70c
2018-02-20 23:10:44 +01:00
Gurzau Raul
67898ab5c2 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-02-21 19:32:45 +02:00
Martin Stránský
924797ef59 Bug 1434621 - part 2: ignore vertical titlebar padding from the Gtk+ theme since we set it with CSS on #titlebar-buttonbox. r=dao
MozReview-Commit-ID: ETrNNianj3e
2018-02-21 16:43:11 +01:00
Martin Stransky
fb13e4d63d Bug 1433068 - Titlebar/Linux - load and draw HiDPI titlebar icons on HiDPI screens, r=jhorak
MozReview-Commit-ID: KxbBvf6mgo1

--HG--
extra : rebase_source : f1c3b083d4e83684b1046a3c439d802de6547c21
2018-02-20 16:16:23 +01:00
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