Commit Graph

25348 Commits

Author SHA1 Message Date
Dave Townsend
3a36964e63 Bug 1550058: Move most keyboard shortcut handling out of XBL. r=masayuki
Most of our keyboard shortcut handling is handled by nsXBLWindowKeyHandler along
with nsXBLPrototypeHandler. With the impending removal of XBL this needs to
change.

This patch moves nsXBLWindowKeyHandler to dom/events/GlobalKeyListener and copies
nsXBLPrototypeHandler to dom/events/KeyEventHandler. Windows, text elements and
XUL <keyset> are changed to use the new copies and anything unnecessary for
those is stripped out.

XBL handler elements still remain using the existing nsXBLPrototypeHandler path.
Some of the code is ripped out there to make it compile. There is probably a
lot more that can be removed but since the whole of XBL is likely gone soon I'm
not sure it is worth cleaning that up much.

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

--HG--
rename : dom/xbl/nsXBLWindowKeyHandler.cpp => dom/events/GlobalKeyListener.cpp
rename : dom/xbl/nsXBLWindowKeyHandler.h => dom/events/GlobalKeyListener.h
rename : dom/xbl/nsXBLPrototypeHandler.cpp => dom/events/KeyEventHandler.cpp
rename : dom/xbl/nsXBLPrototypeHandler.h => dom/events/KeyEventHandler.h
rename : dom/xbl/builtin/ShortcutKeyDefinitionsForBrowserCommon.h => dom/events/ShortcutKeyDefinitionsForBrowserCommon.h
rename : dom/xbl/builtin/ShortcutKeyDefinitionsForEditorCommon.h => dom/events/ShortcutKeyDefinitionsForEditorCommon.h
rename : dom/xbl/builtin/ShortcutKeyDefinitionsForInputCommon.h => dom/events/ShortcutKeyDefinitionsForInputCommon.h
rename : dom/xbl/builtin/ShortcutKeyDefinitionsForInputCommon.h => dom/events/ShortcutKeyDefinitionsForTextAreaCommon.h
rename : dom/xbl/builtin/ShortcutKeys.cpp => dom/events/ShortcutKeys.cpp
rename : dom/xbl/builtin/ShortcutKeys.h => dom/events/ShortcutKeys.h
rename : dom/xbl/builtin/android/ShortcutKeyDefinitions.cpp => dom/events/android/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/android/moz.build
rename : dom/xbl/builtin/emacs/ShortcutKeyDefinitions.cpp => dom/events/emacs/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/emacs/moz.build
rename : dom/xbl/builtin/mac/ShortcutKeyDefinitions.cpp => dom/events/mac/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/mac/moz.build
rename : dom/xbl/builtin/unix/ShortcutKeyDefinitions.cpp => dom/events/unix/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/unix/moz.build
rename : dom/xbl/builtin/win/ShortcutKeyDefinitions.cpp => dom/events/win/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/win/moz.build
extra : moz-landing-system : lando
2019-09-05 16:51:27 +00:00
Agi Sferro
72e1ec0f20 Bug 1576730 - Support scalars in GeckoView Telemetry. r=chutten,snorp
Differential Revision: https://phabricator.services.mozilla.com/D44539

--HG--
extra : moz-landing-system : lando
2019-09-05 15:56:43 +00:00
James Willcox
17531c0400 Bug 1343678 - Add WebPush support to GeckoView r=jcj,lina,agi,geckoview-reviewers,droeh,mt
Differential Revision: https://phabricator.services.mozilla.com/D41290

--HG--
extra : moz-landing-system : lando
2019-09-04 21:25:44 +00:00
Gijs Kruitbosch
9f3a3e9669 Bug 1578709 - Only set flash only pref for those tests that need it, r=mconley,ahal
Differential Revision: https://phabricator.services.mozilla.com/D44648

--HG--
extra : moz-landing-system : lando
2019-09-04 22:12:39 +00:00
thomasmo
a7ea9dae63 Bug 1570128:Part 1 - Present VR output to VR Host r=kip,jrmuizel,handyman,sotaro
This change introduces plumbing for communicating with the GPU process through
VRShMem while bootstrapping Firefox for creating a window with Firefox Reality.
Test impact shows a fabricated value returned for the texture handle in VRShMem.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 19:58:51 +00:00
harry
8595d331fd Bug 1573157 - Load notification center icons with dual representations. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D43275

--HG--
extra : moz-landing-system : lando
2019-09-04 18:33:13 +00:00
Gurzau Raul
f96e9cd73f Backed out changeset 887d125d7f59 (bug 1578709) for failing at test_bug427744.html on a CLOSED TREE. 2019-09-04 21:34:11 +03:00
Gijs Kruitbosch
bb899238e7 Bug 1578709 - Only set flash only pref for those tests that need it, r=mconley,ahal
Differential Revision: https://phabricator.services.mozilla.com/D44648

--HG--
extra : moz-landing-system : lando
2019-09-04 17:28:02 +00:00
Timothy Nikkel
e0a79ba9f2 Bug 1578164. Use async notifications when requesting decode of an image in most places. r=aosmond
Most of things will likely be no real change because they ask for the exact frame they want immediately before.

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

--HG--
extra : moz-landing-system : lando
2019-09-03 15:36:23 +00:00
Emilio Cobos Álvarez
a2e997b40b Bug 1578652 - Add a comment pointing to a gross gtk resize workaround. r=stransky
This was fixed upstream, so we can eventually remove this.

Having the issue number makes it much nicer to figure out when is the right time
to remove it.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 08:18:12 +00:00
Chris H-C
0e30f25589 Bug 1573477 - Add asserting impls for new Streaming Telemetry interface methods r=agi
Differential Revision: https://phabricator.services.mozilla.com/D43517

--HG--
extra : moz-landing-system : lando
2019-08-27 15:47:25 +00:00
Martin Stransky
145616c1c1 Bug 1576904 [Wayland] Add WaylandDMABufSurface GL binding ability, r=jhorak
- Allow to create WaylandDMABufSurface with wl_buffer or EGLImage on top of it
- Disable dmabuf modifiers as they slow down the data upload
- Add ability to export/import WaylandDMABufSurface via. file descriptors

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

--HG--
extra : moz-landing-system : lando
2019-09-03 09:41:32 +00:00
Markus Stange
df4663239c Bug 1578099 - Make CFTypeRefPtr usable as a key inside an unordered_map. r=mattwoodrow
Depends on D44323

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

--HG--
extra : moz-landing-system : lando
2019-09-01 21:38:42 +00:00
ruchikabgosain
f10b5073ed Bug 1547353 - Fix macOS selection color when gfx.color_management.mode = 1. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D43259

