Commit Graph

24606 Commits

Author SHA1 Message Date
Cosmin Sabou
00f3836a87 Merge mozilla-inbound to mozilla-central. a=merge 2019-02-28 12:57:50 +02:00
Tarek Ziadé
f79af75337 Bug 1530642 - Added more doc on ProcType and GetProcInfo - r=jesup
Added more docs for type synchronization, and about GetProcInfo

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

--HG--
extra : moz-landing-system : lando
2019-02-28 06:30:05 +00:00
Jonathan Kingston
f6680698bd Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-27 23:42:27 +00:00
Jonathan Kingston
c4853316e7 Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:31 +00:00
Jonathan Kingston
f7e35ae39e Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:04 +00:00
Oana Pop Rus
eda7a08ec6 Backed out changeset b63cae045a63 (bug 1462018) for geckoview failures 2019-02-27 14:42:59 +02:00
Emily Toop
c616a388d1 Bug 1462018 - Add API for taking screenshot of visible page. r=geckoview-reviewers,snorp
Invert screen pixels in `nsWindow`.

Update `RequestScreenPixels` in `nsWindow` to accept a `GeckoResult` as an argument and save as a `GlobalRef`.
Update `RecvScreenPixels` in `nsWindow` in order to invert the image before sending over JNI rather than requiring callers to invert the image themselves.
Complete the `GeckoResult` if there is one in `RecvScreenPixels` instead of making a callback to the compositor.

Remove `RecvScreenPixels` from `GeckoSession` and `GeckoSession.Compositor`.
Move `RecvScreenPixels` and `getPixels` to `GeckoDisplay`
Rename `getPixels` to `capturePixels`

Return Bitmap from `RecvScreenPixels`.

Return `GeckoResult` from `capturePixels`.

Add doc comments to new methods and classes.
Update FennecNativeDriver to use `GeckoView` and `GeckoResult`.

Update API docs and Changelog

Add tests

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

--HG--
extra : moz-landing-system : lando
2019-02-26 10:51:02 +00:00
Martin Stransky
1f8f77f796 Bug 1530625 - Enable system titlebar on Gnome/X.org sessions due mutter Bug 1530625 and disable titlebar X shape mask on mutter/X.org, r=lsalzman
- Detect current desktop session and disable shape mask on Mutter/X.org due to Bug 1530252 (mutter bug).
- Use system titlebar on Mutter/X.org as we can't draw the titlebar reliably.
- Remove widget.default-hidden-titlebar from prefs. When it's defined it overrides default titlebar detection heuristics now.
- Don't use shape masks at all on Mutter/x.org. When system titlebar is hidden in this case (by user choice) it has opaque corners unless
  argb visual is selected.
- Use Window manager decorations on Gnome Classic session, that works better than client decorations.

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

--HG--
extra : moz-landing-system : lando
2019-02-26 17:46:15 +00:00
shindli
529e235210 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-02-26 19:01:20 +02:00
Masatoshi Kimura
fb147aebf9 Bug 1293043 - Do not shrink favicons down to 16x16. r=aklotz
By this change, icons will never be shrunk to a smaller size. Windows will do
it appropriately.

Internet Explorer's icon handler will not paint the white background if the
icon is large enough. I'm also replicating the behavior.

--HG--
extra : source : 56eb23aaff3a5a0dbca8e41c534307c30e7351f4
2019-02-23 13:32:12 +09:00
Henri Sivonen
862a7144a9 Bug 1524226 - Add LayersId field to WidgetEvent and InputData. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D20169

--HG--
extra : moz-landing-system : lando
2019-02-26 07:15:43 +00:00
Noemi Erli
7e23372938 Merge mozilla-central to autoland. a=merge CLOSED TREE
--HG--
extra : rebase_source : de8796d5d7d7079af1b895a2f537371885f8cc6c
2019-02-26 00:09:40 +02:00
Oana Pop Rus
f4b7b652c4 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-02-25 18:52:42 +02:00
Christoph Kerschbaumer
c8bb3d7749 Bug 1529869: Remove the 2 from speculate speculative(Anonymous)Connect2 within nsISpeculativeConnect.idl. r=valentin 2019-02-24 20:26:56 +01:00
Alex Gaynor
0e903787da Bug 1415508 - use Span in constructing a byte input stream; r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D20687

--HG--
extra : moz-landing-system : lando
2019-02-25 19:11:20 +00:00
sotaro
1579a88e49 Bug 1527804 - Trigger composite from frame_callback_handler() r=stransky
Bug 1514156 expects that nsWindow::OnExposeEvent() is called after frame_callback_handler() called. But it did not happen during opening add-ons(gecko profiler). Then we need to trigger rendering directly from frame_callback_handler() call.

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

