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

774 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 3987c781d0 Bug 1635914 - Move active flag handling explicitly to BrowsingContext. r=nika
And have it mirror in the parent process more automatically.

The docShellIsActive setter in the browser-custom-element side needs to
be there rather than in the usual DidSet() calls because the
AsyncTabSwitcher code relies on getting an exact amount of notifications
as response to that specific setter. Not pretty, but...

BrowserChild no longer sets IsActive() on the docshell itself for OOP
iframes. This fixes bug 1679521. PresShell activeness is used to
throttle rAF as well, which handles OOP iframes nicely as well.

Differential Revision: https://phabricator.services.mozilla.com/D96072
2020-12-11 15:43:19 +00:00
Emilio Cobos Álvarez 9c5e37f7c2 Bug 1681095 - Add a privileged API to tell the print dialog whether a selection belongs to the previewed page vs. an iframe. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D98991
2020-12-10 10:52:41 +00:00
Barret Rennie e2fce2bed4 Bug 1677000 - Rename IOUtils.writeAtomic{,UTF8} to IOUtils.write{,UTF8} r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D99001
2020-12-09 05:48:46 +00:00
Razvan Maries 9614a08d73 Backed out 7 changesets (bug 1677000) for perma failures on test_ioutils_read_write.html. CLOSED TREE
Backed out changeset 3521334cfc38 (bug 1677000)
Backed out changeset 737f380c2cf2 (bug 1677000)
Backed out changeset 9dba15fdfe1f (bug 1677000)
Backed out changeset b2fa1a061b15 (bug 1677000)
Backed out changeset a5d7845d3c0c (bug 1677000)
Backed out changeset 8e6081b0c07d (bug 1677000)
Backed out changeset 6592577cf0fa (bug 1677000)
2020-12-09 07:34:21 +02:00
Barret Rennie 0dc367a38f Bug 1677000 - Rename IOUtils.writeAtomic{,UTF8} to IOUtils.write{,UTF8} r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D99001
2020-12-09 04:31:40 +00:00
Barret Rennie 1cf888ecaf Bug 1678415 - Support setting file mode in IOUtils.createDirectory on non-Windows platforms r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D97691
2020-12-03 05:38:11 +00:00
Barret Rennie ae7c7ad4a2 Bug 1678471 - Implement IOUtils::Exists r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D97690
2020-12-03 05:38:03 +00:00
Barret Rennie 47793f361c Bug 1673019 - Get and set file permissions in IOUtils r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D97689
2020-12-03 05:37:45 +00:00
Barret Rennie 69d3035e96 Bug 1660843 - Return creation time from IOUtils.stat() on supported platforms r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D96890
2020-12-03 05:37:33 +00:00
Emilio Cobos Álvarez a49800a500 Bug 1679706 - Communicate to the front-end whether there are no visible pages at all. r=jfkthame
This will allow them to react however they want to empty page ranges as
a result of another setting change.

Differential Revision: https://phabricator.services.mozilla.com/D98183
2020-12-02 21:48:03 +00:00
Emilio Cobos Álvarez 106b693662 Bug 1679456 - Use transient user activation for iframe external protocol blocking. r=smaug,edgar
I think this allows us to remove TryUsePopupOpeningToken (which is a similar
concept to consuming user activation), and also the ad-hoc <iframe> timing
thing we have from bug 1514547, which should be covered by the user activation
timeout.

Depends on D97640

Differential Revision: https://phabricator.services.mozilla.com/D98020
2020-11-30 16:16:41 +00:00
Marco Bonardo 7ebfd9d1f3 Bug 1677408 - Part 1 - Replace onPageChanged with a new favicon-changed notification. r=Standard8,emilio
Use the new notifications system to notify about favicon changes, that is the only
part left of onPageChanged.

Differential Revision: https://phabricator.services.mozilla.com/D97274
2020-11-23 16:23:46 +00:00
Butkovits Atila 470d497c4a Backed out 7 changesets (bug 1677408) for bustages on nsNavHistory.cpp. CLOSED TREE
Backed out changeset 1e0dc9aaa979 (bug 1677408)
Backed out changeset 4198bc35198c (bug 1677408)
Backed out changeset ff93f264138b (bug 1677408)
Backed out changeset 0f2d72d2ed5a (bug 1677408)
Backed out changeset 996cbd111957 (bug 1677408)
Backed out changeset b0c23854e117 (bug 1677408)
Backed out changeset f7d6cc5e4457 (bug 1677408)
2020-11-23 16:49:31 +02:00
Marco Bonardo e064fb5784 Bug 1677408 - Part 1 - Replace onPageChanged with a new favicon-changed notification. r=Standard8,emilio
Use the new notifications system to notify about favicon changes, that is the only
part left of onPageChanged.

Differential Revision: https://phabricator.services.mozilla.com/D97274
2020-11-23 12:53:04 +00:00
Florian Quèze 0d164d3a9f Bug 1674476 - ChromeUtils.addProfilerMarker should support capturing a stack or setting the category, r=gerald,gregtatum.
Differential Revision: https://phabricator.services.mozilla.com/D95406
2020-11-20 15:41:16 +00:00
Kershaw Chang a345a4fc78 Bug 1677746 - Move NetDashboard.webidl to dom/chrome-webidl/ r=necko-reviewers,valentin,webidl,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97317
2020-11-17 16:06:39 +00:00
Tim Huang bc798e0690 Bug 1641270 - Part 4: Expose the cookieJarSettings to the browser object. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D95614
2020-11-11 11:14:14 +00:00
Mihai Alexandru Michis 4038013e6f Backed out 9 changesets (bug 1641270) for causing dt failures in browser_jsonview_save_json.js
CLOSED TREE

Backed out changeset 89a6dab92f1a (bug 1641270)
Backed out changeset 5f9c5af66b77 (bug 1641270)
Backed out changeset dfeb879f4131 (bug 1641270)
Backed out changeset 143728b1b1ab (bug 1641270)
Backed out changeset 265ae2953416 (bug 1641270)
Backed out changeset 55ea7810c160 (bug 1641270)
Backed out changeset 7bef9112f296 (bug 1641270)
Backed out changeset 2663dc1e9a3e (bug 1641270)
Backed out changeset fcba6dba3649 (bug 1641270)
2020-11-11 13:10:11 +02:00
Tim Huang ed61dc5da5 Bug 1641270 - Part 4: Expose the cookieJarSettings to the browser object. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D95614
2020-11-11 08:38:59 +00:00
Steven MacLeod 971103bdd5 Bug 1606061 - move TouchEventsOverride to BrowsingContext. r=farre,devtools-backward-compat-reviewers
This change removes docshell's `mTouchEventsOverride` and replaces it
with a new `BrowsingContext` field `TouchEventsOverrideInternal`.
All uses of the old field have been replaced and an override should
now work under fission when there are cross-origin descendent frames.

