Currently, WindowsEMF::InitForDrawing can be used once. With the change in this
patch, we can call WindowsEMF::InitForDrawing and Playback/SaveToFile in pair
as many times as we want.
MozReview-Commit-ID: 4fbY4Q6i9v5
--HG--
extra : rebase_source : 4df3fc7d8663d7f552c96204a16d73261bfc9dd7
Englightenment closes fd 0 on child processes and so pipe() can return a zero fd.
MozReview-Commit-ID: 5d9xQXgwgfv
--HG--
extra : rebase_source : c31aa7ce731ba325993f463b79b446ae67c932dd
CopySurface doesn't respect any existing clips that are applied to the draw
target. It doesn't look like nsNativeThemeGTK uses CopySurface normally, but
when OMTP is enabled the draw target is a DrawTargetCapture which can't
LockBits() which causes us to use CopySurface. This can cause a reftest failure.
MozReview-Commit-ID: 1mYMhQB0r3M
--HG--
extra : rebase_source : d2683dee37ce32049d8daeee786cbb06ba624438
extra : amend_source : 59c48b66f733108636d52047a55889ee0c4e2746
Because UBSan complains about casting -1:
> runtime error: load of value 4294967295, which is not a valid value for type 'nsCursor'
--HG--
extra : rebase_source : 037a96700228ea0d427afa7c25c40490c701cdc4
Due to the indeterminate nature of Gecko shutdown, the ref count of the
nsWindow on Android would sometimes go to zero before the XPCOM shutdown
observer was called in nsBaseWindow which is where the compositor thread
IPC is shutdown. If nsBaseWindow::Shutdown does not get called, then the
compositor thread IPC is shutdown in the nsBaseWindow destructor.
Unfortunately while the nsWindow is being deleted, it can be accessed in
the compositor thread and cause a crash in
LayerManagerComposite::RenderToPresentationSurface.
Calling nsBaseWidget::DestroyLayerManager() in nsWindow::Destroy()
ensures it gets called before the destructor gets invoked typically in
the Destroy() call.
MozReview-Commit-ID: KCv8SCmEjnb
--HG--
extra : rebase_source : f48fe01b15ff7e2e8763628dd22a2c926d051e9d
Due to content sandbox, NSPrintJobSavingURL will throws an exception on content process. So we don't use NSPrintJobSavingURL on content process and print.print_via_parent=true.
Also, even if chrome process, SetToFileName should store file name to mToFileName. Because SetToFileName uses mToFileName.
MozReview-Commit-ID: J7vlOG0gyGP
--HG--
extra : rebase_source : dfda2f625ca9dabefe131e40424609a2b921d430
A nsPrintOptionsImpl has char16_t internal variables, and gecko will not release
these allocated variable. So we should use nsString instead of char16_t.
MozReview-Commit-ID: 4ZMtUKoVCcR
--HG--
extra : rebase_source : 1720483301b900f8135c3d5f8f32d7051191aa8f
We'll need it to determine if NV12 D3D11 surface are operationals.
MozReview-Commit-ID: FvsxGhnv7H1
--HG--
extra : rebase_source : 4580819b19aa36d7d26ee7d05934eaaddd17206a
Currently, we initialize TSF modules when there is only message window (this
started from bug 1341915). At this time, QQ Input (Simplified Chinese TIP)
fails to initialize itself.
Therefore, we should put off to initialize TSF modules after creating first
normal window. Then, initialize its IMC and input context for the window.
IMEHandler::InitInputContext() should be called when each normal window is
created. Therefore, calling Initialize() from it can guarantee there is
at least one normal window when Initialize() is called.
MozReview-Commit-ID: IfR4y3pYv6J
--HG--
extra : rebase_source : 3f36acfa65567f140eea9c7fc12d6268aadbd5ef
Additionally, do not call RegisterDragDrop for hidden windows.
MozReview-Commit-ID: Fv8j9FntGGT
--HG--
extra : rebase_source : fccbc576887d000805da8ac915d16fc4fddfeceb
This fixes improper usages of Find where an offset was actually being use for
the boolean ignore case flag. It also fixes a few instances of passing in a
literal wchar_t to our functions where a NS_LITERAL_STRING or char16_t should
be used instead.
This fixes improper usages of Find where an offset was actually being use for
the boolean ignore case flag. It also fixes a few instances of passing in a
literal wchar_t to our functions where a NS_LITERAL_STRING or char16_t should
be used instead.
--HG--
extra : rebase_source : 5de1e9335895d65e6db06c510e8887d27be3390f
extra : source : f762f605dd83fc6331161a33e1ef5d54cafbd08d
The kEnableSelectionRB flag is already set in nsPrintEngine code and the generic
nsPrintOptions::SerializeToPrintData() serializes this flags, so we don't need
to check NSPrintSelectionOnly and we don't need to override the kEnableSelectionRB
setting in nsPrintOptionsX::SerializeToPrintData().
MozReview-Commit-ID: I3iYdx5OQCp
--HG--
extra : rebase_source : e66c0bf2538b546e4778b7b2ea640642cedb3aca
GTK should be used only from the main thread, but the specific symptom before
this change was that creating a GtkEntry causes
pango_cairo_font_map_get_default() to be called. This function returns a
different font map on each thread. The font map is leaked when StyleThreads
are leaked at exit.
Font caches are usually expensive and so using the existing font map on the
main thread is preferable.
A GtkEntry already exists on the main thread, as well as style contexts for
most other system fonts, and so it is more efficient to create these on the
main thread while the style contexts exist.
Doing this also avoids the need for Gecko_nsFont_InitSystem() to hold a global
lock to avoid concurrently calling into GTK through LookAndFeel::GetColor().
MozReview-Commit-ID: DSOwEUeYmtV
--HG--
extra : rebase_source : 971bc565e465b2d2482308006f68451ecaa6e264
This old code no longer builds and is superseded by the GTK3 port.
See also bug 1278282.
MozReview-Commit-ID: 9KyrPuNAluv
--HG--
extra : rebase_source : 8d5de061743e0281bf4ed03c68286512e7b492e9
If a keydown event handler moves focus like Ctrl+PageDown handler, IM context
may be changed to DISABLED or something. In such case, native IME would stop
current composition because focus moving in Gecko causes making IME blurred.
However, IMContextWrapper::DispatchCompositionStart() always dispatches
eCompositionStart even in such case.
So, it should stop dispatching eCompositionStart if IME enabled state is
changed during dispatching the preceding keydown event.
Note that this patch moves the setter of mComposingContext from
OnStartCompositionNative() which is a signal listener of "preedit_start" to
DispatchCompositionStart() because if IME starts composition without
"preedit_start" signal, DispatchCompositionStart() will be called but
OnStartCompositionNative() isn't called. However, this fix needs
mComposingContext.
MozReview-Commit-ID: F3F6NuCOrkJ
--HG--
extra : rebase_source : 513528eba0f29eb9b6ce8c5f47e4badbde9cbdb8
Doing this avoids -Wundefined-var-template warnings with clang. This
warning is mostly harmless (clang is trying to tell you a linker error
might be awaiting you later), but being careful with this might make
using C++ modules easier somewhere down the line.
clang seems to think that `Base` is unused despite its obvious uses
inside this class. We can deal with the `Base::` qualifications for
name lookup by using `this->` instead, and the other uses of `Base::`
can simply use the explicit name of the superclass.
Prevent default on pointerdown will stop firing the subsequent mouse events. Ignore the case that preventDefault by WebExtensions to avoid breaking some websites.
MozReview-Commit-ID: 9ztW1WfEg9a
With this change, we are able to load PDFium engine from different library.
MozReview-Commit-ID: ErAZCPRzRR5
--HG--
extra : rebase_source : f0421af9c70d69564ed8f96d32870314871aabef
* OSX
Make the lock of the type kIOPMAssertionTypeNoDisplaySleep and kIOPMAssertionTypeNoIdleSleep
as a singleton. Won't need to require an extra lock.
* Windows
Add |mRequireForDisplay| to ensure the "audio-playing" won't overwrite the previous
display requirement.
* Android
Add "audio-playing" and "video-playing", and make sure the audio-lock won't be cancel
when receiving "WakeLockDelegate.STATE_LOCKED_BACKGROUND".
MozReview-Commit-ID: 97oNX7H2qij
--HG--
extra : rebase_source : 24fa8b267ad97d668fa55462d1f61ef5c92b632f
According to [1], kIOPMAssertionTypeNoDisplaySleep prevents display sleep and
kIOPMAssertionTypeNoIdleSleep prevents idle sleep.
We should use kIOPMAssertionTypeNoIdleSleep for audio playing, because it won't
need to block the display.
[1] https://developer.apple.com/library/content/qa/qa1340/_index.html
---
On Windows, ES_DISPLAY_REQUIRED forces display on, and ES_SYSTEM_REQUIRED forces
system on working state [2].
[2] https://msdn.microsoft.com/zh-tw/library/windows/desktop/aa373208(v=vs.85).aspx
MozReview-Commit-ID: Izs29PdzQOW
--HG--
extra : rebase_source : d0726131735b9cedf566f937204e585345b9d5e3
For knowing the wake lock usage more clearly, we should use more specific topic name.
In OSX, you can use "$ pmset -g assertions" to check all the wakelock.
In Windows, using "$ powser -energy" to generate the energy report.
MozReview-Commit-ID: rAXnkxTvLc
--HG--
extra : rebase_source : 42ebf204673d3c913739f64c71c24af20d37c95d
Bug 1354020 causes that IMM-IME on Windows 7 doesn't work with --no-remote. Although I think that this issue is OS or IME bug, when default window proceduce by RegisterClass is DefaultWindowProcW, Google Japanese IME doesn't work.
I am not sure why this issue occurs when lpfnWndProc is DefWidnowProcW and DDE isn't started. But for workaround, we should revert a part of bug 1354020 changes.
MozReview-Commit-ID: BkxlZnm8mIh
--HG--
extra : rebase_source : 21c1d86fb5628dbd726a15e5057a536271cfb26d
This is straightforward, with only two notable things.
- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
throughout, because all nsXPIDLString.h did was include nsString.h. The
exception is for files which already include nsString.h, in which case the
patch just removes the nsXPIDLString.h inclusion.
- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
cover some of its ground, e.g. testing Adopt(nullptr).
--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.
--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
Telemetry and some performance profiles show that Msg_NotifyIMEFocus can take
a few seconds to complete, and jank the browser. With bug 1217700, it removes
the necessity of sync Msg_NotifyIMEFocus, so in this patch we make this async
for performance improvement.
MozReview-Commit-ID: 15eUwMJ2Q7H
--HG--
extra : rebase_source : b463e6e881ca5ebec00d0f76e29ca103059b3ddd