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

211 Коммитов

Автор SHA1 Сообщение Дата
Olli Pettay 93acdfad59 Bug 1777574, automate CC zone handling, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00
Olivia Hall fd773b706c Bug 1765835 - Adjustments to Location Provider r=geckoview-reviewers,owlish,m_kato,smaug
In Geolocation.cpp, the call to start the geolocation device always
had HighAccuracyRequested() set to false because no callbacks were
listening. Changed to set the callbacks first, before listening.

In Android, this patch stops the use of checking for last known location
on high accuracy location requests, adjusts comparing locations,
and also streamlines the criteria for picking the best location provider.

Differential Revision: https://phabricator.services.mozilla.com/D153226
2022-08-31 18:50:16 +00:00
serge-sans-paille 2f3f06ad63 Bug 1772747 - Cleanup dom/geolocation, dom/system, dom/battery and dom/canvas includes r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D148351
2022-06-06 08:13:34 +00:00
Kagami Sascha Rosylight 6abe98f452 Bug 1769290 - Part 8: Apply mozilla-js-handle-rooted-typedef against dom/canvas,crypto,fetch,gamepad,geolocation,indexedDB,ipc r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148281
2022-06-05 20:54:59 +00:00
serge-sans-paille d1fbd5e212 Bug 1771948 - Cleanup dom/canvas dom/geolocation and some dom/media includes r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D147769
2022-06-05 09:23:00 +00:00
Maciej S. Szmigiero 41cb3fd7d8 Bug 1063572 - Geoclue2 geolocation provider. r=emilio
Add a Geoclue (version 2) geolocation provider.

This way Firefox can make use of multiple location sources present in the
system, from GNSS provided by a cellular modem or the current network to
location based on visible WiFi networks and 3G tower data, all while
sharing them with other applications.

This is a pure D-Bus-based implementation using a proper state machine, it
does not require any additional dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D145838
2022-05-16 08:24:09 +00:00
Butkovits Atila f3f0323cc9 Backed out changeset 39b20dac431b (bug 1063572) for causing bustages at GeoclueLocationProvider. CLOSED TREE 2022-05-15 15:28:12 +03:00
Maciej S. Szmigiero bff064393f Bug 1063572 - Geoclue2 geolocation provider. r=emilio
Add a Geoclue (version 2) geolocation provider.

This way Firefox can make use of multiple location sources present in the
system, from GNSS provided by a cellular modem or the current network to
location based on visible WiFi networks and 3G tower data, all while
sharing them with other applications.

This is a pure D-Bus-based implementation using a proper state machine, it
does not require any additional dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D145838
2022-05-15 12:09:14 +00:00
Kagami Sascha Rosylight b4d5c4d3b3 Bug 1768189 - Part 12: Apply modernize-concat-nested-namespaces to dom/gamepad/windows/WindowsGamepad.cpp ... r=andi
Depends on D145745

Differential Revision: https://phabricator.services.mozilla.com/D145746
2022-05-09 20:41:07 +00:00
Jan Horak 705f8983d6 Bug 1759840 Add support for location portal; r=emilio
The Firefox in flatpak has no access to the wireless networks to determine
accurate geolocation. We have to use the location portal instead which
provides the current location based on the nearby wireless accesspoints
or other methods.

Differential Revision: https://phabricator.services.mozilla.com/D142329
2022-04-19 11:42:38 +00:00
Molnar Sandor 509c3805f9 Backed out changeset 1529955a0df7 (bug 1759840) for causing build bustage in geolocation/Geolocation CLOSED TREE 2022-04-19 12:41:47 +03:00
Jan Horak f674f55333 Bug 1759840 Add support for location portal; r=emilio
The Firefox in flatpak has no access to the wireless networks to determine
accurate geolocation. We have to use the location portal instead which
provides the current location based on the nearby wireless accesspoints
or other methods.

Differential Revision: https://phabricator.services.mozilla.com/D142329
2022-04-19 09:02:55 +00:00
Emilio Cobos Álvarez 48c147fe43 Bug 1762625 - Remove unused principal argument from nsGeolocationService. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D142710
2022-04-01 19:14:53 +00:00
Nika Layzell 05dc5e0d76 Bug 1754037 - Part 3c: Automatically update all ParamTraits implementations, r=ipc-reviewers,media-playback-reviewers,bryce,mccr8
Automatically generated rewrites of all ParamTraits and IPDLParamTraits
implementations in-tree to use IPC::Message{Reader,Writer}.