Differential Revision: https://phabricator.services.mozilla.com/D96414
2020-11-10 15:57:30 +00:00
Barret Rennie 5831b3e790 Bug 1674311 - Add profile, local profile, and temp dir paths to PathUtils r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D95254
2020-11-10 12:08:53 +00:00
Barret Rennie ac6be32a0a Bug 1671035 - Add a WebIDL backed path manipulation utility r=Gijs,nika
PathUtils is a path manipulation component to IOUtils, which is based on
simplified file I/O. This work is part of the larger goal of removing
osfile.jsm et al., ospath.jsm et al., and the entire OS.* namespace, especially
from the startup path.

No equivalent was provided for OS.Path.fromFileURI because it is unused.

Differential Revision: https://phabricator.services.mozilla.com/D95105
2020-11-05 18:08:38 +00:00
Neil Deakin 3239c28e6e Bug 1662771, remove willDestroy callback from JSActors, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D94906
2020-10-29 14:24:43 +00:00
Kartikaya Gupta 8ee9f46d79 Bug 1660054 - Hook up the zoom-reset action to also reset APZ/scaling zoom. r=Gijs,nika,botond
The goal here is to hook up the ctrl+0 keyboard shortcut to reset the scaling
zoom applied by pinch gestures (on touchscreen or trackpad), in addition to
resetting the reflow zoom (aka full zoom). This patch also makes other mechanisms
to reset the reflow zoom (e.g. clicking on the "100%" label in the hamburger menu)
also reset scaling zoom, which I think makes sense for consistency.

Most of this patch is just plumbing, but I'm unfamiliar with these codepaths
so requesting review from relevant owners to make sure it's sane.

Differential Revision: https://phabricator.services.mozilla.com/D94624
2020-10-28 22:48:57 +00:00
Mihai Alexandru Michis 48192aab09 Backed out changeset 952da6bff887 (bug 1660054) for causing bc failures in browser_test_reset_scaling_zoom.js
CLOSED TREE
2020-10-28 23:00:15 +02:00
Kartikaya Gupta c75bed1584 Bug 1660054 - Hook up the zoom-reset action to also reset APZ/scaling zoom. r=Gijs,nika,botond
The goal here is to hook up the ctrl+0 keyboard shortcut to reset the scaling
zoom applied by pinch gestures (on touchscreen or trackpad), in addition to
resetting the reflow zoom (aka full zoom). This patch also makes other mechanisms
to reset the reflow zoom (e.g. clicking on the "100%" label in the hamburger menu)
also reset scaling zoom, which I think makes sense for consistency.

Most of this patch is just plumbing, but I'm unfamiliar with these codepaths
so requesting review from relevant owners to make sure it's sane.

Differential Revision: https://phabricator.services.mozilla.com/D94624
2020-10-28 19:14:18 +00:00
Emilio Cobos Álvarez e5a63697bf Bug 1673707 - Simplify handling of the suspendMediaWhenInactive flag. r=nika
Make it a synced field on the top browsing context. This handling the
propagation right and is much simpler.

This should fix cases where we don't look at the top level docshell to
figure out if we should suspend media.

Differential Revision: https://phabricator.services.mozilla.com/D94878
2020-10-27 19:55:47 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Andreas Farre f6ff91769c Bug 1667767 - Expose the BC's HistoryID field through WebIDL. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D92893
2020-10-23 10:07:09 +00:00
Jan-Erik Rediger eeb5f1a8c2 Bug 1646165 - Implement FOG's JavaScript API via WebIDL. r=chutten,webidl,emilio,smaug
This is only the basic outline.
It doesn't do anything yet, but compile.
As there are no metrics generated for it it can't look up anything.

To note: Actual metric types are implemented in XPIDL later.

The following (priviliged) JavaScript code will soon work (if the
corresponding metrics would be defined):

const { Glean } = ChromeUtils.import("resource://gre/modules/Glean.jsm");
Glean.shared.test_only.count_things.add(1);

Differential Revision: https://phabricator.services.mozilla.com/D92211
2020-10-21 11:36:46 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Mike Conley afeb4e8d2e Bug 1661304 - Allow UserInteractions to clobber one another. r=chutten,dthayer
Depends on D93589

Differential Revision: https://phabricator.services.mozilla.com/D93590
2020-10-20 20:17:01 +00:00
Mike Conley de026f5252 Bug 1661304 - Adding running() method to UserInteraction. r=chutten
Depends on D92810

Differential Revision: https://phabricator.services.mozilla.com/D93589
2020-10-20 20:16:08 +00:00
Mike Conley c22a8ed2b1 Bug 1661304 - Add an interface for front-end code to annotate background hang reports. r=dthayer,chutten,smaug
Depends on D92809

Differential Revision: https://phabricator.services.mozilla.com/D88309
2020-10-20 20:13:47 +00:00
Narcis Beleuzu 1e5c5c405a Backed out 7 changesets (bug 1661304) for xpcshell failures on test_UserInteraction_annotations.js. CLOSED TREE
Backed out changeset 10459893968e (bug 1661304)
Backed out changeset 234f7dd34c95 (bug 1661304)
Backed out changeset e1954838e36f (bug 1661304)
Backed out changeset 6f0f76bb873d (bug 1661304)
Backed out changeset 5186bba48ce7 (bug 1661304)
Backed out changeset 442ce3a64bab (bug 1661304)
Backed out changeset 88b46f9a789e (bug 1661304)
2020-10-19 21:39:07 +03:00
Mike Conley aaf06239d9 Bug 1661304 - Allow UserInteractions to clobber one another. r=chutten,dthayer
Differential Revision: https://phabricator.services.mozilla.com/D93590
2020-10-19 17:42:51 +00:00
Mike Conley f4b73ffaff Bug 1661304 - Adding running() method to UserInteraction. r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D93589
2020-10-19 17:42:28 +00:00
Mike Conley 69c8c5891d Bug 1661304 - Add an interface for front-end code to annotate background hang reports. r=dthayer,chutten,smaug
Differential Revision: https://phabricator.services.mozilla.com/D88309
2020-10-19 17:41:15 +00:00
Neil Deakin af842b5083 Bug 1670134, remove message manager reference from LightweightThemeChild.jsm, by getting chromeOuterWindowId from BrowserChild instead, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D93043
2020-10-09 17:36:22 +00:00
Razvan Maries 5dcad9e9b5 Backed out changeset 428c9c1eabb8 (bug 1655866) for multiple failures. CLOSED TREE 2020-10-09 22:28:00 +03:00
Kris Maglione 824fb768e1 Bug 1655866: Part 9 - Use the same PermitUnloadAction enum in WGP and nsIContentViewer. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D90939
2020-10-09 18:29:34 +00:00
Agi Sferro deddd22ef0 Bug 1648157 - Move DisplayMode to BrowsingContext. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D92484
2020-10-09 17:31:59 +00:00
Emilio Cobos Álvarez e9e00c7007 Bug 1669459 - Introduce InspectorUtils.supports(). r=rcaliman,heycam
Which allows to run CSS.supports in chrome/user-agent context. We should
probably add a couple more tweaks for stuff like quirks or what not (the
`ParsingMode` enum), but that seem lower priority.

