Commit Graph

22537 Commits

Author SHA1 Message Date
Wes Kocher
519bb0922b Merge inbound to central, a=merge
MozReview-Commit-ID: EK8iFR1hSRp
2017-09-18 16:21:01 -07:00
Ryan Hunt
5823900855 Bug 1397083 - Don't use CopySurface when drawing theme with nsNativeThemeGTK. r=lsalzman
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
2017-09-13 15:03:34 -04:00
Nicholas Nethercote
ebf1cb320b Bug 1400148 - Don't use -1 to represent an unset nsCursor. r=karlt.
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
2017-09-15 14:34:37 +10:00
Stephen A Pohl
7081d0c7e8 Backout f89ae3c450ce (bug 1324892) for busting Thunderbird. r=me 2017-09-16 00:09:31 -04:00
Stephen A Pohl
cbdf6d6f74 Bug 1398582: Prevent drawing titles in title bars on macOS 10.13 when we don't want them. r=mstange 2017-09-15 11:05:11 -04:00
Sebastian Hengst
ec66bbd3e1 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4dRrVdftJVy
2017-09-15 11:05:11 +02:00
Randall Barker
0cc6f26617 Bug 1392705 - part 3: Call nsBaseWidget::DestroyLayerManager() in nsWindow::Destroy to ensure IPC is not shutdown in the destructor for Android r=jchen
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
2017-09-05 13:00:06 -07:00
Markus Stange
0704012f36 Bug 1387594 - Add system colors for use in conjunction with -moz-font-smoothing-background-color and vibrant -moz-appearances. r=dbaron
MozReview-Commit-ID: IxXZwONxy41
2017-09-14 23:09:48 +02:00
Markus Stange
b5fdbfc62c Bug 1387594 - Stop getting the font smoothing background color from the theme. r=mattwoodrow
MozReview-Commit-ID: 2r1B8SvEkEl
2017-09-14 23:09:47 +02:00
Makoto Kato
17357e00a7 Bug 1397986 - Save to PDF doesn't work with content sandbox. r=haik
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
2017-09-10 17:49:30 +09:00
Sebastian Hengst
006a58c35d merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 2iVDKexRjxu
2017-09-13 23:58:43 +02:00
Sebastian Hengst
7dd2b068b5 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-09-13 13:35:21 +02:00
Andrea Marchesini
57228a9b15 Bug 1359017 - onmessageerror for WindowEventHandlers in case StructuredClone algorithm fails when deserializing, r=masayuki, r=smaug 2017-09-13 05:59:06 +02:00
Sebastian Hengst
66969c6b7b Backed out changeset 7b45c1aebf7f (bug 1359017) 2017-09-13 08:56:13 +02:00
Andrea Marchesini
68fed142b9 Bug 1359017 - onmessageerror for WindowEventHandlers in case StructuredClone algorithm fails when deserializing, r=masayuki, r=smaug 2017-09-13 05:59:06 +02:00
Mantaroh Yoshinaga
355019fdec Bug 1399336 - Memory leak of char16_t internal variables of widget/nsPrintOptionsImpl.cpp r=m_kato
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
2017-09-13 14:23:59 +09:00
Jean-Yves Avenard
21b23b41d6 Bug 1352016 - P2. Allow nsIGfxInfo service in GPU process on Windows. r=dvander
We'll need it to determine if NV12 D3D11 surface are operationals.

MozReview-Commit-ID: FvsxGhnv7H1

--HG--
extra : rebase_source : 4580819b19aa36d7d26ee7d05934eaaddd17206a
2017-09-13 16:35:14 +02:00
Sebastian Hengst
f155e6119f Backed out changeset e28d6869f6a0 (bug 1359017) 2017-09-12 14:16:31 +02:00
Andrea Marchesini
92ba78b8c0 Bug 1359017 - onmessageerror for WindowEventHandlers in case StructuredClone algorithm fails when deserializing, r=masayuki, r=smaug 2017-09-12 11:57:26 +02:00
Masayuki Nakano
4b414a44a2 Bug 1395876 - Initialize TSF modules after we create first normal window r=m_kato
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
2017-09-08 16:26:54 +09:00
Wes Kocher
2a30786cad Merge inbound to central, a=merge
MozReview-Commit-ID: 4FEkd1x2GD
2017-09-08 13:36:31 -07:00
Jim Mathies
2a7901349f Bug 1387507 - Remove a11y e10s checks and preferences. r=felipe 2017-09-08 09:31:06 -05:00
Sebastian Hengst
e52b8eb6e4 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: E6LQYNHgmiv
2017-09-08 10:53:26 +02:00
Karl Tomlinson
00beb33110 bug 1396722 remove no-op ReleaseStyleContext() r=stransky+263117
MozReview-Commit-ID: DgKM0wrStrk

--HG--
extra : rebase_source : a26fdc5e5d6c63e21bb98a19ee7bf58042f9b3ba
2017-09-05 09:16:01 +12:00
Markus Stange
d652526dcd Bug 1391689 - Simplify titlebar image update logic. r=mattwoodrow
MozReview-Commit-ID: 4HPBNazSHDY

--HG--
extra : rebase_source : 35e14b0090956f46c5420b32c92766b9a39ceb84
2017-09-07 15:21:01 +02:00
Markus Stange
7e9246990d Bug 1391689 - Pass the correct origin when drawing the titlebar overlay with webrender. r=mattwoodrow
MozReview-Commit-ID: DdMjUFr0LR9