--HG--
extra : moz-landing-system : lando
2019-02-25 12:15:50 +00:00
Tarek Ziadé
2420a8ebb9 Bug 1502917 - Adding ChromeUtils.RequestProcInfo() - r=Ehsan,mstange,kershaw,mhowell
This patch introduces a new module in widget that implements a simple API to
retrieve system information about a process and its threads.

This function is wrapped into ChromeUtils.RequestProcInfo to return information
about processes started by Firefox.

The use case for this API is to monitor Firefox resources usage in projects
like the battery usage done by the data science team.

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

--HG--
extra : moz-landing-system : lando
2019-02-23 18:07:59 +00:00
Razvan Maries
d7a2f49ed8 Merge mozilla-inbound to mozilla-central a=merge 2019-02-23 06:15:14 +02:00
James Willcox
6f4446a1d8 Bug 1529297 - Make GeckoWebExecutor.resolve() fail with UnknownHostException r=geckoview-reviewers,esawin
Also clean up some doc strings.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 14:23:37 +00:00
Masatoshi Kimura
8a453fc263 Bug 1529902 - Fix invalid use of NS_ConvertUTF16toUTF8. r=aklotz
--HG--
extra : source : 50a1a395c081a8630b06022dd85187121bd2bd12
2019-02-22 22:37:48 +09:00
Dorel Luca
e2b65baabd Backed out changeset cd5dbeee8c5d (bug 1502917) for build bustage. CLOSED TREE 2019-02-22 14:32:42 +02:00
Tarek Ziadé
983d831bbe Bug 1502917 - Adding ChromeUtils.RequestProcInfo() - r=Ehsan,mstange,kershaw,mhowell
This patch introduces a new module in widget that implements a simple API to
retrieve system information about a process and its threads.

This function is wrapped into ChromeUtils.RequestProcInfo to return information
about processes started by Firefox.

The use case for this API is to monitor Firefox resources usage in projects
like the battery usage done by the data science team.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 23:05:44 +00:00
Masayuki Nakano
249269b4ff Bug 1529466 - Make TextInputHandler::HandleCommand() dispatch keydown/keypress events for emulating Tab key when insertTab: or intertBacktab: command is received r=m_kato
`TextInputHandler::HandleCommand()` dispatches `Tab` key events only when
it receives `insertTab:` or `intertBacktab:` command which are caused by
actual `Tab` key press.

However, these commands could be generated by IME or the system shortcut
keys are customized oddly.

This patch makes the method support such situation with dispatching fake
`keydown` and `keypress` events to emulate `Tab` key press for
mainly focus navigation.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 13:35:55 +00:00
Masayuki Nakano
da3a46f861 Bug 1529467 - Make TextInputHandler::HandleCommand() dispatch eKeyDown event r=m_kato
Currently, when IME sends a command with committing composition,
TextInputHandler::HandleCommand() dispatches a *fake* `keypress` event
for making default event handler (e.g., focused editor) handle the
event.  However, we stopped dispatching `keypress` events for
non-printable keys.  Therefore, web apps cannot do that like us.

On macOS, simple conversion IMEs like Korean 2-set IME, behave
differently if active application is changed.  E.g., on Safari,
some of them may never use composition string, but not so on
Chrome and Firefox.  So, this is what the case we need to emulate
Safari's behavior.

Dispatching a fake `keydown` event for this purpose does **not**
conform to UI Events because `keydown` events should notify web
apps of **physical** key state changes.  However, Chrome dispatches
fake `keydown` events intentionally.  Therefore, we should follow
this hacky behavior for user experience.

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

--HG--
extra : moz-landing-system : lando
2019-02-25 04:13:20 +00:00
Dorel Luca
4a4dcd57fa Backed out 4 changesets (bug 1525319) for Android failures in dom/base/test/test_progress_events_for_gzip_data.html
Backed out changeset b73f033efb41 (bug 1525319)
Backed out changeset 1d318d5c6b98 (bug 1525319)
Backed out changeset 6d73418988d4 (bug 1525319)
Backed out changeset 84ca79bd2dc3 (bug 1525319)
2019-02-25 04:06:11 +02:00
Jonathan Kingston
63ab2bd8aa Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-24 20:27:55 +00:00
Jonathan Kingston
332531fa9c Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:59 +00:00
Jonathan Kingston
2441197975 Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:16 +00:00
Masayuki Nakano
e4c0982b38 Bug 1528943 - Stop trying to retrieve raw keycode value when native virtual keycode is VK_PROCESS r=m_kato
We didn't dispatch keyboard events during composition.  Therefore, we tried to
retrieve raw virtual keycode value when key messages come with `VK_PROCESS`
unexpectedly.  However, the API, `ImmGetVirtualKey()`, is not usable for this
purpose because it always returns `VK_PROCESS` if the key messages have already
been handled by IME.  So, we can just stop using it since we need to expose
such key messages as KeyboardEvent whose `key` value is `Process` and `keyCode`
value is `DOM_VK_PROCESS`.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 03:32:48 +00:00
Harry Twyford
ecbfeaf86f Bug 1522039 - Changes default Touch Bar button set and replaces icon on Close Window button. r=bwinton,mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D17831

