Commit Graph

1345 Commits

Author SHA1 Message Date
Martin Stransky
d9d0e359b8 Bug 1355143 - Size scrollbars with 'hover' Gtk+ state, r=jhorak
Ubuntu/Ambiance has tiny scrollbars when it's not hovered by mouse and large
ones when it's hovered/active. Our current Gtk+ toolkit code does not support such scrollbar
resize on the fly.

We use a workaround as we get size of active (hovered) scrollbar only and that
we pass to gecko. Then we draw scrolbar smaller when it's not hovered and full sized
when it's hovered.

MozReview-Commit-ID: mxt9q5Bcg9

--HG--
extra : rebase_source : f77304653f730ea1bca6fb453568f945b022c442
2018-04-18 11:09:19 +02:00
Martin Stransky
04bb88d159 Bug 1355143 - Provide ScrollbarGTKMetrics for active (mouse over) scrollbars, r=jhorak
MozReview-Commit-ID: 95d1jeQ8mXd

--HG--
extra : rebase_source : 44fd8d0df747b0ad6f8f4c6cbee442f5710d4006
2018-04-18 11:05:46 +02:00
Martin Stransky
a1bb7c1c32 Bug 1355143 - Implement CreateStyleContextWithStates to style with fully stated css path, r=jhorak
MozReview-Commit-ID: ENWBekzq4Oq

--HG--
extra : rebase_source : 6c6c63af840629d5454166dba9e074d9c72b0371
2018-04-18 11:03:39 +02:00
Brad Werth
624c7063e3 Bug 1451098 Part 1: Add asserts to widget/gtk/nsWindow.cpp to fail early when setting an invalid window size. r=karlt
MozReview-Commit-ID: GHq7ik6EyIl

--HG--
extra : rebase_source : eaabcd5603a71a1367aa89b787b30b47476df199
2018-03-23 15:40:02 -07:00
Jan Horak
360d03d095 Bug 1411589 - Notify flatpak print portal that print to file has finished, r=stransky
The GTK print portal is notified by the observer service with 'print-to-file-finished'
topic. The print filename is used as an identifier of the target in case multiple
printing jobs are in progress.

MozReview-Commit-ID: 1BZKDcK5De3

--HG--
extra : rebase_source : 5234aea32097cff4fc9f74f1b522cd04b2be8db1
2018-04-16 12:28:51 +02:00
Jan Horak
7628529d74 Bug 1411589 - Implement printing support for the flatpak portal, r=stransky
In the flatpak environment the applications do not have access to the printers.
They need to use printing portal implemented by DBUS interface. The patch
implements support for printing portal by introducing nsFlatpakPrintPortal class.
1. it request print portal to show the print dialog
2. waits until print dialog is finished
3. setup observer for 'print-to-file-finished' topic
4. pass file descriptor of the printed file to the portal when the observer is notified

MozReview-Commit-ID: 3nZtYx7KzK6

--HG--
extra : rebase_source : f116aff4d62ebaa38d0527f95daf4b36481ceb35
2018-04-05 16:44:35 +02:00
Jonathan Watt
1e7f76576a Bug 1436048 part 1 - Use a user defined type for font weight everywhere. r=jfkthame,emilio
--HG--
extra : rebase_source : 2e267ff99de6f52484e34ac15c39e5ca8b473394
2018-04-13 20:34:37 +01:00
Lee Salzman
43c1a4fcf5 Bug 1449352 - always composite 24 depth WindowSurfaceX11 as BGRX. r=jrmuizel
MozReview-Commit-ID: 3xeE3EEttR6
2018-04-10 12:43:59 -04:00
Andreea Pavel
0724b513f9 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-04-10 00:58:54 +03:00
James Willcox
aa5a061bc7 Bug 1446553 - Init gfxPlatform before checking if WebRender will be used r=karlt
MozReview-Commit-ID: EaAxB8hbT2E
2018-04-09 15:15:26 -05:00
Martin Stransky
4d956f9599 Bug 1452041 - nsClipboard::HasDataMatchingFlavors(): return immediately when there's no clipboard content, r=jhorak
MozReview-Commit-ID: CTz0tRr3p57