--HG--
extra : rebase_source : b6014d729a1c3140a8c4124d3f56091b1a674342
2017-09-07 15:15:45 +02:00
Sebastian Hengst
92ec846a75 merge mozilla-central to autoland. r=merge a=merge 2017-09-08 00:05:35 +02:00
Sebastian Hengst
ec5336561d merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 3DvwIgw2ORU
2017-09-07 23:59:58 +02:00
Ryan VanderMeulen
4d504e0608 Backed out 3 changesets (bug 1393230) because it touches the servo directory.
Backed out changeset 9115364cd4aa (bug 1393230)
Backed out changeset f762f605dd83 (bug 1393230)
Backed out changeset c366bfc13e86 (bug 1393230)
2017-09-07 09:33:53 -04:00
Markus Stange
d49bcacb0d Bug 1392574 - Don't attempt to composite a titlebar image if we don't have any. r=mattwoodrow
MozReview-Commit-ID: 59NKegwszzO

--HG--
extra : rebase_source : d4a184681ba967ecf9c56f025a012729b06e0145
2017-09-07 16:21:55 +02:00
Kirk Steuber
6e217001f8 Bug 1362382 - Move RegisterDragDrop to be called during idle time, if possible r=jimm
Additionally, do not call RegisterDragDrop for hidden windows.

MozReview-Commit-ID: Fv8j9FntGGT

--HG--
extra : rebase_source : fccbc576887d000805da8ac915d16fc4fddfeceb
2017-08-30 11:18:25 -07:00
Eric Rahm
70ece631cb Bug 1393230 - Part 2: Fix more improper string usages. r=njn
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.
2017-08-31 15:52:30 -07:00
Will Wang
8955c23a64 Bug 1357114 - Move the taskbar refresh timer to idle dispatch. r=florian 2017-09-07 12:15:13 +08:00
Eric Rahm
0617c21c24 Bug 1393230 - Part 2: Fix more improper string usages. r=njn
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
2017-08-31 15:52:30 -07:00
Wes Kocher
a14d71906d Merge m-c to inbound, a=merge
MozReview-Commit-ID: BJ4WkYrJ9g6
2017-09-06 17:24:48 -07:00
Mantaroh Yoshinaga
85a270b2ce Bug 1272349 - Use already set value of kEnableSelectionRB bit instead of NSPrintSelectionOnly. r=haik
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
2017-09-06 10:03:39 +09:00
Karl Tomlinson
648484651d bug 1384701 get system fonts in EnsureInit() which is on main thread even with servo r=manishearth
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
2017-09-04 18:29:04 +12:00
Karl Tomlinson
645192c7d9 bug 1384701 get system font name and size from widget style context instead of GtkSettings r=manishearth
gtk_widget_get_settings() returns the same settings for all widgets [1] but
GTK actually uses specific fonts for each widget [2].

[1] https://git.gnome.org/browse/gtk+/tree/gtk/gtkwidget.c?h=3.22.19#n11637
[2] https://git.gnome.org/browse/gtk+/tree/gtk/gtkwidget.c?h=3.22.19#n10334

Changing to GtkStyleContext* will also make this easier to use from code where
the GtkStyleContext exists but not the GtkWidget, such as EnsureInit() in a
future patch.

MozReview-Commit-ID: 3NuTL5wRzm5

--HG--
extra : rebase_source : 8ca2ae009bdf4b15a82106425c98b6be786ad27b
2017-09-04 21:33:21 +12:00
Karl Tomlinson
f800034d87 bug 1384701 remove MOZ_WIDGET_GTK == 2 code from nsLookAndFeel r=manishearth
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
2017-09-04 17:36:17 +12:00
Sebastian Hengst
01c1a3c741 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 17ViEoPyjPa
2017-09-05 23:55:39 +02:00
Josh Aas
00e046cae2 Bug 1394654 - Remove OS X opengl workaround from Mozilla bug 603134. r=mstange 2017-09-02 14:24:00 -04:00
Louis Chang
a63b8f6139 Bug 1352238 Part 4 - Implement PaintCheckBox/RadioControl and modify the original painting functions. r=mats
MozReview-Commit-ID: Jk6MS5wFA2g

--HG--
extra : rebase_source : 09ff29fddf9297550455af0c6f451c8d12ee0c09
2017-09-05 22:44:57 +08:00
Louis Chang
4ee1a817c5 Bug 1352238 Part 3 - Implement a fake native theme for checkbox/radio form controls on Android. r=mats,snorp
MozReview-Commit-ID: 5g6VJzfZv4Z

--HG--
extra : rebase_source : 7e1d46097b03c95fea0db85a686bc6ea1f6d9ec2
2017-09-05 22:44:42 +08:00
Sebastian Hengst
45cb996f32 merge mozilla-central to autoland. r=merge a=merge 2017-09-05 12:37:56 +02:00
Masayuki Nakano
1166607c92 Bug 1387357 - IMContextWrapper::DispatchCompositionStart() should stop dispatching eCompositionStart if dispatching preceding eKeyDown event causes changing active IM context r=m_kato
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
2017-09-04 20:18:43 +09:00
Josh Aas
f7ce922c6e Bug 1394646 - Cocoa nsChildView: replace string with constant and remove unused code. r=mstange 2017-09-02 13:57:00 -04:00
Nathan Froyd
5519cd83cc Bug 1396850 - explicitly declare static members of templates prior to use; r=darchons
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.
2017-09-06 13:24:04 -04:00
Nathan Froyd
64db05d9c1 Bug 1396867 - silence -Wunused-typedef warnings in GeckoEditableSupport; r=darchons
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.
2017-09-06 08:57:08 -04:00
Nathan Froyd
d2d38f357c Bug 1396863 - eliminate -Wignored-qualifiers warning in EventDispatcher; r=darchons
clang complains about the unnecessary `const` here, which we can remove.
2017-09-06 08:57:08 -04:00
Nicolas Silva
59e80c8f7e Bug 1393031 - Use shared memory to pass resource update data. r=jrmuizel 2017-09-14 18:48:55 +02:00