Commit Graph

24388 Commits

Author SHA1 Message Date
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
Boris Chiou
c35f47093e Bug 1322780 - Part 2: Support unprefixed min-content and max-content. r=mats,emilio
Support unprefixed min-content and max-content and treat the prefixed
version as aliases for
1. width, min-width, max-width if inline-axis is horizontal, and
2. height, min-height, max-height if inline-axis is vertical, and
3. inline-size, min-inline-size, max-inline-size, and
4. flex-basis.

Besides, update the test cases to use unprefixed max-content and
min-content.

Depends on D7535

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

--HG--
extra : moz-landing-system : lando
2018-12-18 18:47:37 +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
Masayuki Nakano
c8b0ce3150 Bug 1504963 - part 4: Make IMEHandler create native caret over our caret if it's necessary r=Jamie,m_kato
IMMHandler and TSFTextStore are good class to put native caret when they have
enough information.  However, for example, IMMHandler may not have its singleton
instance until first composition of IMM-IME starts.  Therefore, typically,
IMEHandler is a good class to put native caret without composition.

This patch adds IMEHandler::MaybeCreateNativeCaret(), and if it won't create
native caret because not yet received WM_GETOBJCT for OBJID_CARET, we should
fire window event for MSAA applications.  If there is new MSAA application
retrieves OBJID_CARET, we'll receive WM_GETOBJECT for OBJID_CARET
asynchronously.  Then, we should start to put native caret for such
applications.

Note that if we create native caret, some versions of ATOK refers the native
caret and the behavior becomes worse than usual.  Therefore, we need to
keep not using native caret as far as possible.

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

--HG--
extra : moz-landing-system : lando
2018-12-18 08:38:23 +00:00
Masayuki Nakano
682a4d56d1 Bug 1504963 - part 3: Make TSFTextStore create native caret when it gets notified of content change r=Jamie,m_kato
If WM_GETOBJECT for OBJID_CARET is received but a11y module is not active,
IME module should create native caret over our caret because Windows will
handle the request with native caret automatically and we don't need to
enable a11y module only for it.

This patch makes IMEHandler store whether such message has been received and
makes TSFTextStore create native caret when composition, selection or layout
is changed because especially when there is composition, only TSFTextStore
knows correct position to put caret if there is composition or some dispatched
events have not been handled by content process yet.

Note that IMMHandler already does that since some legacy IMEs require native
caret to show its UI and we cannot check active IME strictly.  Therefore, this
patch does not touch IMMHandler.

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

--HG--
extra : moz-landing-system : lando
2018-12-18 08:38:23 +00:00
Masayuki Nakano
55978ba309 Bug 1504963 - part 2: Make IMEHandler manage whether native caret is created by it r=m_kato
IMEHandler needs to create native caret later (when there is no composition).
Therefore, IMEHandler should manage whether it creates native caret or not
and IMMHandler and TSFTextStore should create/destroy native caret via
IMEHandler.

Note that this patch makes IMMHandler stops managing whether native caret
is created for plugin or not because native caret is created only one instance
and anyway IME handlers should stop managing native caret when they loses
focus.

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

--HG--
extra : moz-landing-system : lando
2018-12-18 08:38:22 +00:00
Masayuki Nakano
fd2f9270a7 Bug 1504963 - part 1: Make IME modules not touch native caret if a11y module handles native caret r=Jamie,m_kato
If a11y module is active, it observers caret position and size, and when caret
position or size is changed, it creates/moves native caret to overlap with
our caret.

On the other hand, IME module also creates native caret if active IME requires
it.  Therefore, both of them conflicts each other.

This patch makes IME module stop touching native caret if a11y module is active.

Although, a11y module with Flush Player does not work well for IME.  Therefore,
this patch keeps the conflict between them as-is for now.

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

--HG--
extra : moz-landing-system : lando
2018-12-18 10:40:50 +00:00
John Lin
82531b5e45 Bug 1486659 - p2: expose native GL blitter to Java. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D11938

--HG--
extra : moz-landing-system : lando
2018-12-14 21:34:11 +00:00
Masayuki Nakano
586ba79d72 Bug 1513145 - Make some callers of TSFTextStore::Selection::GetWritingMode() check whether the selection has already been initialized r=m_kato
If TSFTextStore fails to get selection, e.g., the content is really odd like
fuzzing tests, its mSelectionForTSF is marked as dirty.  However, Windows may
try to retrieve writing mode while we're creating new TSFTextStore. Then, we
may hit MOZ_ASSERT(!mDirty) in TSFTextStore::Selection::GetWritingMode() in
debug build.

So, we need to make some callers of GetWritingMode() check whether selection
is marked as dirty.

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

--HG--
extra : moz-landing-system : lando
2018-12-15 03:23:38 +00:00
Tim Nguyen
726cd8c84a Bug 1514464 - Clamp selection color value between 0 and 255 in nsLookAndFeel.mm. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D14676