--HG--
extra : moz-landing-system : lando
2019-09-01 14:16:07 +00:00
Dorel Luca
e8f334670d Merge mozilla-inbound to mozilla-central. a=merge 2019-08-31 12:47:56 +03:00
Makoto Kato
6aaa810233 Bug 1577685 - Move some utility functions from IMEStateManager to widget. r=masayuki
I would like to log `IMEState` and `InputContextAction`in widget. But this
utilities are in `IMEStateManager`, so I would like to move it to widget
by using `mozilla/ToString.h`.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 05:56:58 +00:00
Andrew McCreight
48c8dbd02c Bug 1577819, part 4 - Add some basic validity checks for the type. r=Ehsan
The test for procinfo doesn't check if the process type is
reasonable. With Fission, this test now asserts, so add a failure
annotation. I'll fix it up for Fission in another bug.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 21:52:42 +00:00
Andrew McCreight
9fe0f5c10b Bug 1577819, part 2 - WebIDLProcType should match ProcType. r=Ehsan
ProcType gets turned into WebIDLProcType, so I assume the intention is
that they are identical. I changed the definition of WebIDLProcType to
match ProcType, and added a static assert to check that they have the
same number of cases.

I also changed the coercion from a static_cast<> to an explicit switch
statement so that it will degrade more gracefully if, say, the enums
get reordered, or one enum gets a case added and removed at the same
time.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 21:55:42 +00:00
Noemi Erli
478b1751c7 Backed out 5 changesets (bug 1343678) for causing multiple web-platform failures CLOSED TREE
Backed out changeset 4b77646bc788 (bug 1343678)
Backed out changeset 7396789341b1 (bug 1343678)
Backed out changeset 85526faefe6d (bug 1343678)
Backed out changeset 07b757a21222 (bug 1343678)
Backed out changeset 3551cc55620d (bug 1343678)
2019-08-30 00:36:40 +03:00
Martin Stransky
1cf5fdd9b6 Bug 1562827 - [Linux] Merge nsWindow::ReparentNativeWidgetInternal() to nsWindow::SetParent() and use nsWindow::ReparentNativeWidget() for toplevel windows only, r=karlt
- Use former ReparentNativeWidgetInternal() code in nsWindow::SetParent().
  Also update mToplevelParentWindow for Wayland to hold default toplevel window.

- Make nsWindow::ReparentNativeWidget() to work on toplevel windows only and use only gtk_window_set_transient_for() to reparent
  a toplevel window. Also update mToplevelParentWindow for Wayland.

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

--HG--
extra : moz-landing-system : lando
2019-08-28 23:48:44 +00:00
James Willcox
fe4b02a3cc Bug 1343678 - Add WebPush support to GeckoView r=jcj,lina,agi,geckoview-reviewers,droeh,mt
Differential Revision: https://phabricator.services.mozilla.com/D41290

--HG--
extra : moz-landing-system : lando
2019-08-29 18:59:31 +00:00
Dorel Luca
9690cb07dc Backed out changeset 3ab29c05ea2f (bug 1521893) build bustage in /builds/worker/workspace/build/src/widget/cocoa/nsTouchBarInputIcon.h. CLOSED TREE 2019-08-29 06:18:29 +03:00
harry
ff064cc7f3 Bug 1521893 - Part 2 - Support loading SVG icons on the Touch Bar through a new nsTouchBarInputIcon service class r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D34926

--HG--
extra : moz-landing-system : lando
2019-08-29 02:38:16 +00:00
Dorel Luca
547786f1cd Backed out 3 changesets (bug 1343678) for WPT failures on Android. CLOSED TREE
Backed out changeset 619e7838ebfd (bug 1343678)
Backed out changeset 5010684cdca4 (bug 1343678)
Backed out changeset b01343e4c2eb (bug 1343678)
2019-08-28 23:09:08 +03:00
James Willcox
746abdeae8 Bug 1343678 - Add WebPush support to GeckoView r=jcj,lina,agi,geckoview-reviewers,droeh,mt
Differential Revision: https://phabricator.services.mozilla.com/D41290

--HG--
extra : moz-landing-system : lando
2019-08-28 14:21:47 +00:00
Agi Sferro
2ad08f6d15 Bug 1576204 - Set remote flag in nsWindow for e10s. r=kmag,snorp
Chrome flags need to be set both on the `window` and the `browser` object.
Right now we only set them on the `browser` objects and that could lead to
unintended consequences. This patch sets the flags to the `window` accordingly.

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

--HG--
extra : moz-landing-system : lando
2019-08-28 18:11:08 +00:00
Gurzau Raul
6321d98bb4 Backed out changeset 9b5ceca1eedf (bug 1573813) for failures at /crashtests/1113005.html on a CLOSED TREE. 2019-08-28 17:15:26 +03:00
Martin Stransky
4e8409ddcd Bug 1576898 - [Wayland] Implement gbm_bo_import & gbm_device_is_format_supported at nsGbmLib, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D43603

--HG--
extra : moz-landing-system : lando
2019-08-28 10:38:11 +00:00
Jan Horak
37a9627a4c Bug 1573813 - use parent window scale factor for the popup/tooltips; r=stransky
For popup windows with parent we need to get scale factor of the parent
window. Because when the windows are hidden they're not receiving updates
about changing scaling factor. So when moving from normal dpi to
the hidpi monitor the newly opened popup windows will have the same scale

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

--HG--
extra : moz-landing-system : lando
2019-08-27 13:03:50 +00:00
Toshihito Kikuchi
5361128d95 Bug 1575352 - Remove dynamic linking of urlmon for MinGW. r=aklotz
4eca0f08c43b73dc1dd908fad58bdfd7f6973119 introduced dynamic linking of urlmon
for MinGW as a workaround.  Now that MinGW was updated, we can remove that
workaround.

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

--HG--
extra : moz-landing-system : lando
2019-08-27 22:19:38 +00:00
Martin Stransky
89132239ea Bug 1574036 - [Wayland] Fix flickering during window resize, r=jhorak
Recently window resize on Wayland produces flickering/rendering artifacts because
window background is randomly cleared due to actual window size changes.
We recently query widget size and do clear/fullscreen update when the size changes.

To avoid that, get widget size once at WindowSurfaceWayland::Lock() and use it
until next WindowSurfaceWayland::Lock(). Also don't to switch wayland back buffers
until there's really fullscreen update from compositor.

This patch:

- Use mLockedScreenRect to store window size at WindowSurfaceWayland::Lock(). It's used
  to detect widget resize, when it happens throw away all cached painting and wait for
  full screen update.

- Use mBufferScreenRect to store size of wayland back buffer and pass it
  instead of actual widget size we used before this patch. This ensures all our
  drawing matches the buffer size.

- Rename aFullScreenUpdate to aCanSwitchBuffer at LockWaylandBuffer() to stress
  actual meaning - we can/can't switch back buffers for partial drawing and we need to
  wait until recent back buffer is released by compositor.

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

--HG--
extra : moz-landing-system : lando
2019-08-27 12:33:25 +00:00
Martin Stransky
388e4b2d74 Bug 1576268 - [Wayland] Use MOVE as a default Drag and Drop action to match X11 behavior, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D43578

--HG--
extra : moz-landing-system : lando
2019-08-27 12:12:14 +00:00
Kristen Wright
3cba0c7ada Bug 1573992 - Convert dom.w3c_pointer_events.dispatch_by_pointer_messages to static pref. r=njn
Converts dom.w3c_pointer_events.dispatch_by_pointer_messages to a static pref and removes its mirror variable.

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

--HG--
extra : moz-landing-system : lando
2019-08-27 00:13:25 +00:00
Kristen Wright
8d6b5f31a4 Bug 1573992 - Convert findbar.modalHighlight to static pref. r=njn
Converts findbar.modalHighlight to a static pref and updates its usages.

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

