Граф коммитов

1102 Коммитов

Автор SHA1 Сообщение Дата
Ryan Hunt 95c23d28b7 Bug 1377950 - Reset all compositors when GdkScreen "composited-changed" fires. r=karlt
MozReview-Commit-ID: 3vva2XgSa60

--HG--
extra : rebase_source : 099a54f38695a7a88d5ca3a0dfc8cb948bfffb63
2017-08-11 02:52:08 -05:00
Masatoshi Kimura 5b97708fef Bug 1387800 - Remove [deprecated] nsIFilePicker.show(). r=qdot
MozReview-Commit-ID: 81ZkeYdSPVW

--HG--
extra : rebase_source : 2f30565b8d5986ef6265027562f9842d0db2688e
2017-08-06 13:15:31 +09:00
Martin Stransky 9ed3f34e0f Bug 1389133 - don't invalidate style content for missing widgets, r=karlt
MozReview-Commit-ID: 2KfjYGvsiVv

--HG--
extra : rebase_source : 86984393bb22a7708089b5ed6da1201f9458e6e7
2017-08-10 18:07:41 +02:00
Brendan Dahl 02dc1567cd Bug 1387170 - Use custom clipboard constructor instead of singleton. r=jrmuizel
This allows instances of the clipboard to be created (like it
was pre-headless).
2017-08-09 09:49:50 -07:00
Nicholas Nethercote 1a6f1a62fa Bug 1387381 - Remove nsXPIDLString local variables. r=erahm.
nsXPIDLStrings are marked as VOIDED upon initialization. Most of these local
nsXPIDLString variables are immediately set via getter_Copies(), which will
either assign a string value (using Adopt()) or do SetIsVoid(). These can be
trivially converted to nsString, which will get the same treatment.

The patch suitably converts the remaining nsXPIDLString local variable as well.

--HG--
extra : rebase_source : 5fff9f2c6844559198f601853f8db08564add7d5
2017-08-08 16:07:55 +10:00
Carsten "Tomcat" Book e54b14cf9a merge mozilla-inbound to mozilla-central a=merge 2017-08-07 12:56:05 +02:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Manish Goregaokar b74c4d0f69 Bug 1386915 - Add nsLookAndFeel::NativeInit() virtual call for initializing native-side state; r=jfkthame
MozReview-Commit-ID: 8XKSC1AOI0N
2017-08-06 15:41:08 -07:00
Manish Goregaokar 89df80e7d0 Bug 1386915 - Assert when nsLookAndFeel calls GTK off main thread; r=bholley
MozReview-Commit-ID: 9H9dE02bZel
2017-08-06 15:41:05 -07:00
Karl Tomlinson 7f6c7692a4 bug 1365556 invalidate widget style contexts after their ancestors are set r=stransky+263117
Although this is only known to affect buttons with builtin child widgets, it
is difficult to audit all GTK widgets for similar situations, and so the same
defense is applied to all widgets.

MozReview-Commit-ID: LMVXX3UYqR9

--HG--
extra : rebase_source : d327addad8d2b0e070c6ca86c6e38271c8431a23
2017-08-01 09:17:46 +12:00
Michael Smith 6fcebfbe5b Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander
To make the HeadlessCompositorWidget work under Windows as well as Linux, I had
to change the way that I hooked it into the existing CompositorWidget system.
Under GTK, the CompositorWidgetInitData and CompositorWidgetDelegate types
provided the information needed by the headless compositor widget already (the
widget client size). On Windows, however, the definitions of these types
differ, and the client size information is simply retrieved from the platform
APIs when needed.

After this patch, CompositorWidgetDelegate is renamed to
PlatformCompositorWidgetDelegate, and a new base class called
CompositorWidgetDelegate is added with "AsPlatformSpecificDelegate()" and
"AsHeadlessCompositorWidget()" methods. In non-headless mode, widgets use
AsPlatformSpecificDelegate() to access the Windows- and GTK-specific delegate
APIs. In headless mode, AsHeadlessCompositorWidget() is used to access the
singular CompositorWidget implementation for headless. Meanwhile, the
CompositorWidgetInitData IPDL type is made into a union which always contains a
headless-specific HeadlessCompositorWidgetInitData struct and under GTK and
Windows also contains an {X11,Win}CompositorWidgetInitData struct.

This also includes a small patch to ensure that the GPU process and
hardware-accelerated compositing are always disabled under headless mode. These
features weren't activated by default in the Linux environments I tested in, but
did end up activating (and then promptly crashing Firefox) when I tested on
Windows.

