Commit Graph

24528 Commits

Author SHA1 Message Date
Aaron Klotz
0cb12a123a Bug 1400344: Rename mscom::MainThreadRuntime to mscom::ProcessRuntime and make it aware of Win32k lockdown and of multiple instantiations; r=Jamie
This patch takes care of a bunch of issues and does some cleanup:

* We rename mscom::MainThreadRuntime to mscom::ProcessRuntime, as the latter
  is a more accurate name going forward.
* We make ProcessRuntime aware of the Win32k Lockdown process mitigation
  policy. When Win32k is disabled, we perform process-wide COM initialization
  in the multi-threaded apartment (since we cannot create an STA window).
* We refactor the mscom apartment region stuff to enable the Win32k lockdown
  pieces in ProcessRuntime.
* We move some Gecko-specific stuff into MOZILLA_INTERNAL_API guards so that
  ProcessRuntime is usable outside of xul.dll (I will be needing it for the
  launcher process).
* Another thing that might happen with the launcher process is that, under
  error conditions in the launcher, we create a ProcessRuntime object on a
  background thread for the purposes of telemetry logging, but we also allow
  the main thread to proceed to start as the browser. This could result in a
  scenario where the main thread, as the browser process, is attempting to
  instantiate its ProcessRuntime and ends up racing with the launcher process's
  telemetry thread which has its own ProcessRuntime. To account for this
  situation, we add mutual exclusion to the process-wide initialization code.
  We host this part inside mozglue since that state is shared between both
  firefox.exe and xul.dll.
* We clean up ProcessRuntime::InitializeSecurity by using Vector to set up
  the EXPLICIT_ACCESS entries.
* We remove mscom::MainThreadClientInfo and replace it with a direct call to
  CoGetCallerTID
* We revise all references to this class to use the new name.

Differential Revision: https://phabricator.services.mozilla.com/D19551

--HG--
rename : ipc/mscom/COMApartmentRegion.h => ipc/mscom/ApartmentRegion.h
rename : ipc/mscom/MainThreadRuntime.cpp => ipc/mscom/ProcessRuntime.cpp
rename : ipc/mscom/MainThreadRuntime.h => ipc/mscom/ProcessRuntime.h
extra : moz-landing-system : lando
2019-02-14 16:40:58 +00:00
James Willcox
1e0e61116d Bug 1526322 - Ensure GeckoWebExecutor doesn't clobber the Content-Type header. r=csadilek
Differential Revision: https://phabricator.services.mozilla.com/D19506

--HG--
extra : moz-landing-system : lando
2019-02-14 16:35:27 +00:00
shindli
040ff3d2c4 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-02-14 06:56:00 +02:00
shindli
54aa04bfd1 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-02-13 23:36:24 +02:00
Markus Stange
5030ae1b0e Bug 1491445 - Make the ChildView always non-opaque and let NSVisualEffectView handle clearing of vibrant areas. r=spohl
This is a clearer implementation that achieves the same thing.

Moreover, disabling the clearing by overriding drawRect wouldn't work in
CoreAnimation windows because in CoreAnimation windows, the clearing happens
through a property of the NSVisualEffectView's CALayer, and not through the
view's drawRect implementation - drawRect probably isn't even called in that
context.

Differential Revision: https://phabricator.services.mozilla.com/D19601

--HG--
extra : moz-landing-system : lando
2019-02-13 18:51:20 +00:00
Markus Stange
7023a7ce58 Bug 1491445 - Move any drawing from the ChildView into a new subview called PixelHostingView. r=spohl
This has two advantages:
 - The drawing will now correctly be placed "on top" of the vibrancy views.
 - We can turn this new view into a layer-hosting view. Layer-hosting views are
   supposed to be leaf NSViews; they shouldn't have any children.

Differential Revision: https://phabricator.services.mozilla.com/D19600