--HG--
extra : moz-landing-system : lando
2019-08-27 00:09:29 +00:00
Kristen Wright
f25c87b636 Bug 1573992 - Convert ui.use_native_colors to static pref. r=njn
Converts ui.use_native_colors to a static pref and updates its usages.

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

--HG--
extra : moz-landing-system : lando
2019-08-27 00:07:34 +00:00
Kristen Wright
cff2295408 Bug 1573992 - Convert ui.context_menus.after_mouseup to static pref. r=njn
Converts ui.context_menus.after_mouseup varcache pref to a static pref and removes its associated function.

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

--HG--
extra : moz-landing-system : lando
2019-08-27 00:07:49 +00:00
kriswright
943e049dcc Bug 1573992 - Convert layout.css.devPixelsPerPx to static pref. r=njn
Converts layout.css.devPixelsPerPx to a static pref. This one was one of the slightly odd ones; some values were expecting an atomic float, so instead of defining a regular type float it is defined in StaticPrefList.yaml as an AtomicFloat. I am assuming this was the intent of the pref value all along.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 21:02:43 +00:00
kriswright
533fc20279 Bug 1573992 - Convert android.widget_paints_background to static pref. r=njn
Converts android.widget_paints_background to a static pref. From my understanding, this pref only matters on android, and the overridden function in nsIWidget defaults to `false`. Based on that I replaced the entire WidgetPaintsBackground() function with a static pref.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 20:25:43 +00:00
kriswright
c99009c207 Bug 1573992 - Convert ui.scrolling.negate_wheel_scroll to static pref. r=njn
Converts ui.scrolling.negate_wheel_scroll to a static pref and updates its usages. This one is only enabled on android, so I used the IS_ANDROID value to fill it.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 20:25:43 +00:00
kriswright
d489024871 Bug 1573992 - Convert intl.ime.hack.on_any_apps.fire_key_events_for_composition to static pref. r=njn
Converts intl.ime.hack.on_any_apps.fire_key_events_for_composition to a static pref and updates its usages.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 20:25:42 +00:00
kriswright
be316b6bf9 Bug 1573992 - Convert 3 ui.key.* prefs to static prefs. r=njn
Converts ui.key.generalAccessKey, ui.key.chromeAccess, and ui.key.contentAccess to static prefs. Updates usages.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 20:25:42 +00:00
kriswright
6f43a49b41 Bug 1573992 - Convert two dom.keyboardevent.* prefs to staticprefs. r=njn
Converts dom.keyboardevent.dispatch_during_composition and dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content to static prefs. Removes the dispatch_during_composition entry from mobile.js, since it just redefines the same pref value.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 20:25:42 +00:00
kriswright
fa50c7828f Bug 1573992 - Convert browser.tabs.remote.desktopBehavior to static pref. r=njn
Converts browser.tabs.remote.desktopBehavior to a static pref. Updates usages.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 20:25:42 +00:00
Toshihito Kikuchi
651b0e2a7f Bug 1570845 - Call CoAllowSetForegroundWindow before ShellExecute to launch an application in the foreground. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D43536

--HG--
extra : moz-landing-system : lando
2019-08-26 23:17:01 +00:00
Emilio Cobos Álvarez
9ac9ac89fe Bug 1576666 - Try to fix Mac bustage on a CLOSED TREE.
MANUAL PUSH: tree is red.
2019-08-27 01:38:47 +02:00
Markus Stange
337e804b70 Bug 1576391 - Override _titlebarHeight so that the window's NSTitlebarContainerView includes the full height of the window buttons even after we've shifted them down, and re-enable the floating titlebar. r=mattwoodrow
I've tried hard to find a solution for the clipped window button problem which
does not involve swizzling but could not find one.
The officially ratified ways of moving the window buttons are:
 1. Use an NSToolbar in your window, or
 2. Make a custom window with your own buttons.

I don't think having an NSToolbar is an option for us. And making our own window frame
implementation would be hard to get right and can easily behave differently from the
native implementation.
I've also tried asking the window to not render any window buttons on its own; then we
could make our own buttons and place them on top of our view. But if I change the
window's styleMask to be just NSTitledWindowMask, it doesn't only make the buttons
disappear, it also makes the window non-resizable. And if I include NSResizableWindowMask,
the buttons come back (only the zoom button is enabled, the other two are grayed out).

This change also stops overriding _wantsFloatingTitlebar when CoreAnimation is
enabled, which is necessary for the window buttons to render.

Depends on D43341

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

--HG--
extra : moz-landing-system : lando
2019-08-26 02:05:24 +00:00
Markus Stange
47f90a7414 Bug 1576391 - Use NSFullSizeContentViewWindowMask for ToolbarWindows. r=mattwoodrow
This gives us two behaviors for free which we were achieving through manual
overrides:
 - The content view is sized to cover the entire window frame.
 - The window controls are placed on top of the content view (instead of
   underneath it in z-order).

It also forces CoreAnimation layers for the window's entire NSView hierarchy, so
we only use it when the CoreAnimation pref is enabled.

NSFullSizeContentViewWindowMask is only available on 10.10 and up, but we still
support 10.9, so we cannot remove the code with the manual overrides just yet.

This change also requires a change to NonDraggableView in order to preserve
window dragging behavior in the titlebar: When NSFullSizeContentViewWindowMask
is used, the method which assembles the window's draggable region takes a
different path. It treats the titlebar specially, and traverses the NSView
hierarchy twice, once for the titlebar area and once for the rest of the window.
Outside the titlebar, it calls _opaqueRect on every visible NSView, but for the
titlebar area, it calls _opaqueRectForWindowMoveWhenInTitlebar instead.

Overriding _opaqueRectForWindowMoveWhenInTitlebar allows us to achieve the old
dragging behavior.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 02:03:56 +00:00
Markus Stange
5aaf080881 Bug 1576391 - Move some method overrides to ToolbarWindow. r=mattwoodrow
This makes them only apply in windows with titlebars, which is the only place
where they're needed. The setContentView override can even cause harm for other
windows, such as sheet windows, because it'll move the content view below a
full-window covering solid grey view provided by the system, in builds that
link against the 10.14 SDK and don't override _wantsFloatingTitlebar.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 02:04:09 +00:00
Markus Stange
3503a868b7 Bug 1574592 - Remove unused CompositorWidget::DrawWindowUnderlay. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D42404

--HG--
extra : moz-landing-system : lando
2019-08-25 17:11:11 +00:00
Markus Stange
28d283ab15 Bug 1574592 - Remove now-unused CompositorWidget::DoCompositorCleanup again. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D42403

--HG--
extra : moz-landing-system : lando
2019-08-25 17:11:02 +00:00
Markus Stange
e0e54098e9 Bug 1574592 - Move NativeLayer management out of nsChildView and into LayerManagerComposite and RendererOGL. r=mattwoodrow
It looks like a big patch but it's mostly just moved code, with some duplication:
 - Layer creation and destruction moves to LayerManagerComposite and RendererOGL.
 - BasicCompositor IOSurface setup code moves to BasicCompositor.cpp.
 - OpenGL IOSurface setup code moves to CompositorOGL and RenderCompositorOGL.

