Commit Graph

55 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
51af54fe65 Bug 1774378 - Make select code harder to mess up. r=Gijs
Right now we rely on the menulist to be injected by hand in all the
relevant windows. Instead create it lazily, making the select code more
standalone.

The DevTools window was missing it, for example.

Differential Revision: https://phabricator.services.mozilla.com/D149620
2022-06-21 21:42:58 +00:00
Tomislav Jovanovic
a3f3fe6ce5 Bug 1646817 - Support DocumentChannel process switching in sidebars and popups r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D100396
2021-03-12 22:58:29 +00:00
Cosmin Sabou
619fca8701 Backed out changeset 6a75d5ea4301 (bug 1646817) for causing macOS nightly crashes. a=backout 2021-02-28 12:36:09 +02:00
Tomislav Jovanovic
4af3da178b Bug 1646817 - Part 1: Support DocumentChannel process switching in sidebars r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D100396
2021-02-26 22:56:17 +00:00
Anny Gakhokidze
465bfe416d Bug 1630908 - Part 1: Pass OriginAttributes to be included with remote type, r=nika,marionette-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D101073
2021-01-19 22:23:29 +00:00
Csoregi Natalia
b561be2a41 Backed out changeset 0b6e13411d3f (bug 1646817) for causing crashes on macOS. a=backout 2021-01-18 18:32:42 +02:00
Tomislav Jovanovic
6e70e958b1 Bug 1646817 - Support DocumentChannel process switching in sidebars and popups r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D100396
2021-01-14 20:32:24 +00:00
Mihai Alexandru Michis
5c1c52ad92 Backed out changeset 6e6788b1853e (bug 1646817) for causing bc failures in browser_ext_popup_api_injection.js
CLOSED TREE
2020-12-25 01:54:50 +02:00
Tomislav Jovanovic
15fec10580 Bug 1646817 - Support DocumentChannel process switching in sidebars and popups r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D100396
2020-12-24 20:16:12 +00:00
Tomislav Jovanovic
8503d10dd3 Bug 1680877 - Enable content scripts in extension popups and sidebars r=rpl
See comment in ExtensionPolicyService::CheckDocument for details.

Differential Revision: https://phabricator.services.mozilla.com/D99133
2020-12-12 15:59:18 +00:00
Csoregi Natalia
4c609e0f1a Backed out changeset 9d25024d5811 (bug 1680877) for causing failures on browser_ext_menus_events.js. CLOSED TREE 2020-12-09 18:13:47 +02:00
Tomislav Jovanovic
4787438a52 Bug 1680877 - Enable content scripts in extension popups and sidebars r=rpl
See comment in ExtensionPolicyService::CheckDocument for details.

Differential Revision: https://phabricator.services.mozilla.com/D99133
2020-12-09 10:10:56 +00:00
Brad Werth
99fa1b63ae Bug 1634556 Part 1: Make web extension sidebars listen to zoom enlarge/reduce events. r=mixedpuppy
These events are fired for all parent process documents by the code that
handles native mousewheel events. This change adds listeners to those events
and handles them similarly to how they are handled for browsers.

Differential Revision: https://phabricator.services.mozilla.com/D84767
2020-10-26 16:20:59 +00:00
Nika Layzell
e9a2f4801a Bug 1589517 - Part 4: Remove sameProcessAsFrameLoader, r=zombie,mconley,farre,smacleod
The functionality has been fully subsumed by the new
initialBrowsingContextGroupId attribute, so it is no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D85653
2020-08-06 17:01:13 +00:00
Nika Layzell
eb7c846c0d 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
Tim Nguyen
887622c475 Bug 1632092 - Rename all XUL namespace variables to XUL_NS. r=Gijs,marionette-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D71913
2020-04-24 09:23:52 +00:00
Emma Malysz
ce4da4686b Bug 1601094, rename the remaining .xul files in browser/ to .xhtml r=marionette-reviewers,whimboo,mossop
Differential Revision: https://phabricator.services.mozilla.com/D55751
2019-12-11 00:27:19 +00:00
Neil Deakin
eaa85b3b81 Bug 1590752, remove now unneeded content.js framescript, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D50585
2019-10-31 10:11:52 +00:00
Jonathan Kingston
32524b62e2 Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35504
2019-07-08 16:37:45 +00:00
Victor Porof
a3641f184a Bug 1561435 - Format browser/base/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36041
2019-07-05 09:48:57 +02:00
Julian Descottes
757e0dc38b Bug 1543710 - Remove contextmenu event handler from webext-panels.js r=rpl
No longer necessary after Bug 1505909. Depends on D33284

Differential Revision: https://phabricator.services.mozilla.com/D34627
2019-06-28 10:17:29 +00:00
Nika Layzell
5f20078058 Bug 1544811 - Use web processes on a per-site basis for fission-enabled windows, r=mconley
This patch introduces a new type of content process, which has a dynamic name.
This type of content process is labeled as `webIsolated=${SITE_ORIGIN}` and is
used within fission-enabled windows.

To enable this, additional information about the fission status of the target
window must be passed into E10SUtils. This was done by updating every call site
manually to pass an extra boolean. A better solution perhaps should be used in
the future.

With this patch enabled, we now perform process switches, but only when
navigating to HTTP URIs. If we navigate to a non-HTTP URI in an iframe with
fission enabled, it will not behave correctly. This must be done in a
follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D29570
2019-05-03 21:31:57 +00:00
Kris Maglione
856fa07b17 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750
2019-01-17 10:18:31 -08:00
Luca Greco
f29fa0947f Bug 1398734 - Support devtools.panels.elements sidebar.setPage API method. r=mixedpuppy
Depends on D5420