I only added the one-value version of CSS.supports because it should be enough
and supporting the two value version required a bit of awkward code due to when
we parse the CSS property name right now.

Differential Revision: https://phabricator.services.mozilla.com/D92585
2020-10-09 03:20:34 +00:00
Cameron McCormack 4352fb7b0d Bug 1662839 - Set author style disabled state correctly on newly created iframes. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D90953
2020-10-04 03:25:16 +00:00
Kris Maglione 6911cfe5e9 Bug 1666670: Fix beforeunload timeout handling to ignore prompt. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D91351
2020-10-01 02:46:45 +00:00
Narcis Beleuzu 4fa3a7f995 Backed out changeset 6cf959e2de7b (bug 1666670) for wpt failures on scroll-behavior-smooth.html . CLOSED TREE 2020-10-01 05:20:54 +03:00
Alexandre Poirot e7dd48ae85 Bug 1667790 - Allow `sharedData` to be null very early during process startup. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D91558
2020-09-30 18:10:29 +00:00
Kris Maglione 49bc543261 Bug 1666670: Fix beforeunload timeout handling to ignore prompt. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D91351
2020-09-30 19:39:56 +00:00
Bogdan Tara d88ac68590 Backed out changeset 1bfa83880712 (bug 1662839) for browser_disable_author_style_oop.js failures CLOSED TREE 2020-09-24 05:55:25 +03:00
Cameron McCormack fc16d8bc27 Bug 1662839 - Set author style disabled state correctly on newly created iframes. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D90953
2020-09-24 01:24:57 +00:00
Kris Maglione d3498e1041 Bug 1655866: Part 5 - Use native PermitUnload implementation from front-end code. r=nika,mconley
Differential Revision: https://phabricator.services.mozilla.com/D88318
2020-09-21 22:41:04 +00:00
Kris Maglione fb3a9daf66 Bug 1655866: Part 2 - Move HasBeforeUnload flag to WindowContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D88315
2020-09-21 22:40:51 +00:00
Kris Maglione 2d863e9e4c Bug 1655866: Part 1 - Add async version of beforeUnloadCheck prompt. r=geckoview-reviewers,Gijs,agi
Differential Revision: https://phabricator.services.mozilla.com/D88314
2020-09-21 22:40:42 +00:00
pbz b81e69ee95 Bug 1314912 - Rate limit calls to History and Location interfaces. r=smaug
This adds a rate limit to methods and setters of the History and Location
for non-system callers.
The rate limit is counted per BrowsingContext and can be controlled by prefs.

This patch is based on the original rate limit patch by :freesamael.

Differential Revision: https://phabricator.services.mozilla.com/D90136
2020-09-21 11:54:50 +00:00
Bianca Danforth 6bd0932119 Bug 1664585 - Expose SameOriginWithTop to JavaScript; r=farre,nika
Differential Revision: https://phabricator.services.mozilla.com/D90143
2020-09-16 16:29:37 +00:00
Andreas Farre f9f96d23ca Bug 1662410 - Part 1: Fix usage of ChildSHistory.legacySHistory . r=peterv
ChildSHistory.legacySHistory isn't valid for content processes when
session history in the parent is enabled. We try to fix this by either
delegating to the parent by IPC or move the implementation partially
or as a whole to the parent.

Differential Revision: https://phabricator.services.mozilla.com/D89353
2020-09-16 14:51:01 +00:00
Agi Sferro 652cebf086 Bug 1648154 - Expose JSActor.name to javascript. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D89656
2020-09-12 02:39:30 +00:00
Emilio Cobos Álvarez 47916c8c70 Bug 1662987 - ClearDataService should know how to clear the stylesheet cache. r=baku
Much like it does for images.

Differential Revision: https://phabricator.services.mozilla.com/D89242
2020-09-08 19:38:43 +00:00
David Teller 7ffc3a3d91 Bug 1652785 - Extract title, uri, window id for content processes;r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87972
2020-09-07 10:26:30 +00:00
Narcis Beleuzu 2fb77a351a Backed out 2 changesets (bug 1652785) for bc failure on browser_test_procinfo.js
Backed out changeset 7e71f3cff603 (bug 1652785)
Backed out changeset efdd8cffde2b (bug 1652785)
2020-09-04 11:57:28 +03:00
David Teller e071745684 Bug 1652785 - Extract title, uri, window id for content processes;r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87972
2020-09-02 12:59:49 +00:00
Bob Owen 5cb94890b3 Bug 1661975: Add whether we have a selection to PrintPreviewResultInfo. r=jwatt
This is then used in the front end to set the option in the settings.

Differential Revision: https://phabricator.services.mozilla.com/D89045
2020-09-02 08:15:35 +00:00
Nicklas Boman 72bf374f5c Bug 1659828 - Get rid of `virtualMemorySize` in ProcInfo r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D89013
2020-09-02 12:56:46 +00:00
Jonathan Watt ad76c1dcba Bug 1653340. Add new FrameLoader.printPreview() API. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D88703
2020-09-01 11:00:36 +00:00
Keefer Rourke b046b1150d Bug 1660835: Add LZ4 compression options to IOUtils read and write methods r=barret,Gijs
NB: This change breaks the IOUtils.read API, requiring that an options
dictionary is passed as the optional second argument, rather than a number
indicating the max bytes to read. This option is not used out of tests however.

Differential Revision: https://phabricator.services.mozilla.com/D88177
2020-08-28 15:57:44 +00:00
Keefer Rourke 9502c4fa57 Bug 1660328: Implement IOUtils::getChildren method r=barret,Gijs
This change introduces a `getChildren` method to the IOUtils interface, which
returns an array of absolute paths pointing to the immediate children of a
directory.