--HG--
extra : moz-landing-system : lando
2018-12-15 22:46:31 +00:00
Kartikaya Gupta
dc7bd74b05 Bug 1491512 - Allow rendering minimized windows on macOS. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D14567

--HG--
extra : moz-landing-system : lando
2018-12-14 20:16:56 +00:00
Tim Nguyen
249dadfb20 Bug 1513401 - Increase contrast of unsaturated selection colors in nsLookAndFeel.mm. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D14566

--HG--
extra : moz-landing-system : lando
2018-12-14 19:00: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
Sylvestre Ledru
6f45c666bc Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-14 18:10:35 +00:00
Adam Gashlin
87f5a1c15a Bug 1513066 - Scale monitor size when forcing fullscreen. r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D14328

--HG--
extra : moz-landing-system : lando
2018-12-13 20:35:23 +00:00
Florian Quèze
0066a6ab83 Bug 1512601 - Call BackgroundHangMonitor().NotifyWait() before opening system modal dialogs (file picker, print dialog) on Windows, r=dthayer. 2018-12-13 14:17:14 +01:00
Alex Gaynor
d141b3b9e2 Bug 1513201 - Bug 1451308 - handle pasted data of certain types with an odd length; r=mats
Differential Revision: https://phabricator.services.mozilla.com/D14150

--HG--
extra : moz-landing-system : lando
2018-12-12 17:34:27 +00:00
Olli Pettay
b977d23eb2 Bug 1089326, make <button> hit testing similar to other elements which may have some content, and for click target find the common (interactive) ancestor, r=masayuki
--HG--
extra : rebase_source : 80caab4e074d552c38b62842fe3102fb6735dfd9
2018-12-11 23:35:40 +02:00
Dorel Luca
71501396ae Backed out changeset 47aeeaf1c35b (bug 1513201) for build bustage. CLOSED TREE 2018-12-12 00:44:57 +02:00
Alex Gaynor
e7bf50b579 Bug 1513201 - handle pasted data of certain types with an odd length; r=mats
Differential Revision: https://phabricator.services.mozilla.com/D14150

--HG--
extra : moz-landing-system : lando
2018-12-11 18:08:17 +00:00
James Willcox
a3138042ef Bug 1511063 - Only send GeckoView history messages when there are listeners r=lina,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D13432

--HG--
extra : moz-landing-system : lando
2018-12-10 22:58:31 +00:00
Jean-Yves Avenard
48517afae6 Bug 1512298 - Make IPDL MozPromise exclusive. r=gerald,froydnj
MozPromise most common use is to have an single or exclusive listener. By making the MozPromise generated by IPDL exclusive we can also use move semantics.

While at it, we also use move semantics for the ResponseRejectReason and via the callback's reject method so that the lambda used with the MozPromise::Then can be identical to the one used by the IPDL callback.
As it currently is, it provides no advantage over a copy as it's just an enum; however, this will facilitate future changes where it may not be.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 19:22:26 +00:00
Mark Banner
8c00ef3f30 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D13746

--HG--
extra : moz-landing-system : lando
2018-12-11 13:15: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
Makoto Kato
e1efe6db2a Bug 1508252 - Set temporary range when replacement range is available. r=masayuki
This issue is e10s only.

Even if calling SetSelection, it doesn't reset selection cache in
TextInputHandler.  Since selection cache is updated by OnSelectionChange
asynchronous, we should set temporary range when having replacement range.

Also, even if marking dirty doesn't fix this issue. Content cache may return
other range such as caret position instead of replacement range by SetSelection.

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

--HG--
extra : moz-landing-system : lando
2018-12-10 03:17:15 +00:00
Tim Nguyen
26a8d2fdb7 Bug 1486204 - Make nsLookAndFeel.mm return transparent selection colors. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D8210

--HG--
extra : moz-landing-system : lando
2018-12-10 22:41:46 +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
Matt Woodrow
e3453844bf Bug 1510853 - Introduce VsyncId and VsyncEvent for identifying vsyncs without timestamp comparisons. r=jrmuizel
MozReview-Commit-ID: 6TO6hYOdJYo

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

--HG--
extra : moz-landing-system : lando
2018-12-07 23:27:28 +00:00
Ciure Andrei
22c96f2cb4 Backed out 4 changesets (bug 1510853) for TelemetryHistogramEnums.h build bustages CLOSED TREE
Backed out changeset 80baa7b09930 (bug 1510853)
Backed out changeset d1ef6db7fc28 (bug 1510853)
Backed out changeset ae190948ad73 (bug 1510853)
Backed out changeset 0ade0aa77b2f (bug 1510853)
2018-12-07 19:38:47 +02:00
Matt Woodrow
6c3cd9bd00 Bug 1510853 - Introduce VsyncId and VsyncEvent for identifying vsyncs without timestamp comparisons. r=jrmuizel
MozReview-Commit-ID: 6TO6hYOdJYo

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