--HG--
extra : moz-landing-system : lando
2019-02-21 19:23:33 +00:00
Jeff Muizelaar
0458c3d04d Bug 1515823. Disable Direct2D on Qualcomm devices. r=aosmond
There seem to be a number of problems with Direct2D on the Qualcomm
devices. This includes visual corruption from bug 1515823 and crashes
in CHwRasterizer::RasterizeEdges from 1515387.
2019-02-21 13:27:04 -05:00
James Willcox
f2d0270ef5 Bug 1526327 - Add GeckoWebExecutor.FETCH_FLAGS_NO_REDIRECT r=geckoview-reviewers,droeh,esawin
Using this flag will cause GeckoWebExecutor.fetch() to not automatically
follow redirects, which is the default behavior if no flag is specified.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 21:46:14 +00:00
James Willcox
b90839887f Bug 1522705 - Add streaming response support to GeckoWebExecutor r=esawin,agi
Differential Revision: https://phabricator.services.mozilla.com/D19504

--HG--
extra : moz-landing-system : lando
2019-02-22 21:46:05 +00:00
Daniel Holbert
321a0ac1d9 Bug 1529707: Use RelativeLuminanceUtils::Compute() to test for dark GTK themes (ignoring alpha channel). r=karlt
Previously we were using NS_GetLuminosity which asserts for non-opaque colors,
and my system theme happens to use a background color with alpha=0.999.

Luminosity judgements do get a bit more hand-wavy as colors get more
transparent, but it seems like we can still reasonably make an overall
"dark theme" judgement based on the RGB channels.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 19:32:14 +00:00
Jeff Walden
c99bad877a Bug 1453456 - Followup for Windows-specific bustage about char16ptr_t where every other platform has a nice pointer-to-character type instead. r=bustage in a CLOSED TREE 2019-02-27 12:49:20 -08:00
Jeff Walden
7b8ce42e6e Bug 1453456 - Remove nsCRT::IsAscii(null-terminated string) in favor of mozilla::IsAsciiNullTerminated. r=froydnj 2019-02-25 12:22:24 -08:00
Daniel Varga
3599b0576d Merge mozilla-central to mozilla-inbound. a=merge
--HG--
rename : browser/base/content/test/general/browser_bug655584.js => browser/components/urlbar/tests/browser/browser_switchTab_closesUrlbarPopup.js
rename : browser/base/content/test/general/browser_bug555767.js => browser/components/urlbar/tests/browser/browser_switchToTab_closes_newtab.js
rename : mobile/android/themes/core/about.css => toolkit/themes/mobile/global/about.css
rename : mobile/android/themes/core/aboutMemory.css => toolkit/themes/mobile/global/aboutMemory.css
rename : mobile/android/themes/core/aboutSupport.css => toolkit/themes/mobile/global/aboutSupport.css
extra : rebase_source : 5fd5811cdafdf926348a80fbb1a1427b9c113f90
2019-02-27 18:36:49 +02:00
Martin Stransky
8222d966e6 Bug 1529713 - [Titlebar] Use Window manager decorations on GNOME again, r=lsalzman
This patch enables the shape mask in CSD and Window manager decorations mode
when we're runnin on composited screen and mozilla.widget.use-argb-visuals is not set.

Also don't use shape mask with Wayland and GL backend. When shape mask is set,
advertise toplevel window transparency but don't advertise it
as alpha to GtkCompositorWidget.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 14:01:50 +00:00
Oana Pop Rus
c6934bd373 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-02-21 11:45:07 +02:00
Oana Pop Rus
b36e97fc77 Merge inbound to mozilla-central. a=merge 2019-02-21 11:31:00 +02:00
Mats Palmgren
28ffbfffda Bug 1525775 - [css-mediaqueries] Synthesize a value for eIntID_SystemUsesDarkTheme to determine if GTK are using a light or dark theme. r=heycam,karlt 2019-02-21 09:12:35 +01:00
Cosmin Sabou
9f8b29287b Merge mozilla-central to autoland. 2019-02-21 05:43:34 +02:00
Cosmin Sabou
f3db52f4cf Merge mozilla-inbound to mozilla-central. a=merge 2019-02-21 05:42:03 +02:00
Kartikaya Gupta
35b16df12a Bug 1428158 - Fix static analysis errors in Android widgetry code. r=snorp
Just a few implicit constructors that need to be made explicit.

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