The duplication is a bit unfortunate but the LayerManagerComposite code will
diverge from the WebRender code soon.

BeginFrame gets a new argument aNativeLayer. This argument will go away again
over the course of this patch queue. But for now, BeginFrame is the best place
to do the layer setup because it's a very close place to PreRender which is
where that code was previously.

I wasn't able to think of a nice way to give CompositorOGL and BasicCompositor
platform-specific behavior without #ifdefs. So now LayerManagerComposite uses
the "cross-platform" NativeLayer interface, but CompositorOGL and
BasicCompositor use NativeLayerCA because they actually need the IOSurface, and
they do that in #ifdef'd code.
Luckily, NativeLayerCA.h can be included in both .cpp files and in .mm files.

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

--HG--
extra : moz-landing-system : lando
2019-08-25 17:43:42 +00:00
Markus Stange
c3d94ae29a Bug 1574592 - Add CompositorWidget::GetOpaqueWidgetRegion. r=mattwoodrow
This lets LayerManagerComposite and RendererOGL set the correct opaque region
on the native layer.

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

--HG--
extra : moz-landing-system : lando
2019-08-25 21:41:58 +00:00
Markus Stange
222be5a822 Bug 1574592 - Add CompositorWidget::GetNativeLayerRoot. r=mattwoodrow
This will give the layer manager direct access to the native layers.

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

--HG--
extra : moz-landing-system : lando
2019-08-25 17:10:52 +00:00
Markus Stange
2acd3fcf86 Bug 1576113 - Add a comment.
MANUAL PUSH: Backout and comment change that don't require a review and are somewhat time-critical: the backout fixes breakage in some local build scenarios.

--HG--
extra : rebase_source : 5230000ce88395794c272f0133e09979c70d526d
extra : amend_source : df014e518d27480c5b149acb8acaa0433565d483
2019-08-24 13:45:07 -04:00
Markus Stange
cb2f3a3c58 Bug 1576113 - Back out revision 2a82b5ce10e2 because it causes trouble when building with the 10.14 SDK.
The source of the trouble is our setContents override, which makes sure the window's
content view is the bottommost view in the window, and its interaction with a change
in behavior on 10.14, where windows that return YES from _wantsFloatingTitlebar will
contain an additional NSView for the window background. Our setContents override
moves the content view behind that window background view, which covers it with a
solid gray color.

--HG--
extra : amend_source : cd11d5c805de7054c3dfa3a1d5ae0f504f07116d
2019-08-24 13:50:57 -04:00
Noemi Erli
15323a790b Backed out 3 changesets (bug 1343678) for breaking Android web platform tests CLOSED TREE
Backed out changeset c22a725950f0 (bug 1343678)
Backed out changeset 0bef62794abb (bug 1343678)
Backed out changeset 37c92bba3e1c (bug 1343678)
2019-08-24 01:13:36 +03:00
James Willcox
fa77c48a55 Bug 1343678 - Add WebPush support to GeckoView r=jcj,lina,agi,geckoview-reviewers,droeh,mt
Differential Revision: https://phabricator.services.mozilla.com/D41290

--HG--
extra : moz-landing-system : lando
2019-08-23 16:29:38 +00:00
Botond Ballo
fcd33af3ae Bug 1511901 - Convert touch events representing two-finger scrolling to pan gesture events for affected devices. r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D41666

--HG--
extra : moz-landing-system : lando
2019-08-23 19:45:20 +00:00
Mike Hommey
66d7fe943e Bug 1575420 - Replace MOZ_WIDGET_TOOLKIT value of "gtk3" with "gtk". r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D42765

--HG--
extra : moz-landing-system : lando
2019-08-21 12:25:42 +00:00
Mike Hommey
17d34d41d7 Bug 1575415 - Always register the nsApplicationChooser component in Gtk builds. r=froydnj
Bug 1278282 removed Gtk2 support, so MOZ_WIDGET_TOOLKIT is always "gtk3"
for Gtk builds, and never "gtk", which makes the current check never
match.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 12:25:21 +00:00
Alvina Waseem
32e325ac2f Bug 1533057 - Created Web Notifications API. r=geckoview-reviewers,agi,snorp
Differential Revision: https://phabricator.services.mozilla.com/D36342

--HG--
extra : moz-landing-system : lando
2019-08-21 16:49:49 +00:00
Aaron Klotz
9f88239431 Bug 1573275: Add SystemRoot to whitelisted paths for WinUtils::PreparePathForTelemetry; r=mhowell,chutten
Until now, `WinUtils::PreparePathForTelemetry` did not whitelist paths
originating from the Windows system directory. This is unfortunate, as those
paths are not going to contain any PII yet may be useful for troubleshooting.

By adding `%SystemRoot%` to the whitelist, such paths will be included after
substituting the real system directory with the name of the environment
variable.

Finally, we need to lazily build the whitelist in a thread-safe manner.
Whitelist construction has been refactored so that the whitelist is a static
local variable that is atomically constructed.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 20:59:43 +00:00
Markus Stange
4e76f83888 Bug 1575419 - Don't allow triggering another main thread paint from within a main thread paint. r=mattwoodrow
This also moves the MaybeScheduleUnsuspendAsyncCATransactions() call to the end
of HandleMainThreadCATransaction() so that we can't get re-suspended from within
WillPaintWindow().

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

--HG--
extra : moz-landing-system : lando
2019-08-21 02:30:32 +00:00
Csoregi Natalia
6c32e4cdbf Backed out changeset 4f82f0b92629 (bug 1573813) for browser-chrome crashes on /browser_bookmarkProperties_folderSelection.js. CLOSED TREE 2019-08-20 21:48:27 +03:00
Jan Horak
248e644f9e Bug 1573813 - use parent window scale factor for the popup/tooltips; r=stransky
For popup windows with parent we need to get scale factor of the parent
window. Because when the windows are hidden they're not receiving updates
about changing scaling factor. So when moving from normal dpi to
the hidpi monitor the newly opened popup windows will have the same scale

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

--HG--
extra : moz-landing-system : lando
2019-08-20 15:52:12 +00:00
Sebastian Streich
db893cf0d7 Bug 1561056 - Pass CSP on Link-drop r=ckerschb,Gijs,farre
***
Fix linux build

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

--HG--
extra : moz-landing-system : lando
2019-08-20 12:43:02 +00:00
Markus Stange
a18d35ca15 Bug 1491448 - Set the appropriate opaque region on the native layer. r=mattwoodrow
This can be verified by starting Firefox with the environment variables
CA_LAYER_SURFACE=0 CA_COLOR_OPAQUE=1
Transparent parts of the window will be red, and opaque parts will be green.

With this patch, the main browser window will be opaque except for the vibrant
areas, i.e. the tab bar and any open sidebars, which will be transparent.
Full screen video will be opaque.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 22:55:09 +00:00
Markus Stange
e65a6a7df9 Bug 1491448 - Maintain an internal opaque region in nsChildView that can be accessed from any thread. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D40554

