Commit Graph

2684 Commits

Author SHA1 Message Date
Michael Hughes
64fe1d816e Bug 1884785 - Expose the path to the os default application to privileged extensions r=Gijs,necko-reviewers
Added in some code to expose the path to the os default application. Tested via tests on Windows. Mac and Linux will use the nsMIMEInfoImpl which will supply the functionality for them and be tested with the auto-tests.

Differential Revision: https://phabricator.services.mozilla.com/D204306
2024-03-25 23:19:17 +00:00
Michael Hughes
e66ab7ac30 Bug 1884265 - Expose pretty ApplicationName from the registry to file handlers r=nrishel,nalexander,necko-reviewers,barret,valentin
Some code to exercise this in the browser console:

```
{
  const printNames = async (appList) => {
    let buffer = "Start:\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      buffer += app.executable.leafName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      let prettyName = await app.prettyNameAsync();
      buffer += prettyName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      buffer += app.executable.displayName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      if (AppConstants.platform == "win") {
      	let file = app.executable;
        if (file instanceof Ci.nsILocalFileWin) {
          try {
          	buffer += file.getVersionInfoField("FileDescription");
          } catch (e) {
          }
        }
      }
      buffer += "\n";
    }

    buffer += "\nEnd\n";

    console.log(buffer);
  };

  const lazy4 = {};

  XPCOMUtils.defineLazyServiceGetters(lazy4, {
    gMIMEService: ["@mozilla.org/mime;1", "nsIMIMEService"],
  });

  let mimeInfo4 = lazy4.gMIMEService.getFromTypeAndExtension("text/html", "html");

  if (mimeInfo4.hasDefaultHandler) {
    console.log(`HasDefaultHandler = true`);
    console.log(`Description = ${mimeInfo4.defaultDescription}`);
  } else {
    console.log(`HasDefaultHandler = false`);
  }

  let appList4 = mimeInfo4.possibleLocalHandlers || [];
  console.log("appList4 = ");
  console.log(JSON.stringify(appList4));

  printNames(appList4);
}
```

That produces output that can be seen in a pretty form here:
https://docs.google.com/spreadsheets/d/1OvtrZgMlPMJO4Wgu6wwAYvm89orj9HdS_tsDxYn7yrA/edit#gid=0

This does not fix-up things so that all calls to getName() on the LocalHandlerApp are switched to prettyNameAsync. That work is tracked here: https://bugzilla.mozilla.org/show_bug.cgi?id=1884267

Differential Revision: https://phabricator.services.mozilla.com/D203876
2024-03-25 23:19:17 +00:00
Ryan VanderMeulen
87a2b0ae6f Backed out changeset 102fa1186f2a (bug 1884265) for non-unified build bustage and test_getFromTypeAndExtension.js failures. 2024-03-18 21:55:00 -04:00
Michael Hughes
d4689a98d0 Bug 1884265 - Expose pretty ApplicationName from the registry to file handlers r=nalexander,necko-reviewers,barret,valentin
Some code to exercise this in the browser console:

```
{
  const printNames = async (appList) => {
    let buffer = "Start:\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      buffer += app.executable.leafName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      let prettyName = await app.prettyNameAsync();
      buffer += prettyName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      buffer += app.executable.displayName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      if (AppConstants.platform == "win") {
      	let file = app.executable;
        if (file instanceof Ci.nsILocalFileWin) {
          try {
          	buffer += file.getVersionInfoField("FileDescription");
          } catch (e) {
          }
        }
      }
      buffer += "\n";
    }

    buffer += "\nEnd\n";

    console.log(buffer);
  };

  const lazy4 = {};

  XPCOMUtils.defineLazyServiceGetters(lazy4, {
    gMIMEService: ["@mozilla.org/mime;1", "nsIMIMEService"],
  });

  let mimeInfo4 = lazy4.gMIMEService.getFromTypeAndExtension("text/html", "html");

  if (mimeInfo4.hasDefaultHandler) {
    console.log(`HasDefaultHandler = true`);
    console.log(`Description = ${mimeInfo4.defaultDescription}`);
  } else {
    console.log(`HasDefaultHandler = false`);
  }

  let appList4 = mimeInfo4.possibleLocalHandlers || [];
  console.log("appList4 = ");
  console.log(JSON.stringify(appList4));

  printNames(appList4);
}
```