Differential Revision: https://phabricator.services.mozilla.com/D140004
2022-03-04 15:39:41 +00:00
Marcos Cáceres a916f856db Bug 1735097 - Geolocation: use EpochTimeStamp instead of DOMTimeStamp r=saschanaz,peterv
Just a refactor, based on: https://github.com/w3c/geolocation-api/pull/104

Differential Revision: https://phabricator.services.mozilla.com/D128047
2021-11-17 04:01:02 +00:00
Kagami Sascha Rosylight d71395370d Bug 1723050 - Part 13: Replace typedef by using in dom/geolocation/ r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D121311
2021-08-09 13:37:27 +00:00
Marcos Cáceres fc57eb2e71 Bug 1715482 - Geolocation should gracefully handle Documents that are not fully active r=saschanaz
Spec change https://github.com/w3c/geolocation-api/pull/97

Differential Revision: https://phabricator.services.mozilla.com/D117273
2021-08-03 00:16:45 +00:00
Marcos Cáceres f336e71f96 Bug 1722820 - watchPosition() should return 0 on error to align with other browsers r=saschanaz,annevk
Refactor

Differential Revision: https://phabricator.services.mozilla.com/D121152
2021-07-30 01:48:12 +00:00
Marcos Cáceres 131b82f896 Bug 1653549 - don't sent a location if document is hidden r=edgar
When the document is hidden from view, silently drop position updates on the floor. This aligns, more or less, with Chrome and Safari.

The situation with "not fully active" is a bit more quirky, because non-fully active documents are generally hidden (e.g., `remove()`ing and iframe).

Regardless, I think this gives us the desired behavior and covers the main privacy case: background tabs should not receive position updates.

Differential Revision: https://phabricator.services.mozilla.com/D109279
2021-07-19 01:20:55 +00:00
Sandor Molnar e7e161833c Backed out changeset a6fc75e24e36 (bug 1653549) for causing mochitest failures in test_hidden. DONTBUILD CLOSED TREE 2021-07-16 05:06:55 +03:00
Marcos Cáceres 47b8a76198 Bug 1653549 - don't sent a location if document is hidden r=edgar
When the document is hidden from view, silently drop position updates on the floor. This aligns, more or less, with Chrome and Safari.

The situation with "not fully active" is a bit more quirky, because non-fully active documents are generally hidden (e.g., `remove()`ing and iframe).

Regardless, I think this gives us the desired behavior and covers the main privacy case: background tabs should not receive position updates.

Differential Revision: https://phabricator.services.mozilla.com/D109279
2021-07-16 01:28:32 +00:00
Christoph Kerschbaumer 8c7ebbbc65 Bug 1681504: Remove unused argument aPrincipal from AddGeolocationListener() in Pcontent.ipdl r=nika
Differential Revision: https://phabricator.services.mozilla.com/D99217
2020-12-10 09:09:19 +00:00
Sylvestre Ledru 0129dd3f83 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D96608
2020-11-16 22:09:25 +00:00
Emilio Cobos Álvarez ab402ee088 Bug 1676932 - Remove nsIContentPermissionRequester. r=nika
It's an empty, useless interface after the previous patches. Also remove
a bunch of expired geolocation probes which were null-checking the requester
object for some reason.

Depends on D96882

Differential Revision: https://phabricator.services.mozilla.com/D96883
2020-11-12 20:23:52 +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
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
Dale Harvey 19745e4e98 Bug 1653602 - Add a geolocation monitor r=baku
Differential Revision: https://phabricator.services.mozilla.com/D85938
2020-08-05 12:54:14 +00:00
Emilio Cobos Álvarez ff61891772 Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.

Differential Revision: https://phabricator.services.mozilla.com/D83674
2020-07-23 14:51:46 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Kris Maglione c31aa68fb4 Bug 1535617: Part 2 - Clear weak references for most cycle collected objects on unlink. r=mccr8
This covers most cycle collected objects which support weak references, but
not the ones which inherit from a cycle collected class and don't do any cycle
collection on their own.

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

--HG--
extra : moz-landing-system : lando
2020-02-25 19:44:39 +00:00
Simon Giesecke 84e20c9c57 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/geolocation. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63169