--HG--
extra : moz-landing-system : lando
2019-08-19 22:55:47 +00:00
Markus Stange
66fc92f4e1 Bug 1573343 - Stop using LayoutDevice units in BasicCompositor. r=mattwoodrow
ScreenPixels would be a more appropriate unit. But inside BasicCompositor everything
is in the same coordinate space anyway so we're not getting much benefit from the
units. This patch eliminates a lot of .ToUnknown*() calls.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 22:40:55 +00:00
Markus Stange
cc120aa3b7 Bug 1573343 - Make the aInvalidRegion parameter of EndRemoteDrawing a const reference rather than a regular reference. r=mattwoodrow
There's no point in mutating it, and nobody does.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 22:40:39 +00:00
Markus Stange
19c25b1d89 Bug 1573343 - Move draw target clearing out of GetBackBufferDrawTarget. r=mattwoodrow
On Windows, where the DrawTarget is rewrapped in a Cairo/pixman DrawTarget,
this will now cause Cairo/pixman to be used for the clear.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 22:39:00 +00:00
Markus Stange
2dbe70d234 Bug 1573343 - Reset the transform in a better place. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D41672

--HG--
extra : moz-landing-system : lando
2019-08-19 22:38:35 +00:00
Markus Stange
f182a073c1 Bug 1573343 - Always create the back buffer sized to the widget's client size. r=mattwoodrow
This should be equivalent to what we had before but clearer.
Before this patch, we would reallocate the back buffer if
 - the back buffer was larger than the client size (meaning the window had shrunk) or
 - the invalid region didn't fit in the back buffer.