--HG--
extra : moz-landing-system : lando
2019-02-13 17:50:41 +00:00
Markus Stange
01ea2d7bed Bug 1491445 - Don't return YES from allowsVibrancy for the contentView of context menu windows. r=spohl
Otherwise, any views inside the contentView are imbued with a vibrant effect, and
even non-NSVisualEffectView NSViews subtract from the vibrant region of any actual
vibrant views they overlap. This would cause the PixelHostingView to 'erase' the
blue context menu item highlighting.

This behavior is documented on NSVisualEffectView:

> It is recommended that you enable vibrancy only in the leaf views of your view
> hierarchy. Subviews inherit the vibrancy of their parent. Once enabled in a
> parent view, a subview cannot turn off vibrancy. As a result, enabling
> vibrancy in a parent view can lead to subviews that look incorrect if they are
> not designed to take advantage of the vibrancy effect.

Differential Revision: https://phabricator.services.mozilla.com/D19599

--HG--
extra : moz-landing-system : lando
2019-02-13 17:50:27 +00:00
Markus Stange
5adfba9115 Bug 1491445 - Wrap vibrancy and nondraggable views inside container views. r=spohl
NSView hierarchy before:

 - window contentView
   - ChildView
     - NonDraggableView 1
     - NonDraggableView 2
     - EffectViewWithoutForegroundVibrancy 1
     - EffectViewWithoutForegroundVibrancy 2

NSView hierarchy after:

 - window contentView
   - ChildView
     - ViewRegionContainerView
       - NonDraggableView 1
       - NonDraggableView 2
     - ViewRegionContainerView
       - EffectViewWithoutForegroundVibrancy 1
       - EffectViewWithoutForegroundVibrancy 2

This allows us to give those container views a new sibling view which stays
fixed in z-order with respect to the NSViews that get created by
mNonDraggableRegion and mVibrancyManager. More specifically, I'm going to add a
view for the drawing of our ChildView ("PixelHostingView") which is going to be
a direct child of the Gecko "ChildView" and a sibling of the
ViewRegionContainerViews; the PixelHostingView needs to always stay on top of
the vibrancy views.
Without the wrapper around the vibrancy views, whenever the vibrant region
changes, a vibrant view would be placed on top of the PixelHostingView and the
order would be wrong.

Differential Revision: https://phabricator.services.mozilla.com/D19598

--HG--
extra : moz-landing-system : lando
2019-02-13 17:50:12 +00:00
Markus Stange
8401b64d46 Bug 1527412 - Remove swizzling of -[NSView mouseDownCanMoveWindow]. r=spohl
This was added in bug 476393 in order to work around a problem with the Java plug-in.
We no longer support that plug-in.
The comment also mentions NSTexturedBackgroundWindowMask which we stopped using in bug 1335191.

Differential Revision: https://phabricator.services.mozilla.com/D19558

--HG--
extra : moz-landing-system : lando
2019-02-13 11:14:03 +00:00
Markus Stange
02e8f0bcef Bug 1527412 - Make nsChildView::mView a ChildView*, because that's what it is. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D19556

--HG--
extra : moz-landing-system : lando
2019-02-13 11:14:02 +00:00
Markus Stange
20949d20bb Bug 1527412 - Remove unused contextMenu method. r=spohl
This method could only return something non-null in embedding situations,
in which our ChildView was a subview of somebody else's NSView that conforms
to the mozView protocol. Such a situation hasn't existed for about 10 years.

Differential Revision: https://phabricator.services.mozilla.com/D19555

--HG--
extra : moz-landing-system : lando
2019-02-13 11:14:02 +00:00
Markus Stange
1b8351b1e6 Bug 1527412 - Fix mParentView's type (it doesn't necessarily implement the mozView protocol) and tweak a few comments. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D19554

--HG--
extra : moz-landing-system : lando
2019-02-13 11:14:02 +00:00
Jonathan Kingston
3421b8fcff Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin
Replacing js and text occurences of asyncOpen2
Replacing open2 with open

Differential Revision: https://phabricator.services.mozilla.com/D16885