MozReview-Commit-ID: CocPoHBDV7H

--HG--
extra : rebase_source : 4581fa63aa3a9f32a8dc2672015a35b9be01b20f
2017-07-06 17:45:34 -07:00
Michael Smith 632f364e09 Bug 1373739 - Use ClientLayerManager in headless mode. r=dvander,jrmuizel
This fixes a series of issues uncovered by the Web Platform Tests.

The most immediately noticeable symptom was that, during shutdown, PuppetWidgets
on the client side attempted to delete shadow layers that were never created on
the compositor side. The usage of BasicLayerManager in all other widgets due to
headless mode meant that the PLayerTransactionParent was never initialized with
a layer manager, and thus discarded all transaction messages it received but not
delete layer messages.

The effects of only using BasicLayerManager in headless mode also showed up in
the web platform reftests, which ended up as blank white boxes in e10s mode as
the compositor thread never received paint instructions. Switching over to
using ClientLayerManager in headless mode causes these paint instructions to be
relayed.

In order to make ClientLayerManager work under headless mode, it was necessary
to implement a HeadlessCompositorWidget and hook that up to the CompositorWidget
creation function in widget/gtk. A follow-up patch will be necessary to hook up
the same for the other supported widget platforms.

MozReview-Commit-ID: 8vB3lrxP7iX

--HG--
extra : rebase_source : 4013aa856943c983b44266c4a83436b253bc7ab1
2017-06-21 08:50:02 -07:00
Nicholas Nethercote 72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Masayuki Nakano 937a9124a5 Bug 1379797 - nsWindow::GetEditCommandsRemapped() should do nothing if given event wasn't created with a native event r=karlt
When aEvent.mNativeKeyEvent of nsWindow::GetEditCommandsRemapped() is nullptr, that means the event was created without a native event.  Typically, chrome script created the event.  In such case, we should not execute native key bindings because doing it exposes the OS settings to chrome script because that might cause some privacy issue.  Therefore, the method should do nothing with such event.

MozReview-Commit-ID: 7ZHZjZ3ligT
2017-07-20 06:42:09 -07:00
Kentaro Hayashi ef93e64d0d Bug 1382142 - Fix a typo about MOZ_CONTAINER_GET_CLASS definition. r=karlt
There is no side-effects by this commit because this macro definition is
not used in actual implementation.

--HG--
extra : amend_source : 6075bacf7c0e2c10dd66dcfda8e28f16786d58de
2017-07-19 17:01:59 +09:00
Samael Wang a4e6b1337a Bug 1350643 - Part 5.2: Use per-monitor gdkScaleFactor to set contentsScaleFactor & nsWindow::GetDesktopToDeviceScale if running in gtk/wayland. r=karlt
MozReview-Commit-ID: Grs4dUqvLew

--HG--
extra : rebase_source : a5524e08fea8fb3623a55c486b33e95c4212fa59
2017-06-16 11:13:59 +08:00
Samael Wang a4ddae112e Bug 1350643 - Part 5.1: Get per-monitor dpi in ScreenHelperGTK & use the same value in nsWindow::GetDPI. r=karlt
MozReview-Commit-ID: 9dOkUEzuUL8

--HG--
extra : rebase_source : 26fdbcc54edf8a3f4f0b166a88f85f98313bfe39
2017-06-16 10:58:11 +08:00
Samael Wang 3810bc3903 Bug 1350643 - Part 3: Add GetDPI to nsIScreen & ScreenDetails. r=kanru
MozReview-Commit-ID: HEFyuYV26Wy

--HG--
extra : rebase_source : fb172f4ba99ab7119036ddf4ec1b3eeeaead186c
2017-06-06 18:09:34 +08:00
Samael Wang 44adcfaeea Bug 1350643 - Part 2: Use gdk functions to enumerate monitors instead of Xinerama. r=karlt
MozReview-Commit-ID: D9f65oZMBuV

--HG--
extra : rebase_source : e4dfa2ee593b9e06433569aaa8f3ec965fca5f2d
2017-06-06 17:57:54 +08:00
Samael Wang c9d2b57f92 Bug 1350643 - Part 1: Rename gfxPlatformGtk::GetDPI/GetDPIScale to GetFontScaleDPI/GetFontScaleFactor to better distinguish from nsIWidget::GetDPI. r=karlt
MozReview-Commit-ID: 4fxMG1FBlM8

--HG--
extra : rebase_source : 767780c828b2a9914b5f3af3c2749568099bece1
2017-06-14 16:54:21 +08:00
Blake Kaplan 46f55c55cc Bug 1374862 - Avoid setting gHandled when we don't handle signals. r=masayuki
This avoids a fatal assertion for some key events when focus isn't on a text
input.