This method should provide equivalent (though not the same) functionality to
iterating directory entries using a new `OS.File.DirectoryIterator`.

Differential Revision: https://phabricator.services.mozilla.com/D87875
2020-08-28 15:49:58 +00:00
Razvan Maries 8d3f0b2e12 Backed out 2 changesets (bug 1660835, bug 1660328) for build bustages on IOUtils.h. CLOSED TREE
Backed out changeset fb0e2ef2d60d (bug 1660835)
Backed out changeset 2a9bdc86cff7 (bug 1660328)
2020-08-28 09:20:42 +03:00
Keefer Rourke b09555373a Bug 1660835: Add LZ4 compression options to IOUtils read and write methods r=barret,Gijs
NB: This change breaks the IOUtils.read API, requiring that an options
dictionary is passed as the optional second argument, rather than a number
indicating the max bytes to read. This option is not used out of tests however.

Differential Revision: https://phabricator.services.mozilla.com/D88177
2020-08-28 00:35:15 +00:00
Keefer Rourke f283542454 Bug 1660328: Implement IOUtils::getChildren method r=barret,Gijs
This change introduces a `getChildren` method to the IOUtils interface, which
returns an array of absolute paths pointing to the immediate children of a
directory.

This method should provide equivalent (though not the same) functionality to
iterating directory entries using a new `OS.File.DirectoryIterator`.

Differential Revision: https://phabricator.services.mozilla.com/D87875
2020-08-27 23:03:14 +00:00
Emilio Cobos Álvarez 27590dfe0b Bug 1661123 - Make LightWeightThemeConsumer.jsm sanitize colors faster. r=Gijs,jwatt
Instead of creating an element, flushing styles and getting the computed
value back just to receive, use the existing InspectorUtils.colorToRGBA.

With some refactoring, we can completely get rid of parsing rgba strings
in LightWeightThemeConsumer too, as a benefit. This should be much
faster.

This patch tweaks the InspectorUtils API to allow taking a document, so
that system colors keep working. We could probably get away without
supporting system colors, but it'd technically be a regression, and
since we want this patch to be uplifted, and it's easy, let's avoid
breaking changes.

Differential Revision: https://phabricator.services.mozilla.com/D88200
2020-08-27 12:33:11 +00:00
Bogdan Tara f22b74fc65 Backed out changeset 8fe9ffffccda (bug 1661123) for browser_ext_themes_experiment.js failures CLOSED TREE 2020-08-27 14:57:07 +03:00
Emilio Cobos Álvarez 4282f1752b Bug 1661123 - Make LightWeightThemeConsumer.jsm sanitize colors faster. r=Gijs,jwatt
Instead of creating an element, flushing styles and getting the computed
value back just to receive, use the existing InspectorUtils.colorToRGBA.

With some refactoring, we can completely get rid of parsing rgba strings
in LightWeightThemeConsumer too, as a benefit. This should be much
faster.

This patch tweaks the InspectorUtils API to allow taking a document, so
that system colors keep working. We could probably get away without
supporting system colors, but it'd technically be a regression, and
since we want this patch to be uplifted, and it's easy, let's avoid
breaking changes.

Differential Revision: https://phabricator.services.mozilla.com/D88200
2020-08-27 10:50:54 +00:00
Narcis Beleuzu b342cdb618 Backed out changeset f154c83412cf (bug 1660328) for build bustages on IOUtils.cpp CLOSED TREE 2020-08-26 23:53:49 +03:00
Keefer Rourke 2e6c8a9162 Bug 1660328: Implement IOUtils::getChildren method r=barret,Gijs
This change introduces a `getChildren` method to the IOUtils interface, which
returns an array of absolute paths pointing to the immediate children of a
directory.

This method should provide equivalent (though not the same) functionality to
iterating directory entries using a new `OS.File.DirectoryIterator`.

Differential Revision: https://phabricator.services.mozilla.com/D87875
2020-08-26 15:37:42 +00:00
Keefer Rourke 196bd8e745 Bug 1659176: Document return values for IOUtils r=barret,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D87873
2020-08-26 15:37:39 +00:00
Keefer Rourke dbbe7d3a1b Bug 1659838: Change IOUtils shutdown blocker phase from XPCOMWillShutdown to ProfileBeforeChange r=Gijs
IOUtils is meant to act as a drop-in replacement for OS.File. Previously,
IOUtils would block shutdown at the XPCOMWillShutDown phase to allow pending
I/O tasks to finish, however, OS.File blocks for the same reason during the
ProfileBeforeChange phase.

To make IOUtils directly compatible with OS.File, we now match this behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D87511
2020-08-26 15:37:29 +00:00
Keefer Rourke 786a18d733 Bug 1657647: Implement IOUtils methods to read and write UTF-8 text r=barret,froydnj
This change introduces two new methods to the IOUtils interface:

1. `readUTF8` will read an entire file as an UTF-8 encoded text
2. `writeAtomicUTF8` will encode a provided DOMString to UTF-8 and write it
   to file

Differential Revision: https://phabricator.services.mozilla.com/D87020
2020-08-26 15:37:25 +00:00
Keefer Rourke e51e603b3c Bug 1655460: Implement IOUtils::touch method r=barret,Gijs
This patch introduces a touch method to the IOUtils method, which allows
callers to update the modification time for a file on disk.

Differential Revision: https://phabricator.services.mozilla.com/D86832
2020-08-26 15:31:57 +00:00
Razvan Maries ff54551a34 Backed out 12 changesets (bug 1660328, bug 1660015, bug 1649595, bug 1649596, bug 1649593, bug 1659176, bug 1659839, bug 1659838, bug 1657663, bug 1657647, bug 1655460) for xpcshell perma failures. CLOSED TREE
Backed out changeset ff95badf90e3 (bug 1660328)
Backed out changeset a92f8525ab6f (bug 1659176)
Backed out changeset 8ca05470a0d5 (bug 1659839)
Backed out changeset 5de389b735d3 (bug 1649596)
Backed out changeset 73bdddd96664 (bug 1649595)
Backed out changeset 59800d609b55 (bug 1659838)
Backed out changeset 8aca41723313 (bug 1649593)
Backed out changeset dc0d90b3e135 (bug 1657647)
Backed out changeset e3dd5b6b4fbd (bug 1657663)
Backed out changeset f9c823fa14ba (bug 1657663)
Backed out changeset a5aecc7a6469 (bug 1655460)
Backed out changeset 21b64ef30e12 (bug 1660015)
2020-08-26 06:35:20 +03:00
Keefer Rourke 1d0cf6135d Bug 1660328: Implement IOUtils::getChildren method r=barret,Gijs
This change introduces a `getChildren` method to the IOUtils interface, which
returns an array of absolute paths pointing to the immediate children of a
directory.

