This patch is based on Karl Tomlinson's (:karlt) demo from Bug 1419456. We use gtk_window_set_titlebar()
to set invisible widget. The widget takes place of GtkHeaderBar which leads Gtk+ to render CSD shadows
and handle window resizing, it does not render any titlebar.
gtk_window_set_titlebar() works on unrealized windows only and mShell is already realized at time
of nsWindow::SetDrawsInTitlebar() call so we need to update recent GtkWidget setup.
In that case we create GdkWindow for mContainer (instead of mShell), create a temporary GtkWindow,
reparent mContainer (which owns mGdkWindow) to it, unrealize mShell and set up the titlebar
for mShell toplevel window.
As a workaround for Gtk+ Bug 791081 we also allocate some valid size for mShell before it's newly realized
with the updated titlebar.
MozReview-Commit-ID: A3KwRoOzoko
--HG--
extra : rebase_source : ded644762d3be9e79e3d407f57b2f9098021fb96
Remove unused classes and make classes that are not used outside of the
package package-private.
MozReview-Commit-ID: 9FxcL5QsM1Q
--HG--
extra : rebase_source : d9ed39d06a0e2aadec131d06c92cb11ef342a320
Let's make TextInputHandler::HandleCommand() handle other
commands which are caused by Backspace, Delete, Tab, ArrowUp,
ArrowDown, ArrowRight, ArrowLeft, PageUp, PageDown, Home, End
and Escape keys with various modifiers.
This patch makes Korean users can do most key operation in
editor even with composing Hangul character.
Note that this patch has a hack for cancelOperation: command.
The command is typically fired for Escape key press. However,
it's also fired for Command + Period. Unfortunately, this
behavior is really odd if subclass of NSResponder implements
|void cancelOperation:(id)sender|. If it's implemented,
Cocoa doesn't call its |void keyDown:(NSEvent)theEvent|.
Instead, it calls only |void doCommandBySelector:(SEL)aSelector|
and |void cancelOperation:(id)sender| when Command + Period is
pressed. Therefore, we cannot dispatch keydown nor keypress
event for this key combination if we implement it. Therefore,
this patch doesn't implement the method but handle it in
doCommandBySelector even though the super class of ChildView
cannot handle the command with this path.
MozReview-Commit-ID: 4hS23SiwNJv
--HG--
extra : rebase_source : 38ac1ea494b5f786ecd5c9327efbacd460b59faf
Currently, we handle insertNewline: of NSResponder with
TextInputHandler::InsertNewline(). However, its
implementation is useful for handling some other
commands. So, let's rename it to HandleCommand() and
make it take Command as its argument for handling
specific behavior of each command.
MozReview-Commit-ID: GgzQdTlVtYl
--HG--
extra : rebase_source : e1d1c8617897d29eb10ba62708e3549a77c6ee59
Use GeckoSession/LayerSession or GeckoView in Fennec code instead of
using LayerView.
MozReview-Commit-ID: Iod7XsqKy1e
--HG--
extra : rebase_source : 5917540422698f5526ca373f17c4358a712cdcef
The browser.tabs.drawInTitlebar check at nsLookAndFeel is redundant, breaks Thunderbird and dynamic titlebar rendering change. Let's use browser.tabs.drawInTitlebar at browser level and when enabled configure titlebar visibility by moz_gtk* media atoms.
MozReview-Commit-ID: IhCYmXgVME7
--HG--
extra : rebase_source : 6f152e5c3d7d5abbb134c9f5adcb76fd6ed335cb
With this patch print IPC no longer requires the child process to create files.
Instead files are opened by the parent and a file descriptor is sent to the
child. This will allow us to sandbox child processes more aggressively.
MozReview-Commit-ID: GQWTYLV01kj
--HG--
extra : rebase_source : 9b91e9b01708d73915a49684c2cec96457650e45
Enables override window manager default with those values:
MOZ_GTK_TITLEBAR_DECORATION=none - Firefox does not mess with decoration
MOZ_GTK_TITLEBAR_DECORATION=client - Firefox tries to disable titlebar rendering and draws shadows by client side decorations.
MOZ_GTK_TITLEBAR_DECORATION=system - Firefox tries to disable titlebar rendering and leave system (window manager) to draw window decorations.
MozReview-Commit-ID: G60QS3g1TD0
--HG--
extra : rebase_source : fd7b5d2b0282fbd54046947d210b1288a0610a23
This allows us to fire MozMouseHittest events from tests and then read
the hittest result from the compositor APZTestData. The MozMouseHittest
event was chosen in particular because the existing uses of it are
similar in nature - it is a dummy event that is used to determine what
elements a particular coordinate targets. It is also an event that is
never generated by the OS and so using this event gives us more control
over what ends up in the APZTestData.
MozReview-Commit-ID: KHjIX7EpK2A
--HG--
extra : rebase_source : f7d7d729c1935eefd49ed06d8644ff9ef537f2e1
We need apply various titlebar/border configuration which is based on active
window manager and desktop type. The XDG_CURRENT_DESKTOP shell variable contains active
desktop environment which we use at GetCSDSupportLevel().
Unfortunately Ubuntu adds "ubuntu:" prefix at XDG_CURRENT_DESKTOP so we can't do
plain string compare but rather search for DE substring at GetCSDSupportLevel().
MozReview-Commit-ID: GmAZ30p47eI
--HG--
extra : rebase_source : eeef51e7326bb8be6418554b07ce5791e988f02f
DBus strings can contain only [a-z][A-Z][0-9]_ chars. Encode profile name (used as part of interface name) by base64 and adjust it to avoid crashes (Bug 1418985).
MozReview-Commit-ID: J2SQHYRcWDW
--HG--
extra : rebase_source : 6ef46a1b390796021030fe0dc2e0294262eaea0c
When ContentCacheInParent::RequestIMEToCommitComposition() returns true,
the remote process will synthesize eCompositionCommit event. This causes
destroying TextComposition event in the remote process (by
IMEStateManager::DispatchCompositionEvent()). Then,
IMEStateManager::DispatchCompositionEvent() will recreate new TextComposition
instance when it receives new composition event. Then, it may request
to commit composition to the main process via PuppetWidget accidentally.
So, after PuppetWidget::RequestIMEToCommitComposition() synthesizes
eCompositionCommit, PuppetWidget should discard following composition events
until it receives eCompositionStart since they are unnecessary for the content
and they are for the old composition, i.e., outdated events.
MozReview-Commit-ID: BNRcoYxABpd
--HG--
extra : rebase_source : caea469afeed8cc373aeca33199ac0d570052569
Remove NPZC references from LayerView, and add an NPZC getter in
LayerSession. Use the new APIs in GeckoView to forward events to NPZC.
MozReview-Commit-ID: 1UcJkpW0XuM
--HG--
extra : rebase_source : 6f50d1ca9398a2549678cc4e0fbb2578d284f63a
Clean up the NativePanZoomController object including,
1) Remove references to LayerView because NPZC will be created and used
by LayerSession.
2) Rename `mDestroyed` to `mAttached` because NPZC now needs to support
cases where it's used before being attached, in addition to after being
destroyed.
3) Move origin of synthesized event coordinates from the screen to the
surface in native code, so we don't need to do the same thing in Java.
4) Invoke all callbacks from native code on the UI thread.
MozReview-Commit-ID: Fu4XIY59yKw
--HG--
extra : rebase_source : cb4d432cb940cfa92f3c0a931f1f2d2991932462
There is some overscroll handling code in NativePanZoomController that
should be moved, along with other overscroll code in LayerView, to
LayerSession. LayerSession now provides a getter for
OverscrollEdgeEffect, which is cleaned up to have a public API with
documentation.
MozReview-Commit-ID: LkKHFS8OkR7
--HG--
extra : rebase_source : dc6b680b1cc7d7e2dd221091a63a208971d63c80
ContentCacheInParent::mPendingCommitLength is never initialized until it
receives eCompositionCommit(AsIs) event from widget or receives the latest
content from the remote process when there is a composition.
The bug is, immediately after dispatching eCompositionStart and first
eCompositionChange event, MS Pinyin tries to query the character at caret,
but ContentCacheInParent::HandleQueryContentEvent() tries to resolve
related position of an eQueryTextRect event with the uninitialized
mPendingCommitLength. Therefore, the query almost always fails and MS Pinyin
gives up to show its candidate window.
This patch just initializes the member with 0.
MozReview-Commit-ID: JyYNqi8hoTa
--HG--
extra : rebase_source : bdc504f83abdbb21e11ea69290908ed501e9a65f