--HG--
extra : moz-landing-system : lando
2020-02-20 15:50:42 +00:00
Sylvestre Ledru cc2040bf21 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:48:34 +00:00
Dorel Luca 506e65bcab Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru 6689a37527 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:16:39 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Thomas Nguyen fd744cea01 Bug 1483631 - Restrict nested permission requests in ContentPermissionPrompt with permission delegate r=baku,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D47416

--HG--
extra : moz-landing-system : lando
2019-12-04 15:39:03 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Gurzau Raul 4f21dcd081 Backed out 4 changesets (bug 1483631) for failing at browser_temporary_permissions.js on a CLOSED TREE.
Backed out changeset f5bb5f6a148f (bug 1483631)
Backed out changeset c5e562c1d590 (bug 1483631)
Backed out changeset 7ef09193a7ef (bug 1483631)
Backed out changeset a909dcbbea2b (bug 1483631)
2019-12-03 21:57:55 +02:00
Thomas Nguyen d48ace2c5f Bug 1483631 - Restrict nested permission requests in ContentPermissionPrompt with permission delegate r=baku,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D47416

--HG--
extra : moz-landing-system : lando
2019-12-03 16:25:51 +00:00
Sid Vishnoi bd713fe4ee Bug 1594306 - Rename nsGeo* files to match the WebIDL interfaces r=marcosc
Rename nsGeolocation to Geolocation.
Split nsGeoPostion to GeolocationPosition and GeolocationCoordinates.
Fix some include guards and comments referencing outdated interfaces.

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

--HG--
rename : dom/geolocation/nsGeolocation.cpp => dom/geolocation/Geolocation.cpp
rename : dom/geolocation/nsGeolocation.h => dom/geolocation/Geolocation.h
rename : dom/geolocation/nsGeoPosition.cpp => dom/geolocation/GeolocationPosition.cpp
rename : dom/geolocation/nsGeoPosition.h => dom/geolocation/GeolocationPosition.h
extra : moz-landing-system : lando
2019-11-14 04:18:04 +00:00
Sid Vishnoi 6023989158 Bug 1575144 - Update Geolocation implementation to match latest spec r=baku,marcosc
The Geolocation API specification renamed the following interfaces and removed the [NoInterfaceObject] annotation so that these types are now exposed to script:
* Coordinates -> GeolocationCoordinates
* Position -> GeolocationPosition
* PositionError -> GeolocationPositionError

This is done in response to an effort to remove the [NoInterfaceObject]
annotation from WebIDL.

Additionally, the following interfaces are now only exposed in Secure Contexts:
* GeolocationCoordinates
* GeolocationPosition

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

--HG--
rename : dom/geolocation/PositionError.cpp => dom/geolocation/GeolocationPositionError.cpp
rename : dom/geolocation/PositionError.h => dom/geolocation/GeolocationPositionError.h
rename : dom/webidl/Coordinates.webidl => dom/webidl/GeolocationCoordinates.webidl
rename : dom/webidl/Position.webidl => dom/webidl/GeolocationPosition.webidl
rename : dom/webidl/PositionError.webidl => dom/webidl/GeolocationPositionError.webidl
extra : moz-landing-system : lando
2019-11-06 12:35:42 +00:00
Sebastian Streich e73c676976 Bug 1585297- Use Principal->SchemeIs in nsGeolocation.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D47750

--HG--
extra : moz-landing-system : lando
2019-10-01 12:54:56 +00:00
Brindusan Cristian 59aed5845a Backed out changeset 493061169650 (bug 1529591) for build bustages on nsGeolocation.cpp. CLOSED TREE 2019-09-09 17:35:39 +03:00
Garvan Keeley 6036e744d1 Bug 1529591 - Check Mac system geo permission prior to showing request permission dialog. Differential Revision: https://phabricator.services.mozilla.com/D44881 r=jdm
Differential Revision: https://phabricator.services.mozilla.com/D45052

--HG--
extra : moz-landing-system : lando
2019-09-06 22:35:59 +00:00
Mike Hommey 66d7fe943e Bug 1575420 - Replace MOZ_WIDGET_TOOLKIT value of "gtk3" with "gtk". r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D42765

--HG--
extra : moz-landing-system : lando
2019-08-21 12:25:42 +00:00
Cosmin Sabou ce32d49397 Backed out changeset 165672f8816b (bug 1529591) for geolocation related test failures. 2019-08-20 03:43:02 +03:00