That produces output that can be seen in a pretty form here:
https://docs.google.com/spreadsheets/d/1OvtrZgMlPMJO4Wgu6wwAYvm89orj9HdS_tsDxYn7yrA/edit#gid=0

This does not fix-up things so that all calls to getName() on the LocalHandlerApp are switched to prettyNameAsync. That work is tracked here: https://bugzilla.mozilla.org/show_bug.cgi?id=1884267

Differential Revision: https://phabricator.services.mozilla.com/D203876
2024-03-18 16:18:27 +00:00
Mark Banner
3d5bb40f49 Bug 1884623 - Update more jsm references in production code and docs in misc code. r=mossop,necko-reviewers,profiler-reviewers,julienw,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D204185
2024-03-14 17:42:28 +00:00
Sandor Molnar
09d9822ba8 Backed out 3 changesets (bug 1884623) for causing multiple failures CLOSED TREE
Backed out changeset 3a264233ce8e (bug 1884623)
Backed out changeset acdf8a83a49c (bug 1884623)
Backed out changeset de64ce832b8a (bug 1884623)
2024-03-14 17:03:37 +02:00
Mark Banner
fcaf27c6e1 Bug 1884623 - Update more jsm references in production code and docs in misc code. r=mossop,necko-reviewers,profiler-reviewers,julienw,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D204185
2024-03-14 12:18:01 +00:00
Cristian Tuns
cc0efecf5c Backed out 3 changesets (bug 1884785, bug 1884265) for causing build bustages in nsLocalHandlerApp.cpp CLOSED TREE
Backed out changeset 08cb16bededc (bug 1884265)
Backed out changeset dc60eabb35ec (bug 1884785)
Backed out changeset 2de1412ec7e3 (bug 1884265)
2024-03-13 13:43:40 -04:00
Otto Länd
ee6cc0bdef Bug 1884265, 1884785: apply code formatting via Lando
# ignore-this-changeset
2024-03-13 17:08:39 +00:00
Michael Hughes
444d0ac965 Bug 1884785 - Expose the path to the os default application to privileged extensions r=Gijs,necko-reviewers
Added in some code to expose the path to the os default application. Tested via tests on Windows. Mac and Linux will use the nsMIMEInfoImpl which will supply the functionality for them and be tested with the auto-tests.

Differential Revision: https://phabricator.services.mozilla.com/D204306
2024-03-13 16:24:50 +00:00
Michael Hughes
826b0f1e77 Bug 1884265 - Expose pretty ApplicationName from the registry to file handlers r=nalexander,necko-reviewers,barret,valentin
Some code to exercise this in the browser console:

```
{
  const printNames = async (appList) => {
    let buffer = "Start:\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      buffer += app.executable.leafName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      let prettyName = await app.prettyNameAsync();
      buffer += prettyName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      buffer += app.executable.displayName;
      buffer += "\n";
    }

    buffer += "\n";

    for (let index = 0; index < appList4.length; index++) {
      let app = appList4.queryElementAt(index, Ci.nsILocalHandlerApp);
      if (AppConstants.platform == "win") {
      	let file = app.executable;
        if (file instanceof Ci.nsILocalFileWin) {
          try {
          	buffer += file.getVersionInfoField("FileDescription");
          } catch (e) {
          }
        }
      }
      buffer += "\n";
    }

    buffer += "\nEnd\n";

    console.log(buffer);
  };

  const lazy4 = {};

  XPCOMUtils.defineLazyServiceGetters(lazy4, {
    gMIMEService: ["@mozilla.org/mime;1", "nsIMIMEService"],
  });

  let mimeInfo4 = lazy4.gMIMEService.getFromTypeAndExtension("text/html", "html");

  if (mimeInfo4.hasDefaultHandler) {
    console.log(`HasDefaultHandler = true`);
    console.log(`Description = ${mimeInfo4.defaultDescription}`);
  } else {
    console.log(`HasDefaultHandler = false`);
  }

  let appList4 = mimeInfo4.possibleLocalHandlers || [];
  console.log("appList4 = ");
  console.log(JSON.stringify(appList4));

  printNames(appList4);
}
```