MozReview-Commit-ID: Hqr6LNW61Kn

--HG--
extra : rebase_source : adc954fc355044c91dc34e9e689a745da95e78c9
2017-06-20 17:03:09 -07:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Martin Stransky fa30ab7210 Bug 1373249 - Enable OMTC for composited popups, r=karlt
MozReview-Commit-ID: 1G4P2B4CA3z

--HG--
extra : rebase_source : aad1dbbae6e589f8925c2224f242b878d44a3d64
2017-06-15 17:17:53 +02:00
Mats Palmgren 15925cc551 Bug 1377486 - Make nsWindow 'final' to possibly devirtualize some calls. r=tn
MozReview-Commit-ID: GrcIukJYmt6
2017-07-01 19:59:21 +02:00
Mats Palmgren 949cb19d0b Bug 1377348 - Make nsLookAndFeel final to allow the compiler to devirtualize some calls. r=tn
MozReview-Commit-ID: 7AoZKsTyb3O
2017-06-30 03:34:15 +02:00
Jed Davis 19ef5c3395 Bug 1360069 - Don't do unnecessary wakelock signaling from content processes. r=gcp
MozReview-Commit-ID: AqKGsWyHuXl

--HG--
extra : rebase_source : 36a30ee2e0ebdd3cfd180958d029d717b7449cd9
2017-04-24 21:19:33 -06:00
Jed Davis c8c7f64bf6 Bug 1360069 - Deal with the case where WakeLockListener is never instantiated. r=gcp
Otherwise, with the next patch, xpcshell tests crash because
WakeLockListener::Shutdown tries to Release() nullptr.

MozReview-Commit-ID: AmD5b6NUqnP

--HG--
extra : rebase_source : dd856ea37e793a8c40f2baf1eb001f96b4d0ee35
2017-06-27 14:44:39 -07:00
Masayuki Nakano a9fb7c2f23 Bug 1376407 - part2: Emulate selection when committing composition as collapsed to the end of composition r=m_kato
When you start new composition during converting with Mozc in e10s mode, the following things occur:

1. Mozc commits previous composition.
2. Gecko dispatches eCompositionCommit event.
3. Mozc sets new composition string (skipping composition start signal).
4. Gecko dispatches eCompositionStart and eCompositionChange event.
5. Selection is changed asynchronously.
6. Gecko sets position of IME windows.

At #4, Gecko stores start of composition as selection start, then, trying to adjust it at #5. However, new selection is caret position in new composition string. Therefore, it's not used for the adjustment. This causes that stored composition start offset is always the start of the previous composition (if the previous patch didn't change EnsureToCacheSelection() behavior). So, IMContextWrapper needs to compute proper composition start offset in this case.

The simplest fix is, modifying selection at #2 as which will be occurred in focused editor.  So, this patch makes the selection cache collapsed to the end of committing string.

Note that actual selection may be different if JS changes selection and/or the text in the focused editor. However, it doesn't matter. IMContextWrapper should behave as expected while current composition is active.

MozReview-Commit-ID: 221mDUd8yRP

--HG--
extra : rebase_source : 571b2de85ed6ea1fdadea73b7f95507937cc60e9
2017-06-27 03:11:25 -07:00
Masayuki Nakano b67cd28522 Bug 1376407 - part1: IMContextWrapper should cache selected string instead of length of selection r=m_kato
IMContextWrapper::EnsureToCacheSelection() always queries actual selection when the caller needs selected string.  However, this may be expensive and this is bad behavior for the following patch because it wants to emulate selection range until receiving next selection change notification.

Therefore, this patch makes IMContextWrapper::Selection store selected string instead of just its length like other native IME handlers

Additionally, this patch renames IMContextWrapper::mSelectedString to IMContextWrapper::mSelectedStringRemovedByComposition for making the difference between it and the new string in Selection clearer.

MozReview-Commit-ID: 3bygvW7sKf4

--HG--
extra : rebase_source : b0835b8c1607ecd647444a4d984980943a6fd570
2017-06-27 02:46:08 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
David Anderson eda24ede27 Rename LayerManager::Composite to LayerManager::ScheduleComposite. (bug 1365879 part 17, r=mattwoodrow) 2017-06-20 01:17:21 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Alexis Beingessner adb013669b Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Henri Sivonen 432653453a Bug 1261841 part 2 - Use encoding_rs instead of uconv. r=emk,mystor.
MozReview-Commit-ID: 15Y5GTX98bv
2017-06-13 13:23:23 +03:00
Sebastian Hengst f3bf820bfd Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner c75211cb95 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04:00
L. David Baron 88370e02d1 Bug 1367576 - Make IsWidgetStateSafe not truncate the bits that it needs to test. r=karlt
This fix a mistake that goes back to the original code from bug 174585
(gecko-dev 9611b23530, 2005-08-20).