This method should provide equivalent (though not the same) functionality to
iterating directory entries using a new `OS.File.DirectoryIterator`.

Differential Revision: https://phabricator.services.mozilla.com/D87875
2020-08-25 17:54:56 +00:00
Keefer Rourke 6cd6afcf45 Bug 1659176: Document return values for IOUtils r=barret,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D87873
2020-08-24 15:47:37 +00:00
Keefer Rourke b1744ebbe9 Bug 1659838: Change IOUtils shutdown blocker phase from XPCOMWillShutdown to ProfileBeforeChange r=Gijs
IOUtils is meant to act as a drop-in replacement for OS.File. Previously,
IOUtils would block shutdown at the XPCOMWillShutDown phase to allow pending
I/O tasks to finish, however, OS.File blocks for the same reason during the
ProfileBeforeChange phase.

To make IOUtils directly compatible with OS.File, we now match this behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D87511
2020-08-24 18:28:25 +00:00
Keefer Rourke 4a65302d85 Bug 1657647: Implement IOUtils methods to read and write UTF-8 text r=barret,froydnj
This change introduces two new methods to the IOUtils interface:

1. `readUTF8` will read an entire file as an UTF-8 encoded text
2. `writeAtomicUTF8` will encode a provided DOMString to UTF-8 and write it
   to file

Differential Revision: https://phabricator.services.mozilla.com/D87020
2020-08-24 16:28:30 +00:00
Keefer Rourke 71d39442cf Bug 1655460: Implement IOUtils::touch method r=barret,Gijs
This patch introduces a touch method to the IOUtils method, which allows
callers to update the modification time for a file on disk.

Differential Revision: https://phabricator.services.mozilla.com/D86832
2020-08-24 16:13:04 +00:00
Emilio Cobos Álvarez 044b3c4332 Bug 1636728 - Centralize printing entry points in nsGlobalWindowOuter, and move cloning out of nsPrintJob. r=jwatt,geckoview-reviewers,smaug,agi
This centralizes our print and preview setup in nsGlobalWindowOuter so
that we never re-clone a clone, and so that we reuse the window.open()
codepath to create the browsing context to clone into.

For window.print, for both old print dialog / silent printing and new
print preview UI, we now create a hidden browser (as in with visibility:
collapse, which takes no space but still gets a layout box).

 * In the modern UI case, this browser is swapped with the actual print
   preview clone, and the UI takes care of removing the browser.

 * In the print dialog / silent printing case, the printing code calls
   window.close() from nsDocumentViewer::OnDonePrinting().

 * We don't need to care about the old print preview UI for this case
   because it can't be open from window.print().

We need to fall back to an actual window when there's no
nsIBrowserDOMWindow around for WPT print tests and the like, which don't
have one. That seems fine, we could special-case this code path more if
needed but it doesn't seem worth it.

Differential Revision: https://phabricator.services.mozilla.com/D87063
2020-08-25 17:45:12 +00:00
Tomislav Jovanovic ccc7783ad3 Bug 1636508 - Make tabs.captureTab compatible with Fission r=mattwoodrow,robwu,geckoview-reviewers,agi
Also fix WindowGlobalParent.drawSnapshot() to render the currently visible
viewport when called with a null rect, and clarify the webidl comment.

Differential Revision: https://phabricator.services.mozilla.com/D87971
2020-08-25 11:30:52 +00:00
David Teller 6d1e142463 Bug 1652813 - Extract resident unique size in GetProcInfo;r=froydnj
Somewhere along the way, we fix the tests that are too fragile with respect to race conditions between processes to make them pass chaos mode testing.

Depends on D83623

Differential Revision: https://phabricator.services.mozilla.com/D83971
2020-08-20 13:32:11 +00:00
James Teh 3f51028817 Bug 1659625: Expose DOMLocalization interface to UA widgets. r=zbraniecki,smaug
This is needed in order for UA widgets to use Fluent.

Differential Revision: https://phabricator.services.mozilla.com/D87389
2020-08-18 11:29:08 +00:00
Emilio Cobos Álvarez f04cda9679 Bug 1602410 - Make window.print() work with tab-modal printing. r=nika,geckoview-reviewers,agi
Do this by spinning the event loop until we've done the clone for
preview as appropriate.

This should be much less risky than finishing the previous patches
which would still be nice, but realistically landing them for 81 is not
going to happen.

This just returns without doing nothing in a couple cases, like when
there's already another modal dialog or such. That seems acceptable to
me, it's not clear what better way to do would be.

Differential Revision: https://phabricator.services.mozilla.com/D87484
2020-08-19 09:27:18 +00:00
alwu 2f509b85ff Bug 1656398 - part7 : add event handler 'onmetadatachange'. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D86628
2020-08-18 06:55:47 +00:00
alwu 0b9d0ae82c Bug 1656398 - part5 : add event handler `onplaybackstatechange`. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D86626
2020-08-18 06:32:59 +00:00
alwu 4ac9689f10 Bug 1656398 - part4 : expose `playbackState` on MediaController webidl interface. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D86625
2020-08-17 18:41:03 +00:00
alwu e6201de3c4 Bug 1656398 - part2 : add `getMetadata()` on media controller webidl method. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D86623
2020-08-18 06:19:23 +00:00
alwu e9224c5737 Bug 1656398 - part1 : porting media controller's controlling methods r=chunmin
We've had those methods on `MediaController`, we just need to expose them on webidl interface.

Differential Revision: https://phabricator.services.mozilla.com/D86622
2020-08-17 22:52:56 +00:00
alwu 923ecc4e6a Bug 1658075 - part1 : move testing functions to new namespace 'MediaControlService'. r=smaug,chunmin
Create a new namespace `MediaControlService` to use those helper functions which is used to get the main controller related status.

Then, move those functions from `ChromeUtils` to `MediaControlService`, which give us two benefit. The first is that we can remove redudant test-only enum `MediaSessionPlaybackTestState`, the second is a pref-required work for bug1656398, to fix the build order error when exposing `MediaSessionPlaybackState` in the media controller's webidl.