That produces output that can be seen in a pretty form here:
https://docs.google.com/spreadsheets/d/1OvtrZgMlPMJO4Wgu6wwAYvm89orj9HdS_tsDxYn7yrA/edit#gid=0

This does not fix-up things so that all calls to getName() on the LocalHandlerApp are switched to prettyNameAsync. That work is tracked here: https://bugzilla.mozilla.org/show_bug.cgi?id=1884267

Differential Revision: https://phabricator.services.mozilla.com/D203876
2024-03-13 16:24:49 +00:00
Christoph Kerschbaumer
239cad0ecb Bug 1877195: Expand mixed-content download protection to all http downloads, r=freddyb,Gijs,anti-tracking-reviewers,pbz
Differential Revision: https://phabricator.services.mozilla.com/D200267
2024-03-04 15:18:23 +00:00
Cosmin Sabou
2dde24b573 Backed out changeset a89ec49d7645 (bug 1877195) for causing wpt failures on iframe_sandbox_window_open_download_allow_downloads. CLOSED TREE 2024-03-04 16:24:27 +02:00
Christoph Kerschbaumer
42efa58063 Bug 1877195: Expand mixed-content download protection to all http downloads, r=freddyb,Gijs,anti-tracking-reviewers,pbz
Differential Revision: https://phabricator.services.mozilla.com/D200267
2024-03-04 10:03:18 +00:00
Dave Townsend
20691196a3 Bug 1864896: Autofix unused function arguments (uriloader). r=mtigley
Differential Revision: https://phabricator.services.mozilla.com/D202998
2024-03-03 09:09:11 +00:00
Peter Van der Beken
2b747df80a Bug 1640839 - Add some helpers for enums to calculate the size and use it in EnumeratedArray. r=glandium,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201334
2024-03-02 07:50:19 +00:00
Peter Van der Beken
9c8d00b7fb Bug 1640839 - Move size template parameter for EnumeratedArray to the end. r=glandium,jgilbert,media-playback-reviewers,credential-management-reviewers,padenot,dimi
This will allow us to provide a default value for the size when some enum
helper traits are defined.

Differential Revision: https://phabricator.services.mozilla.com/D201333
2024-03-02 07:50:19 +00:00
Iulian Moraru
ac062aeb95 Backed out changeset 81bb704a27a1 (bug 1877195) for causing wpt failures on iframe_sandbox_navigation_download_allow_downloads.sub.tentative.html. CLOSED TREE 2024-03-01 18:46:45 +02:00
Natalia Csoregi
8c2521e9d5 Backed out 13 changesets (bug 1640839) for causing bustage on Element.cpp CLOSED TREE
Backed out changeset 179ceb82c9e5 (bug 1640839)
Backed out changeset 73f498a821f0 (bug 1640839)
Backed out changeset dc2d3d0e0365 (bug 1640839)
Backed out changeset ddc989ac0509 (bug 1640839)
Backed out changeset e595bb3feea8 (bug 1640839)
Backed out changeset c85aca04e27f (bug 1640839)
Backed out changeset 98e8e3a4047a (bug 1640839)
Backed out changeset 59ef180517db (bug 1640839)
Backed out changeset af2f5e293662 (bug 1640839)
Backed out changeset 89aa6d9dc598 (bug 1640839)
Backed out changeset 67b722a722f9 (bug 1640839)
Backed out changeset 24a9665c6ced (bug 1640839)
Backed out changeset d93f199385e9 (bug 1640839)
2024-03-01 18:23:08 +02:00
Peter Van der Beken
f295b0c979 Bug 1640839 - Add some helpers for enums to calculate the size and use it in EnumeratedArray. r=glandium,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201334
2024-03-01 14:31:09 +00:00
Peter Van der Beken
8d1c9ad39c Bug 1640839 - Move size template parameter for EnumeratedArray to the end. r=glandium,jgilbert,media-playback-reviewers,credential-management-reviewers,padenot,dimi
This will allow us to provide a default value for the size when some enum
helper traits are defined.