--HG--
extra : rebase_source : 500687c604957227dba8668a11f7c4f55c7fd175
2018-04-09 13:36:03 +02:00
Martin Stransky
f85923affa Bug 1449490 - [Wayland] Implement gtk_clipboard_request_text() by nsRetrievalContextWayland::GetClipboardText(), r=jhorak
MozReview-Commit-ID: 6qcXcA2qUmG

--HG--
extra : rebase_source : 797ae597153d57e27d747006de32affda97eacbe
2018-04-05 13:00:58 +02:00
Martin Stransky
6d77331196 Bug 1417892 - Implement primary clipboard selection under Wayland, r=jhorak
MozReview-Commit-ID: 7TTBSbx8qPX

--HG--
extra : rebase_source : 42e117a0fdf12e811429c4470a3945e8ccd8b6fe
2018-04-04 14:49:21 +02:00
Martin Stransky
3b001f7b5d Bug 1417892 - Added gtk-primary-selection-client-protocol header/source files from Gtk+ project, r=jhorak
MozReview-Commit-ID: G0dZBqM0vBk

--HG--
extra : rebase_source : b6b5b05c7718f372d6cd3b74ebecd1b13503e19f
2018-03-06 14:02:21 +01:00
Martin Stransky
3a5fb9d155 Bug 1447925 - Use GetClipboardText() to get text data at nsClipboard::GetData(), r=jhorak
MozReview-Commit-ID: 3JnLLyk0BOF

--HG--
extra : rebase_source : 7bd5faff15d805d19628bdbd9fcd194c89c283a4
2018-04-03 10:30:37 +02:00
Martin Stransky
d648a9a261 Bug 1447925 - Add GetClipboardText() to get text data from clipboard, r=jhorak
GetClipboardText() calls gtk_clipboard_request_text() to request text clipboard data from Gtk+
and leave Gtk+ to do clipboard text format conversions. Also unify data getting code for text/data/targets.

MozReview-Commit-ID: 9DGSdOACho1

--HG--
extra : rebase_source : f1d95609f8a7587a4abc11739db9d17ec5446a7b
2018-03-27 15:51:07 +02:00
Jeff Muizelaar
7bd5060424 Bug 1450134. Replace ToRelativeLayoutRect() with ToRoundedLayoutRect(). r=kats
This function doesn't use any StackingContextHelper state anymore.
We should make what it does clearer and move it to a better place.

--HG--
extra : rebase_source : 1727be9657169547d842ec9b6887837abedbefdf
2018-03-29 17:57:43 -04:00
Martin Stransky
705230d4aa Bug 1441873 - [CSD] Remove nsWindow::mIsCSDAvailable and replace with CSDSupportLevel state, r=jhorak
MozReview-Commit-ID: KOiSzNvZfjg

--HG--
extra : rebase_source : 146d55491e600409b73353bc71580eb1237e72f0
2018-03-22 13:22:38 +01:00
Martin Stransky
9c687dca1b Bug 1447270 - Use GLContextGLX::FindVisual() on GLX enabled builds only, r=jhorak
MozReview-Commit-ID: HB86kRurkDG

--HG--
extra : rebase_source : 6ee7900aba520a5ef182371edf074f32801b62e2
2018-03-27 11:39:52 +02:00
Nathan Froyd
4d8cb59be3 Bug 1448914 - remove nsISound::playSystemSound; r=masayuki
This API is deprecated (callers are supposed to be using
nsISound::playEventSound instead) and there are no callers remaining in
mozilla-central, or references to the strings for the API.  Let's remove
dead code.
2018-03-27 10:41:40 -04:00
sotaro
2ef480f239 Bug 1448271 - Update some names of #include guards r=nical 2018-03-23 22:40:04 +09:00
Boris Zbarsky
29d232e53f Bug 1447098 part 1. Rename FromContent on various DOM classes to FromNode. r=mystor
MozReview-Commit-ID: 202nkbmkwfR
2018-03-21 17:39:04 -04:00
shindli
55e9f63bac Merge inbound to mozilla-central. a=merge 2018-03-20 12:11:27 +02:00
Boris Zbarsky
1a7c5067ca Bug 1446851. Get rid of nsIDOMWheelEvent. r=qdot
We can't include WheelEventBinding.h in MouseEvents.h because that produces
this include loop:

WheelEventBinding.h -> MouseEventBinding.h -> UIEventBinding.h ->
nsGlobalWindow.h -> nsGlobalWindowInner.h -> nsRefreshDriver.h ->
AnimationEventDispatcher.h -> AnimationComparator.h -> Animation.h ->
EffectCompositor.h -> PseudoElementHashEntry.h -> Element.h ->
PointerEventHandler.h -> MouseEvents.h -> WheelEventBinding.h

MozReview-Commit-ID: 5KNwH69aJYW
2018-03-20 00:16:05 -04:00
Masayuki Nakano
e6ee7e1c05 Bug 1423693 - Make IMContextWrapper::Init() resolve actual IM if active IM context ID is "xim" and there is XMODIFIERS env r=m_kato
On some Linux environment, GTK_IM_MODULE env may be "xim".  Then, actual
IM is specified with XMODIFIERS env with "@im=".  Therefore, if active IM
context ID is xim, IMContextWrapper::Init() needs to look for actual IM name
in XMODIFIERS.

MozReview-Commit-ID: 1aGjBkF4AQn

--HG--
extra : rebase_source : 8c50baa517c61ec2d872c036abc989b4a07e8e36
2018-03-19 14:22:52 +09:00
Jeff Muizelaar
b0c6c75854 Bug 1439006. Allow multiple kinds of WebRenderUserData on a DisplayItem. r=mstange
Currently we can only have one type of WebRenderUserData on an Item. We already
have a hash table of WebRenderUserData so it's not hard to include type in the
hash to support one per type.

MozReview-Commit-ID: geJ0BeWv8b
2018-03-16 19:15:27 -04:00
James Willcox
8a43a8baff Bug 1401455 - Use correct GLX visual when rendering with WebRender r=karlt
MozReview-Commit-ID: AKT4bgdIkfV
2018-03-16 17:19:23 -05:00
James Willcox
1d6a993884 Back out Bug 1401455 due to Marionette failures on a CLOSED TREE 2018-03-16 11:19:40 -05:00
James Willcox
895d15231e Bug 1401455 - Use correct GLX visual when rendering with WebRender r=karlt
MozReview-Commit-ID: AKT4bgdIkfV
2018-03-16 08:39:48 -05:00
Masayuki Nakano
7744988cce Bug 1444571 - Prevent IIIM module from being unloaded with grabbing GtkIMContextIIIM class with static variable r=karlt
IIIMF is really old IME framework.  In these days, it's not used as default IM
module of any major distributions.  However, ATOK X which is old proprietary
IME requires IIIMF and it's still used by some Japanese IME users.  Therefore,
we need to take back the hack to prevent crash caused by IIIMF.

We did increment refcount of GtkIMContextIIIM class to prevent IIIM module
from being unloaded.  However, it was not ported when we changed default
toolkit from GTK2 to GTK3.  So, this is doing the porting.

Unfortunately, the instance of GtkIMContextIIIM is wrapped by opacity struct.
So, it's not safe to access the pointer with declaring a mimic struct.
Therefore, we should directly get GType from the name with calling
g_type_from_name("GtkIMContextIIIM") instead of using G_TYPE_FROM_INSTANCE()
and g_type_name().

MozReview-Commit-ID: GCZaSUtPiS9

--HG--
extra : rebase_source : 3b959023bf47fa26393fc04e722c9da79a50991d
2018-03-12 22:32:43 +09:00
Masayuki Nakano
162ea38a55 Bug 1444572 - IMContextWrapper should dispatch fake eKeyDown event during composition if active IM is uim r=m_kato
uim is an old IM which uses key snooper to listen to key events rather than
via filter key event API which should be called by applications.  It's still
used by Debian 9.x, so, we still need to support this.

Unfortunately, we cannot detect if uim actually uses key snooper because it's
switch by build option of uim.  Currently, Debian builds uim as using key
snooper.  So, we should assume uim uses key snooper always.  On the other
hand, somebody *might* use uim built as not using key snooper, so, let's
decide if uim uses key snooper with new pref,
"intl.ime.hack.uim.using_key_snooper", but its default should be true.