--HG--
extra : moz-landing-system : lando
2019-02-20 19:58:15 +00:00
Makoto Kato
376eb1a4da Bug 1528665 - Remove GetAndroidSystemInfo sync IPC. r=geckoview-reviewers,mccr8,snorp
nsSystemInfo is initialzied at first page load. Actually, content process uses
sync IPC to get Android OS information. But now, we can use Java code even if
on content process, so we should use JNI directly instead of sync IPC.

Also, nsSystemInfo still has unused extern android_sdk_version that is for
HoneyComp's DNS hack.  So let's remote it.

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

--HG--
extra : moz-landing-system : lando
2019-02-19 21:19:14 +00:00
Jeff Gilbert
d6410e953a Bug 1528394 - Reduce includes of GLContext.h. r=lsalzman
Splitting part of OGLShaderProgram.h out into OGLShaderConfig.h makes it
easier to keep GLContext.h included in OGLShaderProgram.h for inlining
purposes.

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

--HG--
extra : moz-landing-system : lando
2019-02-19 23:25:42 +00:00
Masayuki Nakano
474225038e Bug 998941 - part 2-2: Make HTMLEditor set InputEvent.dataTransfer when InputEvent.inputType is "insertFromPaste", "insertFromDrop" or "insertReplacementText" r=smaug,m_kato
InputEvent.dataTransfer should be set to non-null when InputEvent.inputType
is "insertFromPaste", "insertFromDrop" or "insertReplacementText" and
editor is an HTMLEditor instance:
https://rawgit.com/w3c/input-events/v1/index.html#dfn-data
https://w3c.github.io/input-events/#dfn-data

("insertTranspose" and "insertFromYank" are not currently supported on Gecko.)

This patch makes nsContentUtils::DispatchInputEvent() take dataTransfer value
and EditorBase set it via AutoEditActionDataSetter like data value.

However, we need to create other constructors of DataTransfer to create its
read-only instances initialized with nsITransferable or nsAString.  This will
be implemented by the following patch.

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

--HG--
extra : moz-landing-system : lando
2019-02-19 06:33:42 +00:00
Masayuki Nakano
6eadee9e6c Bug 998941 - part 2-1: Implement InputEvent.dataTransfer declared by Input Events r=smaug
InputEvent.dataTransfer is declared by Input Events Level 1 and Level 2 (i.e.,
not UI Events).  It's necessary for "beforeinput" event on contenteditable
elements because of with some InputEvent.inputType values on contenteditable,
InputEvent.dataTransfer is used instead of InputEvent.data.

According to the Chrome's behavior, if InputEvent.dataTransfer is created by
web apps, the DataTransfer object is mutable.  Otherwise, i.e., the event
represents user input, the DataTransfer object is read only.  We should follow
this behavior.

This is enabled by default.

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

--HG--
extra : moz-landing-system : lando
2019-02-19 06:32:11 +00:00
Masayuki Nakano
551de121c1 Bug 998941 - part 1-7: Make HTMLEditor set InputEvent.data to serialized color value when InputEvent.inputType is "formatBackColor" or "formatForeColor" r=smaug,m_kato,emilio
Although neither Chrome nor Safari does not set InputEvent.data when the event
is caused by `document.execCommand()` with `backColor`, `foreColor` nor
`hiliteColor`, Safari supports styling color with touchbar and in that case,
Safari sets it (*1).

Additionally, currently Safari uses `rgb()` to represents a color value and
using same rule to serializing color value for CSS OM matches Safari's behavior
and can represent any valid color values.

This patch makes given color value parsed and then serialized with same code
in style system.  If the value is `currentcolor`, `inherit`, `initial` or `reset`, sets
the value as-is for now.  Additionally, when given value is invalid, sets the value
as-is for forward compatibility.

Note that automated tests will be added into input-events-exec-command.html
by the last patch.

1. https://github.com/w3c/input-events/issues/94#issuecomment-461061517

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

--HG--
extra : moz-landing-system : lando
2019-02-19 06:31:28 +00:00
Masayuki Nakano
135f048bdf Bug 998941 - part 1-6: Make HTMLEditor set InputEvent.data when InputEvent.inputType is "fontName" r=smaug,m_kato
Although neither Chrome nor Safari does not set InputEvent.data value when
InputEvent.inputType is "fontName", but it's easy to implement. Therefore, this
patch implements it as declaration of Input Events.

This patch uses given value as-is.  Perhaps, this shouldn't cause any problems
because such value can be set to Element.style.fontFamily without any changes.

Note that automated test will be added into WPT later.

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

--HG--
extra : moz-landing-system : lando
2019-02-19 06:30:50 +00:00