Differential Revision: https://phabricator.services.mozilla.com/D201333
2024-03-01 14:31:09 +00:00
Christoph Kerschbaumer
6222503141 Bug 1877195: Expand mixed-content download protection to all http downloads, r=freddyb,Gijs,anti-tracking-reviewers,pbz
Differential Revision: https://phabricator.services.mozilla.com/D200267
2024-03-01 13:04:39 +00:00
Gregory Pappas
1dfbfcfd07 Bug 1878401 - part 7 - Pass BrowsingContext to nsIFilePicker::Init in tests r=extension-reviewers,settings-reviewers,credential-management-reviewers,anti-tracking-reviewers,devtools-reviewers,sgalich,pbz,nchevobbe,zombie,migration-reviewers,mconley
Depends on D200551

Differential Revision: https://phabricator.services.mozilla.com/D200552
2024-02-28 21:29:39 +00:00
Sandor Molnar
3951121cc6 Backed out 8 changesets (bug 1878401, bug 1879041) for causing build bustages on widget/nsBaseFilePicker.cpp CLOSED TREE
Backed out changeset 2e2b8df3bdd6 (bug 1879041)
Backed out changeset 6d6952f9df2c (bug 1878401)
Backed out changeset 30b5bb590d3e (bug 1878401)
Backed out changeset 9a4b830334b9 (bug 1878401)
Backed out changeset 3c3d67f1fcb7 (bug 1878401)
Backed out changeset c83ba4026822 (bug 1878401)
Backed out changeset 6bcb670ce475 (bug 1878401)
Backed out changeset f263b196df96 (bug 1878401)
2024-02-28 17:56:48 +02:00
Gregory Pappas
8a677e7f39 Bug 1878401 - part 7 - Pass BrowsingContext to nsIFilePicker::Init in tests r=extension-reviewers,settings-reviewers,credential-management-reviewers,anti-tracking-reviewers,devtools-reviewers,sgalich,pbz,nchevobbe,zombie,migration-reviewers,mconley
Depends on D200551

Differential Revision: https://phabricator.services.mozilla.com/D200552
2024-02-28 15:07:46 +00:00
Gijs Kruitbosch
6168506717 Bug 1780071 - autofix violations of no-comparison-or-assignment-inside-ok in misc other folders r=webdriver-reviewers,necko-reviewers,sync-reviewers,profiler-reviewers,sgalich,whimboo,markh,kershaw,julienw
Differential Revision: https://phabricator.services.mozilla.com/D198978
2024-02-19 21:47:41 +00:00
John Bieling
df44528633 Bug 1875460 - Fallback to standalone application chooser window, if window.gBrowser.getTabDialogBox() is not available. r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D199089
2024-02-07 13:01:10 +00:00
Erik Nordin
2a01092c90 Bug 1875090 - Rename BrowserTestUtils.is_visible() to isVisible() r=Gijs,settings-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,translations-reviewers,sgalich,bytesized,sfoster
Renames all instances of the snake_case identifier to
camelCase to match more closely to idiomatic JavaScript
and to existing conventions throughout the code base.

Differential Revision: https://phabricator.services.mozilla.com/D198826
2024-01-19 02:15:33 +00:00
Mark Banner
7a4d095f30 Bug 1864821 - Replace PromiseUtils.defer() with Promise.withResolvers() in browser window scopes. r=Gijs,extension-reviewers,application-update-reviewers,rpl,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D197486
2024-01-05 09:22:33 +00:00
edgul
56971a7842 Bug 1603699 - Enable default URI pref. r=valentin,necko-reviewers,extension-reviewers,robwu
Depends on D195672

