Commit Graph

1599 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
ef7d8198eb Bug 1520502 - Set the standard cursor and the custom cursor in the same IPC message. r=jmathies
This cleans up a bit and allows us to be smarter about which cursors
should we allow from content or what not, which will help with bug 1445844 and
co.

Differential Revision: https://phabricator.services.mozilla.com/D16711
2019-01-26 07:49:28 +01:00
Martin Stransky
c20796e702 Bug 1522474 - [Wayland] Commit wl_surface state right after its creation, r=ashie
Differential Revision: https://phabricator.services.mozilla.com/D17498

--HG--
extra : moz-landing-system : lando
2019-01-25 03:37:52 +00:00
Martin Stransky
ff201af524 Bug 1521630 [Linux/Gtk] Use GdkEventCoordsToDevicePixels() to get mouse coordinates for mDraggableRegion.Contains(), r=ntim,TYLin
Differential Revision: https://phabricator.services.mozilla.com/D17490

--HG--
extra : moz-landing-system : lando
2019-01-24 19:29:14 +00:00
Martin Stransky
4138f8ce3b Bug 1521310 - [Linux/Gtk] Use ':' separator to place titlebar buttons left/right, r=dao
Use only ':' separator instead of 'menu:' to place titlebar buttons as the menu may not be always present.

Differential Revision: https://phabricator.services.mozilla.com/D17480

--HG--
extra : moz-landing-system : lando
2019-01-24 10:54:28 +00:00
Martin Stransky
4452be5cba Bug 1519606 - [Linux/Gtk] Compute correct margin for left titlebar buttons placement, r=dao
Depends on D17347

Differential Revision: https://phabricator.services.mozilla.com/D17351

--HG--
extra : moz-landing-system : lando
2019-01-24 09:22:30 +00:00
Martin Stransky
c9db5cb4d3 Bug 1519606 - [Linux/Gtk] Don't add margin to icon position at titlebar buttons as it's already applied at drawing, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D17347

--HG--
extra : moz-landing-system : lando
2019-01-23 16:17:26 +00:00
Martin Stransky
59a8114e76 Bug 1521012 - [Linux/GNOME] Use X shape mask to draw transparent corners when we draw to titlebar, r=lsalzman
To support rounded corners of Gtk+ titlebar themes (Adwaita, Radiance..) in GNOME we need to use X shape mask
as fully transparent toplevel window causes various issues (like Bug 1516224).

We draw mShell as transparent and mContainer as non-transparent with shape mask applied. The shape mask
is generated only when titlebar rendering is enabled and it's generated from GtkHeaderBar Widget
to match the exact look.

We use existing mTransparencyBitmap for the shape mask where mTransparencyBitmapForTitlebar controls
whether it's a general shape mask or our specialised shape for titlebar only.

This is already enabled for GNOME environment by default. So there's a new preference
widget.default-hidden-titlebar added to easily disable it if any issue appears
during testing.

Differential Revision: https://phabricator.services.mozilla.com/D17283

--HG--
extra : moz-landing-system : lando
2019-01-23 12:36:25 +00:00
Cosmin Sabou
7ccc9d8b0b Merge mozilla-inbound to mozilla-central. a=merge 2019-01-19 11:57:49 +02:00
Tim Nguyen
60a5143df0 Bug 1241885 - Implement support for -moz-window-dragging in GTK and remove toolkit toolbar-drag binding. r=dao,bzbarsky,stransky
The restriction preventing fullscreen windows from being dragged is removed.

Differential Revision: https://phabricator.services.mozilla.com/D15075

--HG--
extra : moz-landing-system : lando
2019-01-18 22:42:24 +00:00
Andreea Pavel
95431afe85 Backed out 1 changesets (bug 1241885) for build bustages on a CLOSED TREE
Backed out changeset 176be7000d33 (bug 1241885)
2019-01-18 23:49:55 +02:00
Tim Nguyen
495df7ddea Bug 1241885 - Implement support for -moz-window-dragging in GTK and remove toolkit toolbar-drag binding. r=dao,bzbarsky,stransky
The restriction preventing fullscreen windows from being dragged is removed.

Differential Revision: https://phabricator.services.mozilla.com/D15075

--HG--
extra : moz-landing-system : lando
2019-01-18 16:51:08 +00:00
Martin Stransky
8ddc948f81 Bug 1433667 - Honour system titlebar button left/right placement, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D16466