--HG--
rename : layout/style/test/test_asyncopen2.html => layout/style/test/test_asyncopen.html
extra : moz-landing-system : lando
2019-02-12 16:08:25 +00:00
Jorg K
6058d31f3a Bug 1526971 - Revert over-zealous error checking in nsDataObj::GetDownloadDetails() from bug 571074. r=mats 2019-02-11 15:44:00 +02:00
sotaro
0e2cb6d4e8 Bug 1514156 - Add RenderCompositorEGL for wayland r=nical
When GDK_BACKEND is wayland, widget is not fully mapped during creating CompositorSession. Needs to create valid EGLSurface after widget is fully mapped.

Differential Revision: https://phabricator.services.mozilla.com/D18940
2019-02-12 16:33:31 +09:00
sotaro
404ab365fe Bug 1525183 - Supress touch event and allocating bitmap
Chromium does workaround for scrolling with touch and avoid bitmap allocation when child window is used for DirectComposition. It improves performance of WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D18659
2019-02-12 14:34:52 +09:00
Marco Bonardo
12675bb16f Bug 1519538 - Disable idle-daily notifications in tests through user.js files. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D19017

--HG--
extra : moz-landing-system : lando
2019-02-09 13:29:21 +00:00
arthur.iakab
ddeb2146e9 Backed out changeset bac51381060d (bug 1519538) for causing multiple failures on Windows CLOSED TREE 2019-02-08 19:34:20 +02:00
Marco Bonardo
c8cf4c2695 Bug 1519538 - Disable idle-daily notifications in tests through user.js files. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D19017

--HG--
extra : moz-landing-system : lando
2019-02-08 16:43:58 +00:00
Noemi Erli
c2aec081be Backed out changeset bac51381060d (bug 1519538) for Linting failure in config.py 2019-02-08 18:32:01 +02:00
Marco Bonardo
65f6d086f4 Bug 1519538 - Disable idle-daily notifications in tests through user.js files. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D19017

--HG--
extra : moz-landing-system : lando
2019-02-08 14:10:08 +00:00
Razvan Maries
8add624474 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-02-08 06:26:00 +02:00
Martin Stransky
9719483cc6 Bug 1525874 - [Linux/Gtk+] When mozilla.widget.use-argb-visuals is set disable toplevel window shape mask, r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D18947

--HG--
extra : moz-landing-system : lando
2019-02-07 14:13:34 +00:00
Andrew Osmond
6cba1775c3 Bug 1453935 - Ensure that we snap within the visible rect with WebRender. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D18869
2019-02-07 18:05:43 -05:00
Andreea Pavel
7e3beb59f7 Backed out changeset 87ad4b91e29f (bug 1453935) for reftest failures on a CLOSED TREE 2019-02-08 00:45:29 +02:00
Andrew Osmond
fa36639a3b Bug 1453935 - Ensure that we snap within the visible rect with WebRender. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D18869
2019-02-07 15:26:54 -05:00
Martin Stransky
42ff7a7ef2 Bug 1523556 - [Linux/Gtk+] Don't apply titlebar shape mask to maximized windows, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D18823

--HG--
extra : moz-landing-system : lando
2019-02-07 12:28:48 +00:00
Oana Pop Rus
f5709e64e4 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-02-07 11:55:25 +02:00
sotaro
164c8f7d81 Bug 1524591 - Call SetParent in UI process r=mattwoodrow
During security.sandbox.gpu.level=1, compositor window's parent cannot be set in GPU process, it needs to be set in UI process.

Differential Revision: https://phabricator.services.mozilla.com/D18811
2019-02-07 16:01:41 +09:00
Martin Stransky
6137d7cb9f Bug 1521312 - [Linux/Gtk+] Remove ui.GtkCSDReversedPlacement as it's broken and useless r=dao
Differential Revision: https://phabricator.services.mozilla.com/D18828

--HG--
extra : moz-landing-system : lando
2019-02-06 15:24:00 +00:00
Martin Stransky
2c149000af Bug 1525537 - [Linux/Gtk+] Listen on notify::gtk-decoration-layout signal to change titlebar layout, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D18817