Note that ibus and Fcitx also have the mode to use key snooper (perhaps for
backward compatibility with uim).  However, it's not enabled in default
settings and even if it's enabled, Firefox is in whitelist in the default
settings of them for stop using key snooper.  Therefore, we don't need to
support key snooper mode for them unless we'll get some requests to
support their key snooping mode.

MozReview-Commit-ID: 6fTsfKrHzvo

--HG--
extra : rebase_source : 8ddf4541db635246e6bb0ddc73b012c9be001c6d
2018-03-12 15:41:39 +09:00
Andreea Pavel
067622ac36 Merge mozilla-inbound to mozilla-central. a=merge on a CLOSED TREE 2018-03-15 00:07:17 +02:00
Michael Webster
deda6780be Bug 1445503 - Use MIN instead of unnecessary CLAMP r=karlt
CLAMP is unnecessary as the minimum acceptable value is 0, and
progressPercent is unsigned. CLAMP can trigger the following warning/error in some builds:
error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]

--HG--
extra : rebase_source : 0dfcf4286a74adac03f7498f1d35fee069528826
2018-03-14 00:50:00 +02:00
Masayuki Nakano
28e4c11d86 Bug 1443421 - part 2: IMContextWrapper should dispatch eKeyDown or eKeyUp event as "processed by IME" even when IM sent some signals without sending key event again r=m_kato
ibus and fcitx usually post key event to other IME process, then, if it causes
some signals to updating composition string, they may not send the posted
key event to us again.  Then, IMContextWrapper dispatches neither eKeyDown nor
eKeyUp event since mProcessingKeyEvent becomes non-nullptr only while
OnKeyEvent() is called.  So, IMContextWrapper need to store key event if
OnKeyEvent() assumes that given key event is posted to different process.
Then, if IMContextWrapper receives some signals, it should dispatch eKeyDown
and eKeyUp event with stored key event.

Note that we cannot compare the pointer of first event and following event
directly even though usually both events are same address as far as I checked
because according to the source code of ibus, fcitx and GDK, they use
gdk_event_copy() to keep storing original event.  According to the document of
the API, it might just increment refcount.  However, the actual implementation
of the API always creates another instance and return it.  So, it might be
used same address by arena allocation or something accidentally.   Anyway,
we shouldn't compare them.  Instead, we need to compare each information of
two key events.  Unfortunately, we also cannot compare them simply.  Both
ibus and fcitx set unused bits of GdkEventKey::state to true when they send
back the event to us.  Therefore, we should compare some of or all of the
members by ourselves.  I think that matching time must be enough in most
cases since its value of native key events are properly set.  However, for
safer code, this patch also checks type, keyval and part of state.

MozReview-Commit-ID: FZSwN61v0Sd

--HG--
extra : rebase_source : e57a654392f476f5ec52d82bdd238eed2eb91e83
2018-03-09 12:39:40 +09:00
Masayuki Nakano
22ab980e4c Bug 1443421 - part 1: Make IMContextWrapper not dispatch eKeyDown and eKeyUp event if the native key event is being handled by other IME process r=m_kato
ibus and fcitx have asynchronous key event handling mode and it's enabled in
default settings.  That is, when they receive a key event from application via
a call of gtk_im_context_filter_keypress(), they may post the key event
information to other IME process, then does nothing but store the copy of the
event with gdk_event_copy() and returns true for the result of
gtk_im_context_filter_keypress().  When the other IME process handles the
event, returns the result to them in our process.  Then, they send the stored
key event to us again.  Finally, they actually handles the event in our process
actually.

Therefore, we may receive every key event twice.  So, this causes dispatching
eKeyDown event and eKeyUp event twice.  Preceding key event is always marked
as "processed by IME" since gtk_im_context_filter_keypress() returns true
temporarily and following key event is dispatched as expected.  So, we need
to ignore the first event only when gtk_im_context_filter_keypress() returns
true but the event is posted to different process.

Unfortunately, we cannot know if the key event is actually posted to different
process directly.  However, we can know if active IM is ibus, fcitx or another
one and if ibus or fcitx is in asynchronous key handling mode.