Differential Revision: https://phabricator.services.mozilla.com/D86620
2020-08-14 01:32:10 +00:00
Keefer Rourke 1743e71bc9 Bug 1655461: Implement IOUtils::copy method r=barret,Gijs
This change introduces a copy method to the IOUtils interface which acts much
like the POSIX `cp` command (with the `-r` flag).

The implementations for move and copy would be very similar, so these methods
share an implementation.

Differential Revision: https://phabricator.services.mozilla.com/D85940
2020-08-10 16:00:32 +00:00
David Teller a8302b88a1 Bug 1647695 - Uniformizing naming conventions within fields of ChildProcInfoDictionary;r=tarek
Depends on D83666

Differential Revision: https://phabricator.services.mozilla.com/D83667
2020-08-06 14:16:39 +00:00
Nika Layzell 2f84ab8f50 Bug 1589517 - Part 3: Add initialBrowsingContextGroupId to extension browsers, r=zombie
This attribute can be used to force non-tab extension browsers to be loaded in
the correct BrowsingContextGroup, and also subsumes the existing
sameProcessAsFrameLoader uses in extension code.

Differential Revision: https://phabricator.services.mozilla.com/D85652
2020-08-06 17:01:10 +00:00
Nika Layzell 6eacc7257b Bug 1654193 - Avoid getting nsIBrowser when creating nsFrameLoader, r=ckerschb,peterv
This is an alternative approach from D84307, which avoids needing an extra
script runner by avoiding needing to access `nsIBrowser` from
XULFrameElement::LoadSrc.

Differential Revision: https://phabricator.services.mozilla.com/D85446
2020-08-04 20:51:45 +00:00
Csoregi Natalia b93d5d6e33 Backed out 3 changesets (bug 1647695) for failures on browser_aboutprocesses.js. CLOSED TREE
Backed out changeset 01b6951d0aae (bug 1647695)
Backed out changeset 1b1fa5dbd9bd (bug 1647695)
Backed out changeset 0f097362abf8 (bug 1647695)
2020-08-03 20:31:35 +03:00
David Teller c52c6030dc Bug 1647695 - Uniformizing naming conventions within fields of ChildProcInfoDictionary;r=tarek
Differential Revision: https://phabricator.services.mozilla.com/D83667
2020-08-03 15:03:26 +00:00
Coroiu Cristina 24283f9454 Backed out 3 changesets (bug 1647695) for bc failures at widget/tests/browser/browser_test_procinfo.js and ESlint on a CLOSED TREE
Backed out changeset c1af633ab74e (bug 1647695)
Backed out changeset 3417fe7200bd (bug 1647695)
Backed out changeset 2a0969c26d95 (bug 1647695)
2020-08-03 16:55:44 +03:00
David Teller 8c639fef0c Bug 1647695 - Uniformizing naming conventions within fields of ChildProcInfoDictionary;r=tarek
Differential Revision: https://phabricator.services.mozilla.com/D83667
2020-08-03 12:49:59 +00:00
alwu 408ccb2310 Bug 1654045 - part3 : porting other attributes to media controller's webidl interface. r=chunmin
We have already had these functions on `MediaController` so we just need to expose them on the media controller's webidl interface, and they can be used in testing and the future plan of supporting media hub.

Differential Revision: https://phabricator.services.mozilla.com/D85230
2020-07-31 02:56:20 +00:00
alwu 4f35b1bd20 Bug 1654045 - part2 : add 'onactivated/ondeactivated' event handlers and 'isActive' on the media control webidl interface. r=chunmin
Add an event handler `onactivated/ondeactivated` and a readonly attribute `isActive` on the media control webidl interface, and they can be used in testing and the future plan of supporting media hub.

Differential Revision: https://phabricator.services.mozilla.com/D85229
2020-07-31 17:26:38 +00:00
Andreas Farre b13577d8e4 Bug 1613431 - Part 3: Handle synced setters return value. r=nika
Depends on D83646

Differential Revision: https://phabricator.services.mozilla.com/D83647
2020-07-31 13:37:13 +00:00
Andreas Farre 336fe46681 Bug 1613431 - Part 1: Have synced setters return nsresult. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83645
2020-07-31 13:36:45 +00:00
Kashav Madan 75b193e637 Bug 1655549 - Implement BrowsingContext::GetAllBrowsingContextsInSubtree, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D85311
2020-07-29 21:10:36 +00:00
Keefer Rourke b5254a1e31 Bug 1653985: Implement IOUtils::stat method r=barret,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D84408
2020-07-23 18:15:30 +00:00
Jonathan Watt b7e932192e Bug 1652270. Convert nsFrameLoader::Print to return a Promise. r=farre,remote-protocol-reviewers,marionette-reviewers,jgraham,whimboo,mixedpuppy
(Instead of requiring callers to pass an nsIWebProgressListener.)

Differential Revision: https://phabricator.services.mozilla.com/D83249
2020-07-22 23:17:45 +00:00
Narcis Beleuzu 687f235fbc Backed out changeset f95c19e45ab2 (bug 1652270) for reftest failures on test-text.html . CLOSED TREE 2020-07-22 20:36:53 +03:00
Jonathan Watt 8c0fb25348 Bug 1652270. Convert nsFrameLoader::Print to return a Promise. r=farre,remote-protocol-reviewers,marionette-reviewers,jgraham,whimboo,mixedpuppy
(Instead of requiring callers to pass an nsIWebProgressListener.)

Differential Revision: https://phabricator.services.mozilla.com/D83249
2020-07-22 15:54:01 +00:00
Rob Wu f75d9d861b Bug 1651844 - Ensure that readyPromise is resolved when startup() exits early r=rpl
This is necessary because otherwise callers of policy.readyPromise can
get stuck when an extension fails to start up.

Differential Revision: https://phabricator.services.mozilla.com/D83143
2020-07-21 17:01:36 +00:00
Keefer Rourke 3017836fc5 Bug 1653001: Implement IOUtils::makeDirectory method r=barret,Gijs
This patch introduces a makeDirectory method to the IOUtils interface, which
allows for creating directories on disk.

Differential Revision: https://phabricator.services.mozilla.com/D83996
2020-07-21 15:13:35 +00:00
Keefer Rourke 7498430cf9 Bug 1653003: Implement IOUtils::remove method r=barret,Gijs
This patch introduces a remove method to the IOUtils interface, which allows
for removing files and directories on disk. It is a simple wrapper around
the nsIFile::Remove method.