(This makes me wonder how important the code is in the first place if it
didn't work correctly.)

MozReview-Commit-ID: B6q0o5n5hDw
2017-06-06 22:27:18 -07:00
L. David Baron e04a5a47c6 Bug 1367576 - Shrink existing caches to the size that's actually needed. r=karlt
Now that, thanks to bug 1367577, we have the theme constants in an enum,
we can make these arrays smaller rather than assuming that the constants
might use any valid uint8_t value.

MozReview-Commit-ID: A6GjTarVurc
2017-06-06 22:27:18 -07:00
L. David Baron d1ddf5e48e Bug 1367576 - Cache results of getting GTK widget borders. r=karlt
See comments in the header file.

This also clears out mSafeWidgetStates in ThemeChanged since that seems
like a good thing to do, and marks nsNativeThemeGTK as final.

MozReview-Commit-ID: 5Zne4eGbGlh
2017-06-06 22:27:18 -07:00
L. David Baron ee1674ecc5 Bug 1367576 - Refactor to allow for caching of some gtk widget padding/border results. r=karlt
This refactors the two nearly-identical callsites into a method so that
I can do caching in that method in the next patch.

Note that there was a slight difference between them in that the
aWidgetFlags parameter to GetGtkWidgetAndState was only passed from one
callsite.  However, given that the aState parameter is null, this
doesn't cause any behavior differences.  (Some controls in
GetGtkWidgetAndState null-check aWidgetFlags and some don't!)

Note also that this makes it always assign a result (often zero).  This
is fine for both callsites; GetWidgetPadding previously assigned zero
right before the call, and GetWidgetBorder did so at the start of the
function (and wasn't modified in between, since it was immediately
before the switch that the modified code is a case in).

MozReview-Commit-ID: IKurwry3UTi
2017-06-06 22:27:17 -07:00
L. David Baron 06ad92ffc6 Bug 1367576 - Remove unused ishtml parameter to moz_gtk_get_widget_border. r=karlt
This was needed for the (now-unused) GTK2 version of the code.

MozReview-Commit-ID: GocgC4OZ76p
2017-06-06 22:27:17 -07:00
Chris H-C c57d39227d bug 546387 - Don't try to set the GTK clipboard with null items r=karlt
It causes an assert failure in gtk which prints to the console.

MozReview-Commit-ID: A4106Z4rT36

--HG--
extra : rebase_source : 642c94a95cfa3939bc475e9139ee63caa78e3005
2017-05-26 11:50:13 -04:00
Karl Tomlinson 94ab0b4d5c Bug 1368597 label CompositorWidget and WindowSurface as Graphics BUG_COMPONENT r=rhunt
--HG--
extra : rebase_source : 5f2cf496030a5736424e66be1a3b8a53188d5e22
2017-05-30 14:29:22 +12:00
Martin Stransky 5f9fc84d1a Bug 1364355 - Implement UpdateOpaqueRegion() by gdk_window_set_opaque_region(), r=karlt
MozReview-Commit-ID: 50N99ZlvFUh

--HG--
extra : rebase_source : d095f93a858271c8a622f127724b06246e9f4bf9
2017-05-26 21:27:32 +02:00
Martin Stransky 0d7ee0c159 Bug 1364355 - Add support for using ARGB windows with OMTC when an X11 compositor is active. r=karlt
Authored by Andrew Comminos <andrew@comminos.com>

MozReview-Commit-ID: FIQBHSXgjMh

--HG--
extra : rebase_source : 1ae73bed3b2b933d11803ae3b93afbf3d1e1f570
2017-06-01 11:28:50 +02:00
Andrew Comminos 302c93427f Bug 1364355 - Enable argb visual for GTK window behind hidden preference mozilla.widget.use-argb-visuals, r=karlt
This preference is default to false and allows to experiment with transparent widgets on Gtk.
Original patch autor is Andrew Comminos <andrew@comminos.com>.

MozReview-Commit-ID: JZkCjBWny3m

--HG--
extra : rebase_source : 116c4977d7d7f3927e6a4df203584d8b9c9ad57b
2017-05-25 15:45:22 +02:00