The former information is provided by gtk_im_multicontext_get_context_id().
It returns a string which is set to the IM multicontext instance by creator.
We'll get "ibus" if IM is ibus, get "fcitx" if IM is fcitx.

The latter information is not provided.  However, they consider the mode from
env value.  ibus checks IBUS_ENABLE_SYNC_MODE.  fcitx checks both
IBUS_ENABLE_SYNC_MODE and FCITX_ENABLE_SYNC_MODE.

Additionally, we can know if received key event has already been posted to
other IME process.  They use undefined bit of GdkEventKey::state to store
if the key event has already been posted (1 << 25, they called "ignored" flag).
Although their approach is really hacky but we can refer the information at
least for now.

Finally, when we guess a key event is posted to other IME process, let's
IMContextWrapper::OnKeyEvent() not dispatch eKeyDown nor eKeyUp event.
Note that if it's handled synchronously as unexpected, it may causes
dispatching one or more composition events and/or delete content event.
So, in such case, we dispatch a keyboard event for processing key event
anyway.  There is only once case we'll fail to dispatch keyboard event.
If we receive signals to dispatch composition events or delete content
command event when IM receives the result from other IME process but
it doesn't send the key event to us.  This will be fixed by the following
patch.

MozReview-Commit-ID: 94PrlnmQ3uJ

--HG--
extra : rebase_source : fc31b0293ff0f0688dd39b0094fdf8f98b6c64d3
2018-03-09 00:46:52 +09:00
Masayuki Nakano
3db8525089 Bug 1343451 - part 3-2: Make IMContextWrapper dispatch eKeyDown event or eKeyUp event if IME handles native key event but we have not dispatched DOM event for it yet r=m_kato
Currently, IMContextWrapper doesn't dispatch eKeyDown event and eKeyUp event
if it's handled by IME.  However, for conforming to UI Events, it should
not eat given keyboard events completely.

This patch makes IMContextWrapper dispatches eKeyDown event or eKeyUp event
before dispatching first event of composition events or content command
event.

MozReview-Commit-ID: H2jHpViTH5Q

--HG--
extra : rebase_source : a1f4127ba87e03e1ff97690f97fb7bf64b4d4818
2018-02-22 20:56:08 +09:00
Masayuki Nakano
896e893f72 Bug 1343451 - part 3-1: Make KeymapWrapper::InitKeyEvent() mark given key event as "processed by IME" if it has been handled by IME r=m_kato
For conforming UI Events spec, KeymapWrapper::InitKeyEvent() should initialize
mKeyCode and mKeyNameIndex with NS_VK_PROCESSKEY and KEY_NAME_INDEX_Process if
given keyboard event has already been handled by IME.

For making it know if given keyboard event has been handled by IME, this patch
adds additional bool argument to it and its callers.

Note that this patch changes keyCode value and key value of "keydown" event if
it's fired before "compositionstart" since Chromium does so on Linux.

MozReview-Commit-ID: FC3tfyeeopU

--HG--
extra : rebase_source : b7e2a70db1fbb4ca7d20379fd1c14f7dc38e656d
2018-02-22 19:52:53 +09:00
Dorel Luca
4295ed1070 Backed out 2 changesets (bug 1443421) for Valgrind leak on Linux x64 opt
Backed out changeset 6afa399e604a (bug 1443421)
Backed out changeset edc1455e7082 (bug 1443421)
2018-03-14 12:31:23 +02:00
Dorel Luca
b10a3945a4 Backed out changeset e226de7caa88 (bug 1444572) for conflicts while backing out 1443421 2018-03-14 12:28:59 +02:00
Masayuki Nakano
d23a5323b4 Bug 1444572 - IMContextWrapper should dispatch fake eKeyDown event during composition if active IM is uim r=m_kato
uim is an old IM which uses key snooper to listen to key events rather than
via filter key event API which should be called by applications.  It's still
used by Debian 9.x, so, we still need to support this.

Unfortunately, we cannot detect if uim actually uses key snooper because it's
switch by build option of uim.  Currently, Debian builds uim as using key
snooper.  So, we should assume uim uses key snooper always.  On the other
hand, somebody *might* use uim built as not using key snooper, so, let's
decide if uim uses key snooper with new pref,
"intl.ime.hack.uim.using_key_snooper", but its default should be true.