Whenever the window is resized, we have a frame where the invalid region covers
the entire window, and thus size would be equal clientSize in that frame.
So effectively, the back buffer size was always kept in sync with the client size.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 22:38:28 +00:00
Toshihito Kikuchi
d5a7d77f4f Bug 1573051 - Use both SHParseDisplayName and CreateUri to validate a uri. r=aklotz
For launching with an external protocol handler on Windows, we validate a uri
before sending it to `ShellExecute`, by converting a string into `PIDL` using
`SHParseDisplayName` and extract a string back from PIDL using
`IShellFolder::GetDisplayNameOf`.  The problem was that if a fragment, a
string following a hash mark (#), is always dropped after this validation.
This is caused by the intended design of Windows.

A proposed fix is to use `CreateUri` for validation, which is used behind
`IShellFolder::GetDisplayNameOf`.  However, we also keep `SHParseDisplayName`
because there are cases where `CreateUri` succeeds while `SHParseDisplayName`
fails such as a non-existent `file:` uri and we want to keep the same
validation result for those cases.

Adding `CreateUri` broke MinGW build because of our toolkit issue.  We use
dynamic linking for MinGW build in the meantime.

This patch adds a new unittest to make sure the new validation logic
behaves the same as the old one except the fragment issue.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 22:10:32 +00:00
Ciure Andrei
9a123fb597 Backed out changeset 81156ff3f4fa (bug 1571656) for causing browser_PageActions.js and test_insertTree_fixupOrSkipInvalidEntries.js to perma fail CLOSED TREE 2019-08-19 13:00:44 +03:00
Moritz Birghan
240771fa29 Bug 1571656 - Use Assert.jsm numeric comparison functions in tests r=mixedpuppy,MattN
Differential Revision: https://phabricator.services.mozilla.com/D40614

--HG--
extra : moz-landing-system : lando
2019-08-19 07:17:12 +00:00
Razvan Maries
8275452b39 Backed out changeset 722bc0469e8e (bug 1573051) for Windows MinGW bustages. CLOSED TREE 2019-08-17 00:57:50 +03:00
Toshihito Kikuchi
27093f2f3d Bug 1573051 - Use both SHParseDisplayName and CreateUri to validate a uri. r=aklotz
For launching with an external protocol handler on Windows, we validate a uri
before sending it to `ShellExecute`, by converting a string into `PIDL` using
`SHParseDisplayName` and extract a string back from PIDL using
`IShellFolder::GetDisplayNameOf`.  The problem was that if a fragment, a
string following a hash mark (#), is always dropped after this validation.
This is caused by the intended design of Windows.

A proposed fix is to use `CreateUri` for validation, which is used behind
`IShellFolder::GetDisplayNameOf`.  However, we also keep `SHParseDisplayName`
because there are cases where `CreateUri` succeeds while `SHParseDisplayName`
fails such as a non-existent `file:` uri and we want to keep the same
validation result for those cases.

This patch adds a new unittest to make sure the new validation logic
behaves the same as the old one except the fragment issue.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 19:06:01 +00:00
Sebastian Hengst
0195ac9406 Merge mozilla-central to autoland 2019-08-16 19:05:43 +02:00
Markus Stange
87683af326 Bug 1574521 - Make sure updateLayer is only called when the CoreAnimation pref is set. r=jrmuizel a=Aryx
updateLayer expects some objects to be non-null which are only initialized when the pref is set.
But in builds that were compiled with the 10.14 SDK, all NSViews are layer-backed by default, so
wantspdateLayer gets called, and returning YES from that unconditionally will cause updateLayer
to be called.

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

--HG--
extra : amend_source : a7a1f7ecba9418e3bf5464bca90ba655002bc637
2019-08-16 18:53:44 +02:00
Markus Stange
92ccc6d8f0 Bug 1154013 - When the vibrant region of a window changes, composite synchronously so that the window contents and the vibrancy update atomically. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D40556

--HG--
extra : moz-landing-system : lando
2019-08-16 14:01:13 +00:00
Daniel Varga
95ce40b8d4 Backed out changeset a7ac9f64f6ea (bug 1561056) for build bustage at widget/gtk/nsDragService. On a CLOSED TREE 2019-08-16 09:30:39 +03:00
Sebastian Streich
c051155f99 Bug 1561056 - Pass CSP on Link-drop r=ckerschb,Gijs,farre
Differential Revision: https://phabricator.services.mozilla.com/D37563

--HG--
extra : moz-landing-system : lando
2019-08-15 18:44:00 +00:00
Csoregi Natalia
3acf519302 Merge mozilla-central to autoland. CLOSED TREE
--HG--
rename : devtools/client/debugger/src/actions/tests/helpers/threadFront.js => devtools/client/debugger/src/actions/tests/helpers/mockCommandClient.js
2019-08-16 07:03:46 +03:00
Csoregi Natalia
0989eb85a3 Backed out changeset 38b37dfa1f33 (bug 1469716) for causing Bug 1572116. a=backout 2019-08-16 04:36:30 +03:00
Markus Stange
5af2fd32c9 Bug 1491442 - Call SuspendAsyncCATransactions on window focus changes. r=mattwoodrow
Without this, in windows with title bars, such as the bookmark library window,
the title bar and the content would update at different times.

The title bar paint is done as part of a main thread CoreAnimation transaction.
However, by default, we don't get notified of all main thread CA transactions;
our only notification mechanism is the updateLayer handler on the PixelHostingView,
and that handler is only invoked (the layer is only displayed) if the layer has
been marked as needing display. And by default, window focus changes do not mark
random views' backing layers as needing display. Usually, what this means is that
the window will be painted twice: Once in the main thread transaction, and then
another time on the compositor thread once Gecko has noticed a state change and
triggered its own composite in response. (Often, Gecko's compositor-side paint
will actually happen *before* the main thread paint, because the main thread is
often busy with repainting the system menu bar during window focus changes.)
Such non-atomic window repaints look glitchy.
Calling SuspendAsyncCATransactions will result in a call to updateLayer in the
upcoming CoreAnimation transaction and lets us update the entire window in one
atomic paint, and it will avoid updating the window early if the compositor
thread gets ahead of the main thread.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 01:15:34 +00:00
Markus Stange
01138923a6 Bug 1491442 - Disable window overlay drawing in the CoreAnimation path. r=mattwoodrow
Window overlay drawing was added as a workaround for the following:
When our NSOpenGLContext covered the entire window, it would cover the titlebar
contents and hide the window buttons and the title string. It would also not
get anti-aliased rounded corner clipping.

In windows that use CoreAnimation layers for the window frame, this is no longer
a problem, because the CoreAnimation layer tree takes care of these effects:
It applies rounded corner clipping to the window content layers, it puts the
window buttons on top, and it also puts the title string on top if it is shown.

So when we're using CoreAnimation, the existing code needs to be deactivated,
otherwise we'd draw those things twice.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 01:15:10 +00:00
Markus Stange
20f0865033 Bug 1491442 - Make sure to never trigger async CA transactions when the main thread might be resizing a window. r=mattwoodrow
This avoids most window resizing glitches.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 01:14:47 +00:00
Markus Stange
8b77e79501 Bug 1491442 - Support BasicCompositor OMTC rendering in the CoreAnimation path. r=mattwoodrow
Now CoreAnimation supports all rendering paths.
The BasicCompositor OMTC path is used when hardware acceleration is disabled,
for example in safe mode or when the user manually disabled it.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 01:14:22 +00:00
Markus Stange
4172e5ea96 Bug 1491442 - Render accelerated windows into mContentLayer, using OMTC. r=mattwoodrow
This makes windows that render using CompositorOGL or WebRender show content.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 01:13:52 +00:00
Markus Stange
2921208661 Bug 1491442 - Make nsChildView create a NativeLayerRootCA and fill it with content when painting using BasicLayers (which used to go through drawRect). r=mattwoodrow
This makes context menus work. Regular windows are still blank at this point.

This introduces a visual regression on 10.9: context menus and panels now no
longer have a shadow. Only 10.10 and above support shadows on transparent windows
that use CoreAnimation; 10.9 is not able to obtain the shadow shape on those
types of windows.
I think this is an acceptable regression to take. We want to use CoreAnimation
for all window types because it simplifies the code (no need to handle two
paths) and because it avoids expensive mode switches if we realize too late
that a window we just opened is supposed to use CoreAnimation.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 01:13:35 +00:00
Markus Stange
85cbfc2652 Bug 1491442 - When gfx.core-animation.enabled is true, use CoreAnimation for all windows and create an empty layer. r=mattwoodrow
This makes mPixelHostingView layer-backed, and that layer will be empty.
This patch also causes all windows (including context menus, tooltips, arrow
panels etc.) to use CoreAnimation layers for the window frame. This is achieved
by calling setWantsLayer:YES on every window's content view.

After this changeset, all windows will still be empty.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 01:13:19 +00:00
Markus Stange
ca605e7b30 Bug 1491442 - Disable all non-CoreAnimation rendering paths when gfx.core-animation.enabled is set. r=mattwoodrow
This patch leaves you with empty windows everywhere. We will build the new
rendering paths from the ground up in the upcoming patches.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 01:12:18 +00:00
Markus Stange
31bde5f08e Bug 1491442 - If CoreAnimation is enabled, don't clip the TitlebarGradientView to rounded corners, and don't draw the title string on top of it. r=mattwoodrow
Unlike what the old comment in its drawRect method says, this isn't actually
dependent on the NSFullSizeContentViewWindowMask. Any window that uses
CoreAnimation layers for its window frame will apply these effects automatically.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 01:11:51 +00:00
Markus Stange
5b5486dc0c Bug 1491442 - Remove -[ChildView isUsingOpenGL] and use mUsingOMTCompositor instead. r=mattwoodrow
We always use OMTC when using OpenGL. We also currently always use OpenGL when using OMTC, but that's about to change.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 01:11:27 +00:00
Markus Stange
2e790720bb Bug 1491442 - Add some documentation to mPixelHostingView. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D38750

--HG--
extra : moz-landing-system : lando
2019-08-16 01:11:03 +00:00
Markus Stange
1800bceb3c Bug 1491442 - Fix comments that talk about BasicLayers but intend to say BasicCompositor. r=mattwoodrow
BasicLayers is main thread drawing. BasicCompositor is compositor-thread drawing.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 01:10:40 +00:00
Markus Stange
2935e2eca6 Bug 1491442 - Fix up and document mNeedsGLUpdate locking semantics, and remove a stray semicolon. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D38748

--HG--
extra : moz-landing-system : lando
2019-08-16 01:10:11 +00:00
Markus Stange
62430de27f Bug 1491442 - Add CompositorWidget::DoCompositorCleanup() to give the widget a chance to clean up any state from PreRender/PostRender on the correct thread. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D40514

--HG--
extra : moz-landing-system : lando
2019-08-16 01:09:26 +00:00
Oana Pop Rus
cc55a912e9 Backed out changeset 6d823f106e69 (bug 1533057) for Android mochitest failure in AndroidAlerts.cpp on a CLOSED TREE 2019-08-16 02:28:42 +03:00
Alvina Waseem
b465cfd307 Bug 1533057 - Created Web Notifications API. r=geckoview-reviewers,agi,snorp
Differential Revision: https://phabricator.services.mozilla.com/D36342

--HG--
extra : moz-landing-system : lando
2019-08-15 20:13:57 +00:00
Martin Stransky
7ec25f9853 Bug 1577024 - [Wayland] Enable experimental wayland backend modes by widget.wayland_cache_mode pref, r=jhorak
Image cache mode can be set by widget.wayland_cache_mode.

- widget.wayland_cache_mode = 0 (or missing):
  Cache and clip all drawings, default. It's slowest
  but also without any rendered artifacts.

- widget.wayland_cache_mode = 1:
  Cache drawing only when back buffer is missing. May produce
  some rendering artifacts and flickering when partial screen update
  is rendered.

- widget.wayland_cache_mode = 2:
  Don't cache anything, draw only when back buffer is available.
  Suitable for fullscreen content only like fullscreen video playback and
  may work well with dmabuf backend.

Differential Revision: https://phabricator.services.mozilla.com/D43681
2019-08-31 00:19:03 +03:00
Kris Maglione
f93c2909dd Bug 1573254: Part 2 - Update tests to await snapshotWindow when necessary. r=mccr8
This fixes several tests which snapshot remote windows under Fission. It also
changes some other arbitrary tests that don't use remote windows, which I
changed before I gave up on having an always-async API.

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

--HG--
extra : rebase_source : 6203b7065f7651e6ed4a2695ff2bd92daec70634
2019-08-12 12:56:25 -07:00
Jeff Muizelaar
bfd40a4c0c Bug 1573682. Add FEATURE_D3D11_ANGLE to vendor whitelist ignore. r=jgilbert
This is needed to let WebRender run on ANGLE/WARP because we end up with
the Microsoft vendor.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 23:19:46 +00:00
Sylvestre Ledru
645f2d5773 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-08-13 07:15:25 +00:00
Perry Jiang
9f7e12ee62 Bug 1231213 - Various changes to existing tests. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D32078

--HG--
extra : moz-landing-system : lando
2019-08-13 04:04:58 +00:00
harry
2413c70932 Bug 1465403 - Support loading icons @2x in macOS menu bars. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D41391

--HG--
extra : moz-landing-system : lando
2019-08-12 13:53:38 +00:00
Dzmitry Malyshau
005edf80aa Bug 1570736 - Force disable WR swizzling on Intel 4000 on Mac r=aosmond
Investigation showed that on this platform the texture unit state becomes
corrupted whenever we set the non-identity swizzling (getting garbage from textureSize()).
Given no easy workaround, we disable swizzling for this GPU family on Mac, for now.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 18:57:35 +00:00
Jan Horak
74fb3f0f1c Bug 1572455 Workaround for restoring minimized window in Wayland; r=stransky
Under Wayland the GTK does not send the correct window state event change
when the window is iconified. We need to add a workaround for that to avoid
unresponsive UI after restoring the window.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 13:06:58 +00:00
Eugen Sawin
2708b11d94 Bug 1566367 - [2.0] Add streaming telemetry Gecko-GV bridge. r=snorp,chutten
Differential Revision: https://phabricator.services.mozilla.com/D38899

--HG--
extra : moz-landing-system : lando
2019-08-09 04:51:10 +00:00
Kristen Wright
b7b95930c5 Bug 1571544 - Convert mozilla.widget.disable-native-theme to static pref. r=njn
Converts mozilla.widget.disable-native-theme varcache pref to a static pref and updates uses of its associated global variable with the pref. This also renames the pref to widget.disable-native-theme to group with other widget prefs.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 23:05:05 +00:00
Tom Schuster
0e913c22c4 Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40677

--HG--
extra : moz-landing-system : lando
2019-08-07 19:49:40 +00:00
Aaron Klotz
fb977a3526 Bug 1571875: Part 2 - Change over all existing static local uses of DynamicallyLinkedFunctionPtr to use StaticDynamicallyLinkedFunctionPtr instead; r=mhowell
Depends on D40885

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

--HG--
extra : moz-landing-system : lando
2019-08-07 15:58:09 +00:00
Cosmin Sabou
c3430326e6 Backed out changeset ca88862d6b63 (bug 1558915) for causing build bustages on StartupCacheUtils. CLOSED TREE 2019-08-07 13:20:32 +03:00
Tom Schuster
8bc1f5ada8 Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40677

--HG--
extra : moz-landing-system : lando
2019-08-07 09:36:56 +00:00
Razvan Maries
eedbf1137f Backed out changeset b197ca57677a (bug 1558915) for build bustages. CLOSED TREE 2019-08-07 01:04:43 +03:00
Tom Schuster
03c7998ef2 Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40677

--HG--
extra : moz-landing-system : lando
2019-08-06 20:19:41 +00:00
Karl Tomlinson
a871c0a392 Bug 1469716 allow transparency mode to be set appropriately according to whether drawing a titlebar r=stransky
The early return for non-popup windows was to workaround
https://bugzilla.mozilla.org/show_bug.cgi?id=1344839 which involved problems
with CleanLayerManagerRecursive().  In cases where layer manager configuration
does not change, there is no need to clean the layer manager and so no need to
return early.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 08:27:20 +00:00
Bob Owen
f29fcf53b4 Bug 1565932: Add more Printer dialog completion messages to be reposted on x86 Windows. r=jmathies
These are now being hit because of the removal of the HTML frames
customizations to the print dialog.
I've removed the defines for these, because I don't think there is any point
trying to guess what their uses are.
I've also made it 32-bit only, because we only see them on 32-bit Windows 7.
In fact only 32-bit Firefox on 64-bit Windows 7 I believe.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 17:17:31 +00:00
Martin Stransky
d4ee7064f5 Bug 1567434 - [Wayland] Use dynamic popup hierarchy for tooltips/context menu only, r=jhorak
If the popup is a regular menu but GetParentMenuWidget() returns
nullptr, it's connected non-menu parent (bookmark toolbar for instance).

In this case use a parent given at nsWindow::Create() and don't attach it
to latest active popup as it has a real parent.

Depends on D39347

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

--HG--
extra : moz-landing-system : lando
2019-08-05 10:37:34 +00:00
Martin Stransky
6354d2287a Bug 1567434 - [Wayland] Don't use gtk_window_get_transient_for() to get parent toplevel window, r=jhorak
- gtk_window_get_transient_for() fails to return correct toplevel window as the toplevel window changes
when popup is moved in popup hierarchy. So store the toplevel given at nsWindow::Create() and
use it instead.

- Remove some redundat NS_WARNING() from wayland code
- Attach "moved-to-rect" signal handler to GdkWindow only once a update
  NativeMoveResizeWaylandPopupCallback() loging.
- Add more logging to Wayland popup related code.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 10:37:21 +00:00
Brindusan Cristian
c00617be71 Backed out 2 changesets (bug 1567434) for build bustages at nsWindow.cpp:3587:53. CLOSED TREE
Backed out changeset 10925a6df9b3 (bug 1567434)
Backed out changeset 1cd94e91245c (bug 1567434)
2019-08-05 12:23:04 +03:00
Martin Stransky
577c3ffca3 Bug 1567434 - [Wayland] Use dynamic popup hierarchy for tooltips/context menu only, r=jhorak
If the popup is a regular menu but GetParentMenuWidget() returns
nullptr, it's connected non-menu parent (bookmark toolbar for instance).

In this case use a parent given at nsWindow::Create() and don't attach it
to latest active popup as it has a real parent.

Depends on D39347

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

--HG--
extra : moz-landing-system : lando
2019-08-05 08:40:16 +00:00
Martin Stransky
99f4b257a1 Bug 1567434 - [Wayland] Don't use gtk_window_get_transient_for() to get parent toplevel window, r=jhorak
- gtk_window_get_transient_for() fails to return correct toplevel window as the toplevel window changes
when popup is moved in popup hierarchy. So store the toplevel given at nsWindow::Create() and
use it instead.

- Remove some redundat NS_WARNING() from wayland code
- Attach "moved-to-rect" signal handler to GdkWindow only once a update
  NativeMoveResizeWaylandPopupCallback() loging.
- Add more logging to Wayland popup related code.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 08:39:53 +00:00
Edwin Gao
c9df10668e Bug 1570775 - remove references to macosx1010, OS X 10.10.x in configuration and test manifests r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D40309

--HG--
extra : moz-landing-system : lando
2019-08-02 17:27:58 +00:00
Jan Horak
fd5911695e Bug 1570927 [hidpi] apply scale factor also to the translation matrix; r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D40404

--HG--
extra : moz-landing-system : lando
2019-08-02 10:58:07 +00:00
Jan Horak
65526f541b Bug 1566876 - Wayland workaround for the popups without parent r=stransky
When the popup is without parent it mess up with the Wayland popup hierarchy.
Then any other popup cannot be shown, for example when webrtc ui
shows up the user is unable to allow sharing screen during that.

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

--HG--
extra : moz-landing-system : lando
2019-08-01 07:16:22 +00:00
harry
878ff4c77b Bug 1568862 - Resolve dangling pointer and faulty error logic in macOS icon loaders. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D39782

--HG--
extra : moz-landing-system : lando
2019-07-31 16:49:45 +00:00
Aaron Klotz
12bdf4e7a1 Bug 1569756: Check for S_FALSE after calling IShellWindows::FindWindowSW; r=jmathies
`IShellWindows::FindWindowSW` may return the dreaded `S_FALSE`, so we need to
ensure that we're handling that.

I checked the remaining functions called by this code and none of the others
do this; this is the only call site that requires the check.

I'm not sure why we're seeing this error code. I added an explicit cast to
ensure that `CSIDL_DESKTOP` is being interpreted as an `int`, though I doubt
that this actually makes any difference.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 15:31:07 +00:00
Haik Aftandilian
14a6956635 Bug 1563994 - [10.15] Right Click When Not Focused Presents "Keystroke Receiving" Access Grant Request Dialog r=mstange
Use addGlobalMonitorForEventsMatchingMask instead of CGEventTapCreate to monitor for mouse clicks outside of the application while context menus are displayed.

Using addGlobalMonitorForEventsMatchingMask prevents the display of the privacy "Keystroke Receiving" dialog when listening for mouse clicks.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 01:03:49 +00:00
Dylan Roeh
1e945a8dd6 Bug 1553603 - Support "capture" attribute in Gecko and expose in GV. r=geckoview-reviewers,smaug,snorp,agi
Differential Revision: https://phabricator.services.mozilla.com/D38746

--HG--
extra : moz-landing-system : lando
2019-07-30 18:13:05 +00:00
sotaro
1208854388 Bug 1569565 - Fix error handling in nsBaseWidget::CreateCompositorSession() r=nical
When ClientLayerManager::Initialize() fails, we also need to clear LayerManager.

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

--HG--
extra : moz-landing-system : lando
2019-07-30 08:19:04 +00:00
Jan Horak
8d37f2edef Bug 1562555 Disable hidpi widget rendering for now on X11 because it's buggy;r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D39299

--HG--
extra : moz-landing-system : lando
2019-07-30 12:04:25 +00:00
Nicholas Nethercote
cd426e3ad2 Bug 1569526 - Remove return values from Add*VarCache(). r=KrisWright
They're infallible in practice and always `NS_OK`. (This stems from
`AddVarCacheNoAssignment()` always returning `NS_OK`.)

As a result, the commit removes lots of unnecessary checks.

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

--HG--
extra : moz-landing-system : lando
2019-07-30 06:19:46 +00:00
Sebastian Hengst
14f4125565 Backed out changeset 4aead1eca8c6 (bug 1521893) to fix crashes (bug 1568862)
--HG--
extra : rebase_source : 55caf819b464734c29515f81eca41a6cbba4d5b4
2019-07-29 17:11:19 +02:00
Kannan Vijayan
3fb6190ec6 Bug 1559414 - Rename unaudited pre-fission methods with SameProcess for future audit burndown. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D39378

--HG--
extra : moz-landing-system : lando
2019-07-26 16:48:31 +00:00
sotaro
d8d05ff21a Bug 1569110 - Add ClientLayerManager::Initialize() r=nical
Some initialization handlings of ClientLayerManager exists in nsBaseWidget::CreateCompositor(). It is not good. Move them to ClientLayerManager::Initialize().

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

--HG--
extra : moz-landing-system : lando
2019-07-26 09:31:57 +00:00
Nicholas Nethercote
18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Neil Bleasdale
7908205544 Bug 1564797 - Initialise mDmabuf in nsWaylandDisplay constructor. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D38578

--HG--
extra : moz-landing-system : lando
2019-07-25 21:33:41 +00:00
Emily Toop
5c825f981a Bug 1560641: Add a lock around mCapturePixelsResults. @geckoview-reviewers r=geckoview-reviewers,snorp
This is to ensure that multiple completions cannot be attempted on the same `GeckoResult`, resulting in crashes.

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

--HG--
extra : moz-landing-system : lando
2019-07-24 16:23:30 +00:00
Emily Toop
8a99efca37 Bug 1553135 - Lock LayerViewSupport during detach so that other methods cannot be called during this time. r=geckoview-reviewers,snorp
This is caused by a race condition when the compositor is detached. Because the actual detachment happens in a new thread, `detach` can complete and release the lock on `mLayerViewSupport`, and `RecvScreenPixels` can obtain the lock, before `mLayerViewSupport` is properly cleaned up. We therefore check to ensure that `lvs` is not null before calling a method on it.

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

--HG--
extra : moz-landing-system : lando
2019-07-24 15:26:31 +00:00
Thomas Nguyen
db9e147a01 Bug 1566411 Use ReferrerInfo class in imgLoader.idl r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D38177

--HG--
extra : moz-landing-system : lando
2019-07-25 08:23:32 +00:00
Bobby Holley
5d23efb2eb Bug 1566583 - Bridge GeckoResult to MozPromise and return a GeckoResult from GeckoProcessManager::start. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D38436

--HG--
extra : moz-landing-system : lando
2019-07-24 21:10:14 +00:00
Bobby Holley
fe3f8ed5bb Bug 1566583 - Factor primitive conversion logic out of EventDispatcher. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D38435

--HG--
extra : moz-landing-system : lando
2019-07-24 21:10:09 +00:00
Coroiu Cristina
f3386dea34 Backed out 4 changesets (bug 1566583) for apilint and checkstyle failure at geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java on a CLOSED TREE
Backed out changeset 3700ef585384 (bug 1566583)
Backed out changeset fbc829be6c4f (bug 1566583)
Backed out changeset 14ea9c84bb0e (bug 1566583)
Backed out changeset 92f3b1bb34a4 (bug 1566583)
2019-07-24 22:59:54 +03:00
Bobby Holley
53719788a1 Bug 1566583 - Bridge GeckoResult to MozPromise and return a GeckoResult from GeckoProcessManager::start. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D38436

--HG--
extra : moz-landing-system : lando
2019-07-24 19:19:40 +00:00
Bobby Holley
b9d662007c Bug 1566583 - Factor primitive conversion logic out of EventDispatcher. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D38435

--HG--
extra : moz-landing-system : lando
2019-07-24 19:19:29 +00:00
harry
aa07dd7b93 Bug 1521893 - Part 2 - Support loading SVG icons on the Touch Bar through a new nsTouchBarInputIcon service class r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D34926

--HG--
extra : moz-landing-system : lando
2019-07-24 13:03:49 +00:00
Boris Zbarsky
a818800ec5 Bug 1568278. Remove various unnecessary QIs to nsIDOMWindow. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D39065

--HG--
extra : moz-landing-system : lando
2019-07-24 01:26:07 +00:00
Aaron Klotz
bdb6129af0 Bug 1567614: Part 2 - Add ShellExecuteByExplorer overload to handle absolute PIDL lists; r=jmathies
For the URI handling case, we still want to parse the URI to look for any
malformation. OTOH, IShellDispatch2::ShellExecute does not accept PIDLs as
arguments, we we need an overload that converts the absolute PIDL back to a
path for the purposes of passing on to that interface.

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

--HG--
extra : moz-landing-system : lando
2019-07-23 20:18:07 +00:00