Differential Revision: https://phabricator.services.mozilla.com/D83663
2020-07-18 00:31:57 +00:00
Sebastian Streich f38f6f0fb1 Bug 1645204 - Fix WebRequest.jsm r=robwu,necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D80953
2020-07-16 14:58:03 +00:00
Tomislav Jovanovic 9e3001ac7e Bug 1587541 - Change ContentScript::MatchesWindow to operate on WindowGlobals directly r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D83652
2020-07-16 01:23:42 +00:00
alwu e398ca4d46 Bug 1621403 - part3 : add test. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D82817
2020-07-15 21:02:08 +00:00
alwu 1493d7798d Bug 1621403 - part2 : implement `seekto` action. r=chunmin,emilio
Implement `Seekto` action [1]. In addtion, as `seekto` can go with additional properties, we create a new structure `MediaControlAction` to wrap `MediaControlKey` and `SeekDetails`, which can be sent with `seekto`.

[1] https://w3c.github.io/mediasession/#dom-mediasessionaction-seekto

Differential Revision: https://phabricator.services.mozilla.com/D82816
2020-07-16 00:16:33 +00:00
Bogdan Tara ae2858d542 Backed out changeset 8dee8cb525a2 (bug 1653003) for test_ioutils.html failures CLOSED TREE 2020-07-16 00:35:21 +03:00
Keefer Rourke 84e3e308b9 Bug 1653003: Implement IOUtils::remove method r=barret,Gijs
This patch introduces a remove method to the IOUtils interface, which allows
for removing files and directories on disk. It is a simple wrapper around
the nsIFile::Remove method.

Differential Revision: https://phabricator.services.mozilla.com/D83663
2020-07-15 19:45:37 +00:00
Keefer Rourke 80670a1607 Bug 1651742: Remove support for relative paths in IOUtils r=barret,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D82982
2020-07-15 16:04:51 +00:00
Keefer Rourke b732cf15e1 Bug 1650898: Implement tmpPath and backupFile options for IOUtils::writeAtomic r=barret,Gijs
This patch refactors the existing IOUtils::writeAtomic method to add support for the `tmpPath` and `backupFile` options.

Differential Revision: https://phabricator.services.mozilla.com/D82601
2020-07-15 16:04:17 +00:00
Keefer Rourke 0dcdd65989 Bug 1650227: Implement IOUtils move method r=barret,Gijs
This patch introduces a move method to the IOUtils interface, which allows
for renaming/moving files or directories on disk. Source and destination
files may be specified either by an absolute path, or a relative path from
the current working directory.

This method has well-defined behaviour similar to the POSIX mv command
(except that this may create missing directories as necessary).
The behaviour is briefly summarized below:

1. If the source is a file that exists:

 a. If the destination is a file that does not exist, the source is
    renamed (and re-parented as a child of the destination parent
    directory). The destination parent directory will be created if
    necessary.

 b. If the destination is a file that does exist, the destination is
    replaced with the source (unless the noOverwrite option is true).


2. If the source is a directory that exists:

 a. If the destination is a directory, then the source directory is
    re-parented such that it becomes a child of the destination.

 b. If the destination does not exist, then the source is renamed,
    creating additional directories if needed.

 c. If the destination is a file, then an error occurs.


3. If the source does not exist, an error occurs.

Differential Revision: https://phabricator.services.mozilla.com/D82202
2020-07-15 16:03:52 +00:00
Csoregi Natalia cf4cf69408 Backed out 3 changesets (bug 1650898, bug 1651742, bug 1650227) for bustage on IOUtils.cpp. CLOSED TREE
Backed out changeset 4a1958574a2f (bug 1651742)
Backed out changeset 2809655ba642 (bug 1650898)
Backed out changeset d8930122993c (bug 1650227)
2020-07-14 23:03:48 +03:00
Keefer Rourke 235442cb08 Bug 1651742: Remove support for relative paths in IOUtils r=barret,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D82982
2020-07-14 14:07:27 +00:00
Keefer Rourke f9cbdd7632 Bug 1650898: Implement tmpPath and backupFile options for IOUtils::writeAtomic r=barret,Gijs
This patch refactors the existing IOUtils::writeAtomic method to add support for the `tmpPath` and `backupFile` options.

Differential Revision: https://phabricator.services.mozilla.com/D82601
2020-07-14 18:45:29 +00:00
Keefer Rourke d71c1326c1 Bug 1650227: Implement IOUtils move method r=barret,Gijs
This patch introduces a move method to the IOUtils interface, which allows
for renaming/moving files or directories on disk. Source and destination
files may be specified either by an absolute path, or a relative path from
the current working directory.

This method has well-defined behaviour similar to the POSIX mv command
(except that this may create missing directories as necessary).
The behaviour is briefly summarized below:

1. If the source is a file that exists:

 a. If the destination is a file that does not exist, the source is
    renamed (and re-parented as a child of the destination parent
    directory). The destination parent directory will be created if
    necessary.

 b. If the destination is a file that does exist, the destination is
    replaced with the source (unless the noOverwrite option is true).


2. If the source is a directory that exists:

 a. If the destination is a directory, then the source directory is
    re-parented such that it becomes a child of the destination.

 b. If the destination does not exist, then the source is renamed,
    creating additional directories if needed.

 c. If the destination is a file, then an error occurs.


3. If the source does not exist, an error occurs.

Differential Revision: https://phabricator.services.mozilla.com/D82202
2020-07-13 23:06:19 +00:00
alwu 8db4dcbd7c Bug 1582569 - part1 : implement 'skipad'. r=chunmin,webidl,peterv
Implement `skipad` action.

https://w3c.github.io/mediasession/#dom-mediasessionaction-skipad

Differential Revision: https://phabricator.services.mozilla.com/D82579
2020-07-10 18:59:31 +00:00
Nika Layzell 1f5959ef44 Bug 1650837 - Part 2: Add an includeParent JSProcessActor config option, r=kmag
This is similar to JSWindowActor's includeChrome option, and defaults to
'false'. If users want to also instantiate the actor in-process, they can set
this option to 'true'.

Differential Revision: https://phabricator.services.mozilla.com/D82449
2020-07-07 22:02:48 +00:00
Nika Layzell 22a65a237e Bug 1650163 - Part 1: Switch native remoteType values to nsCString, r=farre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82104
2020-07-08 20:15:59 +00:00
Mihai Alexandru Michis 1ba2a3f6f6 Backed out 3 changesets (bug 1650163) for causing bustages in nsContentSecurityManager.cpp
CLOSED TREE