Note that ibus and Fcitx also have the mode to use key snooper (perhaps for
backward compatibility with uim).  However, it's not enabled in default
settings and even if it's enabled, Firefox is in whitelist in the default
settings of them for stop using key snooper.  Therefore, we don't need to
support key snooper mode for them unless we'll get some requests to
support their key snooping mode.

MozReview-Commit-ID: 6fTsfKrHzvo

--HG--
extra : rebase_source : 8ddf4541db635246e6bb0ddc73b012c9be001c6d
2018-03-12 15:41:39 +09:00
Masayuki Nakano
863964eb27 Bug 1443421 - part 2: IMContextWrapper should dispatch eKeyDown or eKeyUp event as "processed by IME" even when IM sent some signals without sending key event again r=m_kato
ibus and fcitx usually post key event to other IME process, then, if it causes
some signals to updating composition string, they may not send the posted
key event to us again.  Then, IMContextWrapper dispatches neither eKeyDown nor
eKeyUp event since mProcessingKeyEvent becomes non-nullptr only while
OnKeyEvent() is called.  So, IMContextWrapper need to store key event if
OnKeyEvent() assumes that given key event is posted to different process.
Then, if IMContextWrapper receives some signals, it should dispatch eKeyDown
and eKeyUp event with stored key event.

Note that we cannot compare the pointer of first event and following event
directly even though usually both events are same address as far as I checked
because according to the source code of ibus, fcitx and GDK, they use
gdk_event_copy() to keep storing original event.  According to the document of
the API, it might just increment refcount.  However, the actual implementation
of the API always creates another instance and return it.  So, it might be
used same address by arena allocation or something accidentally.   Anyway,
we shouldn't compare them.  Instead, we need to compare each information of
two key events.  Unfortunately, we also cannot compare them simply.  Both
ibus and fcitx set unused bits of GdkEventKey::state to true when they send
back the event to us.  Therefore, we should compare some of or all of the
members by ourselves.  I think that matching time must be enough in most
cases since its value of native key events are properly set.  However, for
safer code, this patch also checks type, keyval and part of state.

MozReview-Commit-ID: FZSwN61v0Sd

--HG--
extra : rebase_source : e54284c27a171f899a6cf87a65935669e2d57021
2018-03-09 12:39:40 +09:00
Masayuki Nakano
6a306796a7 Bug 1443421 - part 1: Make IMContextWrapper not dispatch eKeyDown and eKeyUp event if the native key event is being handled by other IME process r=m_kato
ibus and fcitx have asynchronous key event handling mode and it's enabled in
default settings.  That is, when they receive a key event from application via
a call of gtk_im_context_filter_keypress(), they may post the key event
information to other IME process, then does nothing but store the copy of the
event with gdk_event_copy() and returns true for the result of
gtk_im_context_filter_keypress().  When the other IME process handles the
event, returns the result to them in our process.  Then, they send the stored
key event to us again.  Finally, they actually handles the event in our process
actually.

Therefore, we may receive every key event twice.  So, this causes dispatching
eKeyDown event and eKeyUp event twice.  Preceding key event is always marked
as "processed by IME" since gtk_im_context_filter_keypress() returns true
temporarily and following key event is dispatched as expected.  So, we need
to ignore the first event only when gtk_im_context_filter_keypress() returns
true but the event is posted to different process.

Unfortunately, we cannot know if the key event is actually posted to different
process directly.  However, we can know if active IM is ibus, fcitx or another
one and if ibus or fcitx is in asynchronous key handling mode.

The former information is provided by gtk_im_multicontext_get_context_id().
It returns a string which is set to the IM multicontext instance by creator.
We'll get "ibus" if IM is ibus, get "fcitx" if IM is fcitx.

The latter information is not provided.  However, they consider the mode from
env value.  ibus checks IBUS_ENABLE_SYNC_MODE.  fcitx checks both
IBUS_ENABLE_SYNC_MODE and FCITX_ENABLE_SYNC_MODE.

Additionally, we can know if received key event has already been posted to
other IME process.  They use undefined bit of GdkEventKey::state to store
if the key event has already been posted (1 << 25, they called "ignored" flag).
Although their approach is really hacky but we can refer the information at
least for now.

