ContentEventHandler will need to support query any types of selection. Therefore, it cannot use nsCopySupport::GetSelectionForCopy(). Instead, a part of it should be implemented by nsIPresShell::GetSelectionControllerForFocusedContent() and it should be shared by nsCopySupport::GetSelectionForCopy() and ContentEventHandler.
MozReview-Commit-ID: 1ItkkIUPFMG
--HG--
extra : rebase_source : 3d33a76ebe52bad0ba7fbe332fc06500a2a007d7
TextComposition queries selection start offset a lot of times. Therefore, for reducing the runtime cost, it should use IMEContentObserver if it's available or ContentEventHandler, otherwise.
MozReview-Commit-ID: 61GgQZDX2HP
--HG--
extra : rebase_source : 2080f77fa36e967e070495b11cc7b72e42e63fd1
When composition string hasn't been non-empty, insertion point of the composition string can be changed by a DOM event handler. E.g., compositionstart, first compositionupdate and first text. Therefore, TextComposition should update the composition start offset cache after every event dispatch.
MozReview-Commit-ID: FOPewPTRuCn
--HG--
extra : rebase_source : 95fbba8130a1d21e957cee305b3b2a433bfae56a
It's enough to store target clause offset from start of the composition and better to modify mCompositionStartOffset because when even if mCompositionStartOffset is changed, we don't need to modify the target clause offset.
This patch renames mCompositionTargetOffset to mTargetClauseOffsetInComposition.
MozReview-Commit-ID: 1wt2OTUUjkY
--HG--
extra : rebase_source : 1bb87899c6f2e374252aaa00535915d42c6bb29d
Setting MOZ_DEBUG_SYMBOLS as a define was not moved, as this value is not
checked, and exporting MOZ_DEBUG_SYMBOLS was not moved, as this would only
impact nspr, and we're no longer using the nspr build system.
MozReview-Commit-ID: EvBTunhxcsr
This also fixes the issue of processing the artifacts twice in some
situations (bug 1275673). Note that the artifact download no longer
happens when a specific target is passed to 'mach build'.
MozReview-Commit-ID: Ktys6u3r1kG
Add FennecEmulatorRunner (for convenience), FennecRunner, FennecContext
and EmulatorAVD.
Common behaviour is defined in BaseEmulator and RemoteContext to distinguish
from B2G and Fennec specifics. I've tried to decouple ArchContext from
B2GContext, as well.
The emulator/adb commands in FennecRunner and EmulatorAVD are intended to
match the behaviour seen in current Android automation (e.g. mochitest).
MozReview-Commit-ID: 1tqD0DStdHR
--HG--
extra : rebase_source : 1450f3b03f82a0f9d33e43d19632a06a51ef7253
The IPDL code unconditionally calls forget() on any Shmem instances that are
sent over the IPC channel. This means that if the child process has a
SurfaceDescriptor containing a Shmem (such as a shmem-type SurfaceDescriptorBuffer)
then the shmem object in it will be zeroed out after sending it over IPC. In
order to still have access to the underlying SharedMemory, we need to make a
copy of the shmem or SurfaceDescriptor before doing the IPC call. Note that this
is true for safe and unsafe shmems.
MozReview-Commit-ID: KjEhPNiQhf9
In all of the places touched by this patch, the smart pointer we're
appending is about to become unused, so simply .forget()'ing its
reference into the appropriate nsCOMArray works just fine.
In an expression such as:
const auto& x = cond() ? AClass(...) : AClass();
the C++ standard specifies that the copy constructor of AClass is
invoked on the result of the conditional expression ([expr.cond]p6).
GCC does not honor this part of the specification, whereas clang does;
clang therefore complains about instances of code such as:
const auto& jstrVal = type == widget::PrefsHelper::PREF_STRING ?
jni::StringParam(strVal, aPrefName.Env()) :
jni::StringParam(nullptr);
as jni::StringParam is not copy-constructable.
The simplest solution that does not introduce unnecessary allocation
uses mozilla::Maybe to hold the temporary objects and to hide some of
the details of constructing objects in-place. The compiler may even be
able to optimize away some of the unnnecessary checks that Maybe
introduces (e.g. checking for whether the Maybe is a Some or None at
certain points).