--HG--
extra : moz-landing-system : lando
2019-01-18 13:52:29 +00:00
Martin Stransky
53be695239 Bug 1490344 - [Linux/Gtk] Enable hidden system titlebar by default on Gnome, r=dao
This patch implements -moz-gtk-csd-hide-titlebar-by-default media query
to check if the system titlebar should be disabled by default on Linux systems
(it's already disabled on Window/Mac).

It also removes explicit definition of browser.tabs.drawInTitlebar preference on Linux.
When browser.tabs.drawInTitlebar is missing the -moz-gtk-csd-hide-titlebar-by-default
is used to obtain the titlebar state. When browser.tabs.drawInTitlebar is set
in about:config or by Customize menu, the user peference is used instead of the default.

It also fixes a -moz-gtk-csd-available media query,
it was always true regardless the actual system setting.

Differential Revision: https://phabricator.services.mozilla.com/D16036

--HG--
extra : moz-landing-system : lando
2019-01-17 12:44:49 +00:00
Dragana Damjanovic
fc155bc720 Bug 1513059 - Use the minimal XPCOM for the socket process.r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D15024

--HG--
extra : moz-landing-system : lando
2019-01-16 23:05:11 +00:00
Andreea Pavel
d0b4b569af Backed out changeset aa442da7cfd8 (bug 1490344) for failing bc at browser/components/customizableui/test/browser_970511_undo_restore_default.js on a CLOSED TREE 2019-01-16 13:33:24 +02:00
Martin Stransky
0e01fab619 Bug 1490344 - [Linux/Gtk] Enable hidden system titlebar by default on Gnome, r=dao
This patch implements -moz-gtk-csd-hide-titlebar-by-default media query
to check if the system titlebar should be disabled by default on Linux systems
(it's already disabled on Window/Mac).

It also removes explicit definition of browser.tabs.drawInTitlebar preference on Linux.
When browser.tabs.drawInTitlebar is missing the -moz-gtk-csd-hide-titlebar-by-default
is used to obtain the titlebar state. When browser.tabs.drawInTitlebar is set
in about:config or by Customize menu, the user peference is used instead of the default.

It also fixes a -moz-gtk-csd-available media query,
it was always true regardless the actual system setting.

Differential Revision: https://phabricator.services.mozilla.com/D16036

--HG--
extra : moz-landing-system : lando
2019-01-15 14:47:03 +00:00
Sylvestre Ledru
47a5dd1fb8 Bug 1519636 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D16388

--HG--
extra : moz-landing-system : lando
2019-01-16 08:50:07 +00:00
Martin Stransky
956e93c403 Bug 1516224 - [Linux/Gtk] Disable ARGB toplevel visual on X11 SW compositor due to visible graphics artifacts, r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D16561

--HG--
extra : moz-landing-system : lando
2019-01-15 17:45:35 +00:00
Martin Stransky
d704841235 Bug 1519355 - [Wayland] Produce better error message when mozilla::widget::WaylandShmPool::CreateTemporaryFile() fails, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D16297

--HG--
extra : moz-landing-system : lando
2019-01-11 15:15:10 +00:00
Razvan Maries
642dd2cc11 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2019-01-11 17:33:16 +02:00
Martin Stransky
c6900f5e79 Bug 1517074 - [Linux/Gtk] Enable native (xdg-desktop based) file dialog on KDE only due to Gtk+ regression, r=jhorak
Also add widget.allow-gtk-native-file-chooser preference value to force enable on all systems.

Differential Revision: https://phabricator.services.mozilla.com/D16184

--HG--
extra : moz-landing-system : lando
2019-01-11 11:21:27 +00:00
Martin Stransky
a9e92a6023 Bug 1497002 - [Linux/CSD] Position headerbar button icons according to the actual button, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D16193

--HG--
extra : moz-landing-system : lando
2019-01-11 11:24:06 +00:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Ehsan Akhgari
06c3d29113 Bug 1521000 - Part 1: Reformat the tree to ensure everything is formatted correctly with clang-format r=sylvestre
Summary: # ignore-this-changeset

Reviewers: sylvestre

Reviewed By: sylvestre

Subscribers: reviewbot, emilio, jandem, bbouvier, karlt, jya

Bug #: 1521000

Differential Revision: https://phabricator.services.mozilla.com/D16936

--HG--
extra : histedit_source : 4add583bfa729ccc1aef934629ed45ff095189b0
2019-01-18 10:12:56 +01:00
William G Hatch
6568267252 Bug 1513405 - KeymapWrapper::ComputeDOMKeyCode() shouldn't ignore modifiers when computing keyCode value of non-printable key event r=karlt, masayuki
Some unusual keyboard layout may map a function key only with some
modifiers.  For example, Hatchak keyboard layout maps Tab key to
"Digit3" key and Backspace key to Level3 Shift+"Digit3" key.  So,
when Level3 Shift is active, the modifier state of the "Digit3" key
event shouldn't be ignored because computed keyCode value becomes
DOM_VK_TAB (9) rather than DOM_VK_BACK_SPACE (8).

This patch makes KeymapWrapper::ComputeDOMKeyCode() compute keyCode
value of non-printable key event with its modifier state first.  If
it cannot map to a DOM keyCode value, then, it keeps ignoring the
modifier state for backward compatibility and making web apps be able
to identify the key as far as possible.
2019-01-09 18:36:43 +09:00
Masayuki Nakano
a129d2b2b6 Bug 1516326 - part 2: Log more in KeymapWrapper r=m_kato
We haven't logged KeymapWrapper::HandleKeyPressEvent() nor
KeymapWrapper::HandleKeyReleaseEvent().  Therefore, this patch makes them
put their behavior into the log.

Additionally, KeymapWrapper::InitKeyEvent() does not log enough the result
of initialized WidgetkeyboardEvent.  This patch makes it log more.

With those changes, we can get the log of:
- detail of dispatched keyboard events
- which key event didn't cause keyboard events
- which keyboard event was consumed

Note that the utility methods are copied from widget/windows.  Perhaps,
we should create XP logging helper for keyboard/IME later.

Differential Revision: https://phabricator.services.mozilla.com/D15324

--HG--
extra : moz-landing-system : lando
2019-01-07 10:05:56 +00:00
Masayuki Nakano
0eed04a27d Bug 1516326 - part 1: Move implementation of nsWindow::OnKeyPress() and nsWindow::OnKeyRelease() into KeymapWrapper r=karlt
Move all implementation of nsWindow::OnKeyPress() and nsWindow::OnKeyRelease()
into KeymapWrapper because the implementation is a little bit complicated
but not loggable.  When we get bug reports which depend on environment around
IME/key handling like bug 1498823, it's useful to log those methods behavior
too.

Differential Revision: https://phabricator.services.mozilla.com/D15323

--HG--
extra : moz-landing-system : lando
2019-01-07 23:15:33 +00:00
Doug Thayer
a848222b53 Bug 1441308 - Split out document pieces of WebRenderLayerManager r=jrmuizel
Per our discussion, this patch splits out the state management bits of
WebRenderLayerManager, allowing for them to be maintained per-document.

Differential Revision: https://phabricator.services.mozilla.com/D13577

--HG--
extra : moz-landing-system : lando
2019-01-07 21:33:10 +00:00
Martin Stransky
5844dd5c5b Bug 1516101 - Don't use locale-specific AppendPrintf() to print float values, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D15836

--HG--
extra : moz-landing-system : lando
2019-01-07 14:43:31 +00:00
Tom Schuster
79d3c5244b Bug 571074 - Mark nsITransferable.getTransferData as [must_use]. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D13454

--HG--
extra : moz-landing-system : lando
2019-01-04 16:16:59 +00:00
Tooru Fujisawa
ba1b11b334 Bug 1509384 - Use IPC::Principal instead of Principal URI string in Drag-and-Drop. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D13728

--HG--
extra : moz-landing-system : lando
2019-01-04 03:16:46 +00:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru
cccdda3c2a Bug 1516555 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D15426

--HG--
extra : moz-landing-system : lando
2018-12-28 15:48:06 +00:00
Masayuki Nakano
6ea1231fae Bug 1498823 - Make KeymapWrapper::FilterEvents() ignore synthesized KeyPress events r=m_kato
With an event filter method, we're logging all key events on any widgets to
check whether a key is pressed or not, to set
WidgetKeyboardEvent::mIsRepeat properly.  If iBus and Fcitx work as expected,
they synthesize key events with setting their own modifier state which indicate
the events are synthesized by IME.  In this expected case, synthesized key
events are not caught by the filter.

On the other hand, in some environment, they keep handling key events
asynchronously but they or something another module synthesizes key events
without the flag and such events are caught by the filter because the events
are posted into the event queue.  Therefore, we decide that such synthesized
events are always generated by auto-repeat (first events which are always
filtered by IME are treated as first press, and then, synthesized events are
treated as repeated events because of no key release events).

This patch makes KeymapWrapper::FilterEvents() ignore coming KeyPress
events if:
- the time is exactly same as previous KeyPress event
- and IMContextWrapper instance is now waiting a GDK_KEY_PRESS event
- and hardware_keycode of waiting GDK_KEY_PRESS event is same as
  keyCode of the KeyPress event

Differential Revision: https://phabricator.services.mozilla.com/D15380

--HG--
extra : moz-landing-system : lando
2018-12-28 07:02:05 +00:00
Masayuki Nakano
af34cccc17 Bug 1516323 - Make IMContextWrapper::OnKeyEvent() check whether coming key event is already in the posting event queue r=m_kato
According to the log of bug 1498823, ibus won't set IBUS_IGNORED_MASK to
modifier flags when it synthesizes the event for asynchronous handling in
some environments.

Currently, we assume that iBus and Fcitx set IBUS_IGNORED_MASK or
FcitxKeyState_IgnoredMask.  So, we put both real key events and synthesized
key events into the posting event queue and that causes using a lot of
memory until the editor is blurred.  Fortunately, timestamp of synthesized
key events are always same as their original events.  Therefore, we can look
for original event from the positing event queue.

Although we have gotten no bug reports about this issue of Fcitx, but this
patch adds same hack for Fcitx too because the runtime cost is not
expensive but the symptom is really serious.

Differential Revision: https://phabricator.services.mozilla.com/D15321

--HG--
extra : moz-landing-system : lando
2018-12-26 08:17:32 +00:00
Martin Stransky
1d8979cc73 Bug 1512416 - [Wayland/OpenGL] Resize wl_elg_window when widget scale changes, r=jhorak"
Differential Revision: https://phabricator.services.mozilla.com/D14404

--HG--
extra : moz-landing-system : lando
2018-12-20 11:54:13 +00:00
Dorel Luca
d586d50b96 Backed out changeset be2cd52df099 (bug 1512416) for build bustage 2018-12-19 14:24:31 +02:00
Martin Stransky
973fb364ec Bug 1512416 - [Wayland/OpenGL] Resize wl_elg_window when widget scale changes, r=jhorak"
Differential Revision: https://phabricator.services.mozilla.com/D14404

--HG--
extra : moz-landing-system : lando
2018-12-19 08:46:27 +00:00
Martin Stransky
36e0a3f5a9 Bug 1507423 - Don't draw StyleAppearance::MozWindowButtonBox on Linux/Gtk, r=mconley
Depends on D14243

Differential Revision: https://phabricator.services.mozilla.com/D14244

--HG--
extra : moz-landing-system : lando
2018-12-18 10:48:28 +00:00
Martin Stransky
8449b576c3 Bug 1507423 - Implement StyleAppearance::MozWindowButtonBox on widget/gtk, r=mconley
Depends on D14242

Differential Revision: https://phabricator.services.mozilla.com/D14243

--HG--
extra : moz-landing-system : lando
2018-12-18 19:06:08 +00:00
Martin Stransky
2e33d16018 Bug 1507423 - Don't return border/padding from MOZ_GTK_HEADER_BAR/MOZ_GTK_HEADER_BAR_MAXIMIZED, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D14242

--HG--
extra : moz-landing-system : lando
2018-12-18 10:47:48 +00:00
Martin Stransky
70f9a9330e Bug 1514828 - [Wayland] Enable CSD titlebar mode on all Wayland compositors, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D14767

--HG--
extra : moz-landing-system : lando
2018-12-18 13:43:25 +00:00
shindli
1c998613b1 Backed out changeset 61de4550c887 (bug 1512416) for bustages in builds/worker/workspace/build/src/widget/gtk/mozcontainer.cpp:230:15 2018-12-18 15:53:38 +02:00
Martin Stransky
4f8c2372b0 Bug 1512416 - [Wayland/OpenGL] Resize wl_elg_window when widget scale changes, r=jhorak"
Differential Revision: https://phabricator.services.mozilla.com/D14404

--HG--
extra : moz-landing-system : lando
2018-12-18 08:59:18 +00:00
Sylvestre Ledru
7cf43b9bc0 Bug 1513205 - Ride along, update some code to match the Google coding style r=Ehsan
# ignore-this-changeset

Depends on D14595

Differential Revision: https://phabricator.services.mozilla.com/D14597

--HG--
extra : moz-landing-system : lando
2018-12-14 18:10:08 +00:00
Martin Stransky
ba6e539858 Bug 1485616 - [Wayland] Wait with drawing until mozcontainer init is finished, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D14070

--HG--
extra : moz-landing-system : lando
2018-12-11 10:09:13 +00:00
Sylvestre Ledru
ad75e912fb Bug 1512961 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D14060

--HG--
extra : moz-landing-system : lando
2018-12-10 19:23:16 +00:00
Martin Stransky
a6e0503d05 Bug 1512589 - [Wayland] Map mozcontainer from map-event signal, r=jhorak
It's not quaranteed that we have a valid wl_surface at GtkWidget::map event.
In that case create it at GtkWidget::map-event handler which is called after
widget show.

Differential Revision: https://phabricator.services.mozilla.com/D13979

--HG--
extra : moz-landing-system : lando
2018-12-10 10:06:27 +00:00
Martin Stransky
c1940ae522 Bug 1512415 - Always get a new wl_surface when mozcontainer is mapped, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D13912

--HG--
extra : moz-landing-system : lando
2018-12-06 14:49:00 +00:00
Martin Stransky
0329d23770 Bug 1511951 - [Wayland/EGL] HiDPI - Set scale to EGL window, r=jhorak
- Wayland - Set proper scale to wl_egl_window when it's created and resized
- Wayland - Remove unused gtk_widget_set_app_paintable()

Differential Revision: https://phabricator.services.mozilla.com/D13725

--HG--
extra : moz-landing-system : lando
2018-12-05 19:53:33 +00:00