Differential Revision: https://phabricator.services.mozilla.com/D191240
2023-12-06 19:33:56 +00:00
Joel Maher
29e80ac522 Bug 1859901 - Batch 18 - migrate rest of xpcshell.ini -> toml. r=aryx,extension-reviewers,application-update-reviewers,credential-management-reviewers,places-reviewers,profiler-reviewers,win-reviewers,robwu,julienw,nalexander,Standard8,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D194891
2023-11-30 16:14:52 +00:00
Sarah Clements
4a5c1cc860 Bug 1828334 r=Gijs,dveditz,extension-reviewers,fluent-reviewers,flod,robwu,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185671
2023-11-06 17:56:29 +00:00
Mark Banner
a033642737 Bug 1858148 - Remove Cu.importGlobalProperties from sjs files as it is no longer needed. r=mossop,webdriver-reviewers,necko-reviewers,search-reviewers,devtools-reviewers,anti-tracking-reviewers,sessionstore-reviewers,pbz,dao,daleharvey,valentin
Differential Revision: https://phabricator.services.mozilla.com/D190759
2023-11-04 09:29:27 +00:00
Cosmin Sabou
ef754fc8d1 Backed out changeset d7ba64895091 (bug 1828334) for causing talos damp hangs. 2023-11-03 03:10:29 +02:00
Sarah Clements
aa3f502d2a Bug 1828334 r=Gijs,dveditz,extension-reviewers,fluent-reviewers,flod,robwu
Differential Revision: https://phabricator.services.mozilla.com/D185671
2023-11-02 12:08:39 +00:00
Marc Seibert
04d7ba785a Bug 1853418 - Prepare remaining tests.r=dao
Differential Revision: https://phabricator.services.mozilla.com/D190557
2023-10-18 10:15:34 +00:00
Sylvestre Ledru
d0f6c7fc66 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan
6a90f5eded Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru
cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Cosmin Sabou
5d7a0c46bf Bug 1817727 - Disable test_filename_sanitize.js on mac because of permafailures. r=aryx DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D190974
2023-10-13 17:53:25 +00:00
Tom Marble
0cb91fe33e Bug 1855300 - convert .ini manifests to .toml: batch 11 remaining **/mochitest.ini r=jmaher,geckoview-reviewers,extension-reviewers,valentin,credential-management-reviewers,cookie-reviewers,sgalich,m_kato,robwu
Differential Revision: https://phabricator.services.mozilla.com/D190515
2023-10-13 02:32:24 +00:00
stransky
18bd527479 Bug 1532281 [Linux] Don't build with dbus-glib r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D187208
2023-10-12 12:59:08 +00:00
Edgar Chen
3b1a417bd3 Bug 1854747 - Stop exposing the image data as file to clipboard; r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D189242
2023-10-06 13:17:52 +00:00
Cristina Horotan
64d32032ea Backed out changeset 1e91f547f0c7 (bug 1854747) for causing bc failures at browser_save_filenames.js on a CLOSED TREE 2023-10-05 22:22:27 +03:00
Edgar Chen
3be03351ff Bug 1854747 - Stop exposing the image data as file to clipboard; r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D189242
2023-10-05 15:26:35 +00:00
Joel Maher
138d83af91 Bug 1853245 - Migrate .ini to .toml browser-chrome (batch 7.99). r=aryx,webdriver-reviewers,necko-reviewers,pip-reviewers,places-reviewers,mak,mconley,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D189883
2023-10-05 11:58:59 +00:00
Norisz Fay
8d9aaf93b0 Backed out 2 changesets (bug 1853245) for causing python failure CLOSED TREE
Backed out changeset d09e9295477f (bug 1853245)
Backed out changeset 54a1341a95d6 (bug 1853245)
2023-10-04 23:31:21 +03:00
Joel Maher
da6575a322 Bug 1853245 - Migrate .ini to .toml browser-chrome (batch 7.99). r=aryx,webdriver-reviewers,necko-reviewers,pip-reviewers,places-reviewers,mak,mconley,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D189883
2023-10-04 15:59:49 +00:00
Andrew Osmond
31921ad4d8 Bug 1641389 - Remove image.webp.enabled pref, always on by default. r=necko-reviewers,tnikkel,valentin
Differential Revision: https://phabricator.services.mozilla.com/D188276
2023-09-15 19:36:34 +00:00
Cosmin Sabou
00e0ca2c08 Backed out changeset 106a8fb08a87 (bug 1641389) for causing bc failures on browser_persist_image_accept.js. 2023-09-15 17:42:46 +03:00