Backed out changeset 51d7c644a1e6 (bug 1650163)
Backed out changeset 3d2b6908447a (bug 1650163)
Backed out changeset 79141707d47b (bug 1650163)
2020-07-08 21:18:44 +03:00
Nika Layzell c850a94434 Bug 1650163 - Part 1: Switch native remoteType values to nsCString, r=farre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82104
2020-07-08 14:54:48 +00:00
Kris Maglione bd94db4e9a Bug 1580764: Part 2 - Use BrowsingContext IDs rather than window IDs to compute frame IDs. r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D82464
2020-07-07 21:37:53 +00:00
Narcis Beleuzu 8359f16846 Backed out 7 changesets (bug 1650163, bug 1649477) for bustages on JSActor.cpp . CLOSED TREE
Backed out changeset 4a21afb65254 (bug 1650163)
Backed out changeset c41753a56f5a (bug 1650163)
Backed out changeset 5fb444c35764 (bug 1650163)
Backed out changeset 830aa93d2b0c (bug 1649477)
Backed out changeset eca6e9dce450 (bug 1649477)
Backed out changeset 5b217aa88289 (bug 1649477)
Backed out changeset 8959d02b840f (bug 1649477)
2020-07-08 04:09:27 +03:00
Nika Layzell df351180c3 Bug 1650163 - Part 1: Switch native remoteType values to nsCString, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D82104
2020-07-06 20:30:58 +00:00
Nika Layzell 410b57b163 Bug 1599579 - Part 4: Expose BrowsingContextGroup.id to JS, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D80257
2020-07-06 19:45:41 +00:00
Luca Greco 82aa5fed3a Bug 1609920 - part 1: Allow the WebExtension Framework to register a moz-extension service worker. r=dom-workers-and-storage-reviewers,asuth,mixedpuppy
- Adds the new about:config pref "extensions.backgroundServiceWorker.enabled" (currently defaults to false).
- Adds the background.service_worker property to the manifest JSON schema definition
- Locks background.service_worker manifest property behind the new preference
- Adds a new BackgroundWorker class to ext-backgroundPage.js (responsible for managing the background
  service worker for the extension, e.g. make sure that the expected worker script is registered
  as expected when the extension is starting up)
- Adds to the ServiceWorkerManager a new method to allow the WebExtension Framework to register the
  background service worker without an existing extension page
- Allows the "moz-extension" schema in the dom/serviceworkers and dom/cache internals

Depends on D63697

Differential Revision: https://phabricator.services.mozilla.com/D60244
2020-07-03 10:14:24 +00:00
Keefer Rourke 16fbac6f70 Bug 1642454: Implement IOUtils read and writeAtomic methods r=barret,smaug,Gijs
This patch introduces a minimal, asynchronous Web IDL interface for
reading/writing whole files in privileged chrome code (main-thread and web
workers). All I/O is performed on a background thread. Pending I/O blocks
Firefox shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D78134
2020-07-02 22:32:03 +00:00
Narcis Beleuzu 2f11bc8165 Backed out 4 changesets (bug 1642454) for failures on dom/system/tests/test_ioutils_worker.xhtml . CLOSED TREE
Backed out changeset 13553531fc62 (bug 1642454)
Backed out changeset 7896b4315920 (bug 1642454)
Backed out changeset 1e68090eed0b (bug 1642454)
Backed out changeset dfb201663480 (bug 1642454)
2020-07-03 01:16:36 +03:00
alwu 0c227d097b Bug 1643513 - part3 : add `onpositionstatechange` event handler on MediaController. r=chunmin,smaug
What this patch do are
- add `onpositionstatechange` event handler on MediaController
- `PositionStateEvent` would be sent to `positionstatechange` event handler

The advantage of doing so is
- to allow us to listen to the position change on the media controller interface (that can be used for testing and the future plan, the media hub)

Differential Revision: https://phabricator.services.mozilla.com/D80791
2020-07-02 19:41:22 +00:00
Keefer Rourke d6e77b7023 Bug 1642454: Implement IOUtils read and writeAtomic methods r=barret,smaug,Gijs
This patch introduces a minimal, asynchronous Web IDL interface for
reading/writing whole files in privileged chrome code (main-thread and web
workers). All I/O is performed on a background thread. Pending I/O blocks
Firefox shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D78134
2020-07-02 20:21:16 +00:00
Sebastian Hengst 255c22186f Backed out 4 changesets (bug 1609920) for leaks in browser-chrome. CLOSED TREE
Backed out changeset 1c8faab05606 (bug 1609920)
Backed out changeset eaa0bb2cf36b (bug 1609920)
Backed out changeset fd1e4db7cf78 (bug 1609920)
Backed out changeset 0e68db4ad6af (bug 1609920)
2020-07-01 17:10:13 +02:00
Alexandre Poirot b020241bb9 Bug 1644795 - Expose all nsIDOMProcessParent via ChromeUtils.getAllDOMProcesses(). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D81121
2020-07-01 09:09:44 +00:00
Luca Greco 665d0662d8 Bug 1609920 - part 1: Allow the WebExtension Framework to register a moz-extension service worker. r=dom-workers-and-storage-reviewers,asuth,mixedpuppy
- Adds the new about:config pref "extensions.backgroundServiceWorker.enabled" (currently defaults to false).
- Adds the background.service_worker property to the manifest JSON schema definition
- Locks background.service_worker manifest property behind the new preference
- Adds a new BackgroundWorker class to ext-backgroundPage.js (responsible for managing the background
  service worker for the extension, e.g. make sure that the expected worker script is registered
  as expected when the extension is starting up)
- Adds to the ServiceWorkerManager a new method to allow the WebExtension Framework to register the
  background service worker without an existing extension page
- Allows the "moz-extension" schema in the dom/serviceworkers and dom/cache internals

Depends on D63697

Differential Revision: https://phabricator.services.mozilla.com/D60244
2020-06-10 12:13:29 +00:00
Butkovits Atila 146ad267af Backed out 6 changesets (bug 1599579) for bc failures at test_chrome_ext_contentscript_data_uri.html.
Backed out changeset b767f26b10ed (bug 1599579)
Backed out changeset c5bc0ea42193 (bug 1599579)
Backed out changeset cfdd8d5973d4 (bug 1599579)
Backed out changeset 73f6c956fc30 (bug 1599579)
Backed out changeset 14698ab42ee4 (bug 1599579)
Backed out changeset b4bdd8759433 (bug 1599579)
2020-06-30 21:41:27 +03:00
Nika Layzell 6179f0edcf Bug 1599579 - Part 4: Expose BrowsingContextGroup.id to JS, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D80257
2020-06-30 15:55:45 +00:00