--HG--
extra : moz-landing-system : lando
2018-12-07 17:06:11 +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
Martin Stransky
45555dc042 Bug 1489902 - [Wayland/OpenGL] Don't draw to wl_surface owned by GtkWidget (mozcontainer) until it's commited, r=jhorak
Use frame callback to determine if we can draw to wl_surface owned by GtkWidget and use it as a base for EGL Window.

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

--HG--
extra : moz-landing-system : lando
2018-12-06 11:02:46 +00:00
Martin Stransky
0fa47e39e5 Bug 1511973 - [Wayland] Listen for keyboard layout changes on wl_seat again, r=jhorak
We can't listen on GdkDeviceManager as we need to track device changes here. Rvert back
the old working setup based on wl_seat listeners. Also check if the keyboard is already present
(before it's created here) to avoid memory leaks.

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

--HG--
extra : moz-landing-system : lando
2018-12-05 19:57:04 +00:00
A. Wilcox
e03384bf38 Bug 1505257 - add nglayout.debug.paint_flashing_chrome to paint debug pref value list r=mstange 2018-11-07 04:50:21 +00:00
Masayuki Nakano
2406aed7f3 Bug 1511752 - Make IMContextWrapper::OnKeyEvent() treat GDK_KEY_PRESS event without any key information in a dead key sequence as synthesized by current keyboard layout for asynchronous handling r=m_kato
Some keyboard layouts which have dead keys may handle dead key composition
asynchronously.  In this case, they don't rely on IME like iBus/Fcitx.

As far as I've tested, German (QWERTY) keyboard layout is one of such
keyboard layout.  This returns true when gtk_im_context_filter_keypress()
is called for a base character input (like "a").  Then, it synthesizes
GDK_KEY_PRESS event without any key information such as:
> { type=GDK_KEY_PRESS, keyval=(null), unicode=0x0, state=, time=0,
>   hardware_keycode=0, group=0 }
So, this is not marked as IBUS_IGNORED_MASK nor FcitxKeyState_IgnoredMask
by IME, but we should ignore this event since we should've already dispatched
"keydown" event for the preceding "a" key event, and anyway "keydown" event
for the synthesized event does not make sense for any web apps.

This patch makes IMContextWrapper::OnKeyEvent() ignore such key event, i.e.,
when it's in a dead key sequence, and GDK_KEY_PRESS does not have enough
information, e.g., hardware_keycode shouldn't be 0 especially for printable
keys.  Therefore, this patch make it check only hardware_keycode value and
gdk_keyval_to_unicode(aEvent->keyval) value.

If some keyboard layouts would send the original key event as is, we would
need to do more, but currently, this is enough and safe to land this timing.

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

--HG--
extra : moz-landing-system : lando
2018-12-03 15:15:13 +00:00
Martin Stransky
fcdee6dedb Bug 1491808 - [Linux/CSD/Titlebar] Force toplevel window repaint when titlebar rendering is enabled and its state changes, r=bzbarsky
Titlebar (StyleAppearance::MozWindowTitlebar) style depends on toplevel window focus
and we need to redraw it when toplevel window focus changes.

Unfortunately according to https://gitlab.gnome.org/GNOME/gtk/issues/1395
the toplevel window focus can't be used here as we can have active but unfocused
toplevel window during drag & drop.

Gtk+ controls window active appearance by window-state-event signal
but gecko uses focus-in/out signals, so we need to repaint the titlebar
when window-state-event comes *after* focus-in/out signals.

We can't call mWidgetListener->WindowActivated() (and WindowDeactivated())
as it was already called from focus-in/out handlers before window-state-event.

Depends on D13051

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

--HG--
extra : moz-landing-system : lando
2018-12-03 12:48:52 +00:00
Martin Stransky
572a588428 Bug 1491808 - Listen on window-state-event to set titlebar active/inactive state, r=jhorak
This is a workaround for https://gitlab.gnome.org/GNOME/gtk/issues/1395
Gtk+ controls window active appearance by window-state-event signal
but gecko uses focus-in/out signals.

So we need to set the the titlebar state
when window-state-event comes *after* focus-in/out signals.

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

--HG--
extra : moz-landing-system : lando
2018-12-03 12:48:35 +00:00
Martin Stransky
2768da18cb Bug 1511011 - Clean up wayland subsurface creation/management, r=jhorak
- Don't create wl_subsurface in map event but rather when it's requested by compositor.
- Don't create wl_surface at nsWindow::OnExposeEvent but check ready_to_draw instead.
- Rename parent_surface_committed_handler to frame_clock_after_paint_handler.
- Rename parent_surface_committed to ready_to_draw.
- Rename needs_clear to surface_needs_clear.

Depends on D13404

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

--HG--
extra : moz-landing-system : lando
2018-12-03 13:06:21 +00:00
Martin Stransky
2fd4d07afc Bug 1511011 - Removed moz_container_move as it's not used, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D13404

--HG--
extra : moz-landing-system : lando
2018-12-03 13:06:17 +00:00
Tooru Fujisawa
7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier
a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00