--HG--
extra : moz-landing-system : lando
2019-02-06 13:12:34 +00:00
Liang-Heng Chen
bd2504a471 Bug 1485266 - Use stand-ins for native colors when RFP is enabled r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D17755

--HG--
extra : moz-landing-system : lando
2019-02-06 08:45:44 +00:00
Martin Stransky
ed7fbd3a13 Bug 1523721 - [Linux/Gtk+] Continue processing window_state_event handler when titlebar is updated, r=dao
Recently we quit nsWindow::OnWindowStateEvent()/window_state_event handler when titlebar needs an update due to focus change.
That's incorrect as we need to process other information from the handler - maxminized/normal window state.

Differential Revision: https://phabricator.services.mozilla.com/D18681

--HG--
extra : moz-landing-system : lando
2019-02-05 15:07:51 +00:00
inspiro
48193e74d3 Bug 1509030 : The X11 widget populate graphics adapter annotations through AddCrashReportAnnotations() r=gsvelto
Bug 1509030 : The X11 widget populate graphics adapter annotations through AddCrashReportAnnotations()

Differential Revision: https://phabricator.services.mozilla.com/D18368

--HG--
extra : moz-landing-system : lando
2019-02-05 09:14:41 +00:00
Masayuki Nakano
3a0b903d0a Bug 1523635 - part 2: Make IMContextWrapper::OnKeyEvent() trust the result of gtk_im_context_filter_keypress() to decide whether handling event causes async event later r=m_kato
Unfortunately, we're not sure whether ibus always handles non-dead key events
asynchronously or synchoronously.  Therefore, for safer fix, this patch makes
IMContextWrapper::OnKeyEvent() decide that with the result of
gtk_im_context_filter_keypress().  If active IME is ibus and it consumes non-
synthesized events on password fields, it adjusts probablyHandledAsynchronously
value.

So, this patch changes the behavior of only when:
- active IME is ibus.
- only when a password field or ime-mode:disabled field has focus.
- not in dead key sequence.
- and the key event is consumed by ibus but nothing happend.

This must be enough safe to uplift.

Differential Revision: https://phabricator.services.mozilla.com/D18635

--HG--
extra : moz-landing-system : lando
2019-02-05 11:59:38 +00:00
Masayuki Nakano
e8a9b66af6 Bug 1523635 - part 1: Rename maybeHandledAsynchronously to probablyHandledAsynchronously r=m_kato
Now, we believe that when `maybeHandledAsynchronously` is set to true,
ibus handles the event asynchronously in usual cases.  However, the behavior
of ibus on password field is unclear.  Currently, on Ubuntu 18.04,
Ubuntu 18.10 and Debian Cinnamon (9.6 / 3.2.7), ibus handles key events
asynchronously even in password fields even though I confirmed it was not
so at initial fix.  So, it could be just my mistake, but we need to prepare
for both cases here for safer fix.

So, in the following patch, I need to add another variable for weaker
decision, and we treat `maybeHandledAsynchronously` stronger than its
nuance.  Therefore, this patch renames it to `probablyHandledAsynchronously`.

Differential Revision: https://phabricator.services.mozilla.com/D18634

--HG--
extra : moz-landing-system : lando
2019-02-05 06:48:08 +00:00
Sylvestre Ledru
14486004b6 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D18488

--HG--
extra : moz-landing-system : lando
2019-02-04 19:10:18 +00:00
Edgar Chen
e7d657d627 Bug 1519131 - Remove unused preference cache for pointer event; r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D16198

--HG--
extra : moz-landing-system : lando
2019-02-04 09:16:30 +00:00
Masayuki Nakano
37b8ffe4a8 Bug 1521690 - Use Unused << instead of (void*) in nsWindow.cpp r=aklotz,jmathies
Casting non-void result to `void*` causes warning of clang.  Additionally,
perhaps, we should use `Unused <<` because of modern style.

And also this patch makes widget/windows is treated as "warning as errors"
because this patch fixes the last warning.

Differential Revision: https://phabricator.services.mozilla.com/D17216