Finally, when we guess a key event is posted to other IME process, let's
IMContextWrapper::OnKeyEvent() not dispatch eKeyDown nor eKeyUp event.
Note that if it's handled synchronously as unexpected, it may causes
dispatching one or more composition events and/or delete content event.
So, in such case, we dispatch a keyboard event for processing key event
anyway.  There is only once case we'll fail to dispatch keyboard event.
If we receive signals to dispatch composition events or delete content
command event when IM receives the result from other IME process but
it doesn't send the key event to us.  This will be fixed by the following
patch.

MozReview-Commit-ID: 94PrlnmQ3uJ

--HG--
extra : rebase_source : 0bb58ed432bacef8ad13264babd2b21fe950b71c
2018-03-09 00:46:52 +09:00
Masayuki Nakano
48703c7384 Bug 1443091 - IMContextWrapper should dispatch eKeyDown and eKeyUp event as "Dead" keys rather than "Process" if user pressed a dead key r=m_kato
On Linux, dead key is implemented with "table-based input methods" which are
available even on GtkIMContextSimple (i.e., available even in password fields).
Therefore, IMContextWrapper handles dead key sequence as usual composition of
IME.  However, on the other platforms, we dispatch "Dead" eKeyDown and eKeyUp
events for dead key.

We started to mark keyboard events which are handled by IME as "processed by
IME" since bug 1343451, i.e., we started to set mKeyNameIndex to
KEY_NAME_INDEX_Process.  However, we should keep previous behavior, i.e., keep
setting it to KEY_NAME_INDEX_Dead.  Fortunately, GDK's key event tells us
whether the keyboard event is a dead key event with keysym.  So, we can detect
if we're in a dead key sequence simply.

MozReview-Commit-ID: Dv336WptfXN

--HG--
extra : rebase_source : e8a7b5a7eb7c57e1e45de20ebebd56f88457cfc6
2018-03-05 22:03:58 +09:00
Martin Stransky
41ee718162 Bug 1439834 - Draw titlebar with some extent, r=dao
Some themes (Adwaita for instance) draws bold dark line at
titlebar bottom. It does not fit well with Firefox tabbar UI so
draw themed titlebar with some extent to make the titlebar
bottom part invisible (it's clipped by cairo).

MozReview-Commit-ID: 3rs4UzFJdPa

--HG--
extra : rebase_source : ca9270f549a3106711afac8ee0c7a30839ab2bf3
2018-02-28 14:28:40 +01:00
Martin Stransky
0a0c720a69 Bug 1443481 - [Linux/Titlebar] Construct widget tree to get correct titlebar icon style before we render the actual icon, r=jhorak
MozReview-Commit-ID: DEb2pU31os9

--HG--
extra : rebase_source : f68034829b16c9def34436dc6e33b393865348bc
2018-03-06 16:45:19 +01:00
Michael Webster
1a8239407b Bug 1418749 - Add a TaskbarProgress implementation for gtk3/x11. r=paolo,karlt
This adds support for download progress reporting via the XApp
method currently used in the Cinnamon desktop, by establishing a new
X11 window property to be supported/read by the window manager.

See https://github.com/linuxmint/xapps/blob/master/libxapp/xapp-gtk-window.c,
as well as https://github.com/linuxmint/muffin/commit/39045da0ea06f
for more details.

The property-setting code lives in nsWindow - it's a small and stable
enough chunk that it made more sense to do this than actually depend on
another external library.  As nsWindow is already using x11 calls, this
seemed the safest place for it, without affecting the build.

The TaskbarProgress instance is initialized via the DownloadsTaskbar
js module, and is handed a pointer to the current main window to call
SetProgress on.  Most of the javascript side of this is in line with
how the other platforms are handled.

Without a supporting window manager/desktop environment (currently just
Cinnamon/Muffin 3.6,) the simplest way to observe working behavior is
by calling 'xprop -spy' on the browser window being testing and watching
for updates during a download.

--HG--
extra : rebase_source : 0606f6c87116204ec290c19276072d0c1c35691e
2018-03-08 18:43:00 +02:00
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