One thing we do in the Fennec CLH is to make a speculative connection
based on the URI that's passed in. However, by the time the CLH runs,
we're far along into startup, and the advantage of a speculative
connection is reduced. This patch implements making speculative
connection as a method in GeckoThread, so that Fennec can make a
speculative connection without relying on the Fennec CLH.
Many Gecko operations depend on the profile being available. This
patch adds a PROFILE_READY Gecko state so that we can queue calls
until profile is loaded.
In preparation for making CurrentX11TimeGetter capable of performing an
asynchronous request of the current time, this patch revises the lifetime of
such objects so that they are stored on nsWindow.
This patch revises the logic in SystemTimeConverter to detect backwards and
forwards skew between the two time sources: the native time source (represented
by the Time type) and the time source used to generate TimeStamp objects.
Previously the CurrentX11TimeGetter and CurrentWindowsTimeGetter classes acted
as functors with a single operator() method. In preparation for handling clock
skew, this patch refactors these two helper classes into regular classes with
two named methods:
GetCurrentTime which matches the existing operator() method, and
GetTimeAsyncForPossibleBackwardsSkew which will be used when possible
backwards skew is detected to fetch the current time asynchronously.
Some renaming is also included to match the expanded role of these classes.
This patch adds a helper class to widgets/gtk/nsWindow.cpp similar to the one in
widgets/windows/nsWindow.cpp and uses it to convert native event times to
mozilla::TimeStamp objects on events returned by this class.
This is similar to the operations performed for Windows native event times that
were added in bug 77992.
This patch exploits the fact that the underlying Time type is an unsigned
integer to simplify some of the overflow checks in SystemTimeConvert by relying
on unsigned integer overflow behavior, which, unlike signed integer overflow, is
well-defined.
Various operations in the time conversion assume that the native event time is
an unsigned integer so this patch adds and assertion to check this precondition
is met.
This just moves the code from widget/windows/nsWindow.cpp to a template class in
widget/xpwidgets/WrappingTimeConverter.h so that we can reuse this code for
other platforms (GTK at least).
GTK versions prior to 2.24 incorrectly advertise themselves as able to print PDFs,
even when they can't. We were wholesale setting the output format to PostScript for
these older GTK versions, without giving the user the opportunity to override
it. We now lazily determine whether or not the output should be in PostScript,
which should give the user the opportunity to override.