--HG--
extra : moz-landing-system : lando
2019-02-01 20:15:04 +00:00
Hiroyuki Ikezoe
b8cb200990 Bug 1523692 - Set the prefers-reduce-motion value for test to the instance of nsLookAndFeel in child processes. r=snorp
So that we can query the test value in the child process properly.

Note that the APIs used for setting the prefers-reduced-motion value for testing
are only used on Android and MacOSX.  As for MacOSX we have a different
machinery (see bug 1486971) to deliver the test value without spinning native
event loop in the child process so the change here is valid only for Android.

Differential Revision: https://phabricator.services.mozilla.com/D18311

--HG--
extra : moz-landing-system : lando
2019-02-01 22:07:26 +00:00
sotaro
4776754f01 Bug 1524168 - Request AlphaVisual for WebRender r=jrmuizel
When hardware acceleration is enabled, GLContextGLX::FindVisual() is used to choose visual. When widget does not request AlphaVisual, the FindVisual() always choose RGB(24bit) visual. It causes to loose alpha during readback.

Differential Revision: https://phabricator.services.mozilla.com/D18179

--HG--
extra : moz-landing-system : lando
2019-01-31 16:49:08 +00:00
Eitan Isaacson
35028de560 Bug 1515774 - Pass current GeckoView position with touch events to APZC. r=geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D17044

--HG--
extra : moz-landing-system : lando
2019-01-31 16:46:15 +00:00
Eitan Isaacson
da315919ab Bug 1515774 - Introduce mScreenOffset for pinch and multitouch events. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D17043

--HG--
extra : moz-landing-system : lando
2019-01-31 16:46:10 +00:00
Eitan Isaacson
186e2cc4ca Bug 1515774 - Use Screen pixels for gesture detection. r=botond
We currently use ParentLayer pixels in GestureEventListener, it should
be Screen pixels because we care about physical distances and
thresholds, not layer-relative ones.

Differential Revision: https://phabricator.services.mozilla.com/D17042

--HG--
extra : moz-landing-system : lando
2019-01-31 16:45:53 +00:00
shindli
011ea038cb Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-01-29 23:54:31 +02:00
shindli
d5c5369355 Merge inbound to mozilla-central. a=merge 2019-01-29 23:37:33 +02:00
garvitdelhi
6bd950c37a Bug 1519185: Remove AttributeWillChange aNewValue parameter r=emilio,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D17073
2019-01-29 17:59:38 +01:00
Bob Owen
c10c92ae4e Bug 1511438 Part 2: Enable win32k lockdown on RDD process. r=jimm
This stops the use of some win32k calls during start-up that will fail and in
some cases cause a crash.

It also moves the MITIGATION_DYNAMIC_CODE_DISABLE to be enabled after start-up.
This is required because the hooks to fake the user32 and gdi32 initialization
are applied as the DLLs load and the dynamic code disable blocks that.
2019-01-29 08:49:13 +00:00
arthur.iakab
c1fae83952 Backed out 16 changesets (bug 1478124) for failing android geckoview-junit CLOSED TREE
Backed out changeset fce62c77a56b (bug 1478124)
Backed out changeset eb2fa3b5edf7 (bug 1478124)
Backed out changeset 8dacce59fcc0 (bug 1478124)
Backed out changeset 012fd0107204 (bug 1478124)
Backed out changeset 496aaf774697 (bug 1478124)
Backed out changeset 21f4fda03159 (bug 1478124)
Backed out changeset b0444e0bc801 (bug 1478124)
Backed out changeset d94039b19943 (bug 1478124)
Backed out changeset 5d85deac61c2 (bug 1478124)
Backed out changeset 929fd654c9df (bug 1478124)
Backed out changeset 1ddd80d9e91a (bug 1478124)
Backed out changeset b8d2dfdfc324 (bug 1478124)
Backed out changeset f500020a273a (bug 1478124)
Backed out changeset dd00365ebb55 (bug 1478124)
Backed out changeset 538e40c5ee13 (bug 1478124)
Backed out changeset bedaa9c437ad (bug 1478124)
2019-01-29 10:03:06 +02:00
Kris Maglione
e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00