Differential Revision: https://phabricator.services.mozilla.com/D5421
2018-10-03 18:26:39 +00:00
Shane Caraveo
d6623e6be7 Bug 1488055 fix loading ext-browser-content script in sidebar when browser_style=false, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D5196
2018-09-12 18:52:52 +00:00
Cosmin Sabou
4ad8223a46 Merge mozilla-inbound to mozilla-central. a=merge 2018-08-15 03:51:45 +03:00
Brian Grinstead
c8b3483e82 Bug 1479538 - Rewrite non-test callers of document.createElementNS(XUL_NS, ...) to use document.createXULElement(...);r=paolo
Differential Revision: https://phabricator.services.mozilla.com/D3275
2018-08-14 16:22:44 +00:00
Kris Maglione
2250619ab1 Bug 1480244: Part 5 - Run most framescripts in shared scope. r=mconley
Creating non-shared scopes for frame scripts is fairly expensive. After these
changes it's even more expensive. However, many frame scripts have no use for
the shared scopes at all. Run-once scripts which execute in closures, for
instance, make no use of them. And after bug 1472491, neither do most of our
default frame scripts.

MozReview-Commit-ID: 9PK7bYdQ0yh
2018-08-10 13:58:18 -07:00
Shane Caraveo
a8067884f5 Bug 1403965 fix context menu position in extension sidebar, r=kmag
MozReview-Commit-ID: 37XgWflt2qG
2018-04-24 13:01:00 -05:00
Andreea Pavel
bb13111748 Backed out changeset e2573db9d14e (bug 1403965) for failing browser chrome at browser/components/extensions/test/browser/test-oop-extensions/browser_ext_sidebarAction_runtime.js on a CLOSED TREE 2018-04-24 02:13:38 +03:00
Shane Caraveo
0427883ade Bug 1403965 fix context menu position in extension sidebar, r=kmag
MozReview-Commit-ID: 37XgWflt2qG
2018-04-23 17:11:18 -05:00
Shane Caraveo
9fbe3d3d47 Bug 1414245 - set sameProcessAsFrameLoader on extension sidebar and options_ui browsers, r=aswan
MozReview-Commit-ID: 2KsOE6RNq4P
2018-04-04 11:57:00 -05:00
Tim Nguyen
d49de43825 Bug 1444760 - Combine loadURIWithFlags and loadURI methods. r=dao
MozReview-Commit-ID: 5dsyKwvjYht
2018-03-16 23:21:46 +00:00
Margareta Eliza Balazs
8ad3204b44 Backed out 2 changesets (bug 1444760) for ES lint failure in /builds/worker/checkouts/gecko/browser/base/content/browser.js on a CLOSED TREE
Backed out changeset 71f61091a716 (bug 1444760)
Backed out changeset 4956db1e9bdd (bug 1444760)
2018-03-25 15:29:54 +03:00
Tim Nguyen
76bd43b52d Bug 1444760 - Combine loadURIWithFlags and loadURI methods. r=dao
MozReview-Commit-ID: 5dsyKwvjYht
2018-03-16 23:21:46 +00:00
Shane Caraveo
44937af05c Bug 1443749 only reload sidebar when the url has changed r=kmag
Regression from bug 1398713.  Before that, we reloaded the entire webext-panel.xul if the
sidebar changed.  This verifies we don't reload unecessarily as well as discards
the browser to force a runtime disconnect for the extension if it does change.

MozReview-Commit-ID: LuYxmj9mSb7
2018-03-09 16:30:49 -06:00
Shane Caraveo
cc9b7fb4c5 Bug 1398713 pass triggeringPrincipal when using browser.loadURI, r=Gijs,kmag 2018-02-28 17:32:01 -06:00
Kris Maglione
0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian
483ba301cb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Shane Caraveo
40554d8930 Bug 1389495 support select in OOP sidebar, r=kmag
MozReview-Commit-ID: 3x4vzcSm2fE
2017-08-14 10:20:08 -07:00
Kris Maglione
950f793bd6 Bug 1375490: Part 2 - Support alerts in OOP extension sidebars. r=mixedpuppy
MozReview-Commit-ID: AbQ2uVcZzM4
2017-08-01 15:44:05 -07:00
Sebastian Hengst
97119ea261 Backed out changeset 52114c4bf95a (bug 1375490) 2017-08-02 13:11:21 +02:00
Kris Maglione
6a4626bb4d Bug 1375490: Part 2 - Support alerts in OOP extension sidebars. r=mixedpuppy
MozReview-Commit-ID: AbQ2uVcZzM4
2017-08-01 15:44:05 -07:00
Kris Maglione
db3ec327d2 Bug 1368189: Move more code out of ExtensionUtils.jsm. r=mixedpuppy
Also removes some dead code.

A lot of the code in ExtensionUtils.jsm is not needed in all processes, and a
lot of the rest isn't needed until extension code runs. Most of it winds up
being loaded into all processes way earlier than necessary.

MozReview-Commit-ID: CMRjCPOjRF2
2017-05-26 15:44:41 -07:00
Shane Caraveo
7a05f598a5 Bug 1342708 fix datalist failure in webext popups, r=kmag
MozReview-Commit-ID: FbTB9h3TTdq
2017-06-01 16:20:34 -07:00
Matthew Wein
d6fb199d99 Bug 1330369 - Part 2 - Add browser_style support to ext-sidebar.js r=kmag
MozReview-Commit-ID: AIGuVv98HGR
2017-05-25 19:46:59 -04:00
Shane Caraveo
8d79eea464 Bug 1353073 handle contextmenu in sidebar when remote=true, r=kmag
MozReview-Commit-ID: BSmPhaNYmYe
2017-04-15 10:30:44 -07:00