Commit graph

137 commits

Author SHA1 Message Date
Kris Maglione
f5b580e5e9 Bug 1358415: Don't trigger reflow just to compute tab geometry. r=aswan
MozReview-Commit-ID: DnFSbDfOskT

--HG--
extra : rebase_source : e6829657b250fa8ec893b3e73b7d9956dfe34424
extra : amend_source : f20cfab374b29b7d3475579a0fe5e11ab2e6dcb4
2017-04-21 13:22:34 -07:00
Bob Silverberg
c608331f52 Bug 1342207 - chrome.tabs.onActivated does not fire for new windows, r=kmag
MozReview-Commit-ID: D9Nwd9lc57x

--HG--
extra : rebase_source : 65ff7814eaddd00acaf0ce88bd96309448a6d003
2017-04-04 09:43:50 -04:00
Kris Maglione
b13ea15e1c Bug 1317697: Remove things from ExtensionUtils that don't belong there. r=mixedpuppy
MozReview-Commit-ID: CTX0TckLqoV

--HG--
extra : rebase_source : ebea9b6f0f17a29d331851a08e025cbd04f4d02b
extra : absorb_source : 70b120f39e9307c4b2ef66d8e776e8b832b4aab8
2017-04-07 13:39:06 -07:00
Florian Queze
37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst
a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze
95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Andy McKay
a51c96851d bug 1323311 make tabs.move on multiple tabs more reliable r=kmag
MozReview-Commit-ID: 9o4huF1f60g

--HG--
extra : rebase_source : 392718783a20d59860cf8315b1687985799f076e
2017-04-10 11:18:04 -07:00
Iris Hsiao
adc828742f Backed out changeset efb859759339 (bug 1323311) for eslint failure 2017-04-10 11:12:20 +08:00
Andy McKay
0cfe55b71e bug 1323311 make tabs.move on multiple tabs more reliable r=kmag
MozReview-Commit-ID: 9o4huF1f60g

--HG--
extra : rebase_source : 53e7b0830f7ee3ce7b99bea39d2ae7e2967596fb
2017-04-07 16:52:00 -07:00
Kris Maglione
e6d84db845 Bug 1350522: Part 4 - Convert browser APIs to lazy loading. r=aswan
MozReview-Commit-ID: BQoWF9nHOuF

--HG--
rename : browser/components/extensions/ext-desktop-runtime.js => browser/components/extensions/ext-browser.js
extra : source : 7fd4ade8811856e835506310a57725dbd355c786
extra : histedit_source : c1775902971f858bfaa386977ca8d579c0ce3c61%2C489e3ed33d4c1bb47c3afbe30849b42e83771f48
2017-04-02 11:59:55 -07:00
Tushar Saini (:shatur)
ab529e5e79 Bug 1305528 - Remove ignoreEvent from API events for which it is inappropriate. r=bsilverberg,mixedpuppy
MozReview-Commit-ID: Cado1fxLYxr

--HG--
extra : rebase_source : 263d0ef1bc2f38866571d2bb6d555b8dcc9dca38
2017-03-02 02:01:44 +05:30
Carsten "Tomcat" Book
092e5dc5f1 merge mozilla-inbound to mozilla-central a=merge 2017-02-07 14:08:46 +01:00
Tomislav Jovanovic
739d46249f Bug 1295072 - Focus urlbar after opening an empty new tab r=kmag
MozReview-Commit-ID: 3dzCzHTxQrh

--HG--
extra : rebase_source : 35fd5d1267c73bfc74fe31cf2c82ca71c8f22ada
2017-02-04 20:48:38 +01:00
Kris Maglione
28b57587cb Bug 1336308: Part 4 - Rename tab variables that refer to native tabs to avoid confusion. r=aswan
MozReview-Commit-ID: 5An7K1crYRS

--HG--
extra : rebase_source : b052d46fe2883850c95b2116534ee098f0d4efa2
2017-02-03 12:57:43 -08:00
Kris Maglione
1eb1be7a98 Bug 1336308: Part 2 - Add a TabBase.sendMessage and TabBase.capture helper methods. r=aswan
MozReview-Commit-ID: EP8uxCkztvi

--HG--
extra : rebase_source : 03d6f3ce6e58172591ef82604b7090528964ebb6
2017-02-03 13:00:39 -08:00
Kris Maglione
f9ec213ea7 Bug 1260548: Part 5 - Factor out <browser> data logic into shared modules. r=aswan
MozReview-Commit-ID: GHPympWA7U

--HG--
extra : rebase_source : 50cb851feb302b051431a77a9d66436757d73b0d
2017-01-30 20:11:14 -08:00
Kris Maglione
a5b26306c7 Bug 1260548: Part 4 - Factor out tab status listener logic into shared module. r=aswan
MozReview-Commit-ID: Ff9gLKdGQHX

--HG--
extra : rebase_source : 88bc49ef0e0f4b75d4cc1c76a157ec19df0c6491
2017-01-28 20:00:24 -08:00
Kris Maglione
8fe4abee51 Bug 1260548: Part 2 - Factor out the excuteScript/insertCSS logic. r=aswan
MozReview-Commit-ID: 8FxlX7MKZsN

--HG--
extra : rebase_source : c9dcb23aa96820779bc74a69c83ff50d1491836f
2017-01-30 18:51:29 -08:00
Kris Maglione
3fe8cbd2c9 Bug 1260548: Part 1 - Factor out the common functionality of the tabs API. r=aswan
MozReview-Commit-ID: AS7asn6nXzr

--HG--
extra : rebase_source : f81a28a979b6d1a76534343bed2029456cc6a2c7
2017-01-30 22:44:16 -08:00
Andrew Swan
322ee1283f Bug 1203330 Part 2 Convert EventManager uses to SingletonEventManager r=kmag
MozReview-Commit-ID: A12TPwAYzTS

--HG--
extra : rebase_source : 10526ee923dc1eed24bac3c9b9c80c54b8e174e9
2017-01-26 11:27:03 -08:00
Phil Ringnalda
9447dfdbd4 Backed out 3 changesets (bug 1203330) for failures in test_delay_update_webextension.js
CLOSED TREE

Backed out changeset 2d42350d209a (bug 1203330)
Backed out changeset 3a12c51c3eca (bug 1203330)
Backed out changeset 31fac390e15d (bug 1203330)
2017-01-26 19:13:11 -08:00
Andrew Swan
2dde6b8e9b Bug 1203330 Part 2 Convert EventManager uses to SingletonEventManager r=kmag
MozReview-Commit-ID: A12TPwAYzTS

--HG--
extra : rebase_source : 3e034fba247132c3b7a92ce8f4656136c2313a20
2017-01-26 11:27:03 -08:00
Florian Quèze
0e0865f4fc Bug 1331599 - script-generated patch to replace removeEventListener calls with the once option when possible, r=jaws. 2017-01-25 07:01:52 +01:00
Phil Ringnalda
a17e96d752 Backed out changeset 70253d6678af (bug 1295072) for failures in browser_ext_tabs_create.js 2017-02-05 13:23:21 -08:00
Tomislav Jovanovic
82076a7ff1 Bug 1295072 - Focus urlbar after opening an empty new tab r=kmag
MozReview-Commit-ID: 3dzCzHTxQrh

--HG--
extra : rebase_source : 0098f06f83c77c03bb2f9eeb4031296f2b22cedb
2017-02-04 20:48:38 +01:00
Rob Wu
1fc7ef5070 Bug 1325830 - initialize tabListener if needed r=kmag
To verify, run the test in isolation:
mach mochitest browser/components/extensions/test/browser/browser_ext_tabs_executeScript_no_create.js

Without the fix, the test fails in e10s; with the fix, the test passes.

MozReview-Commit-ID: Imf0Ue7ORHd

--HG--
extra : rebase_source : a34ba67cf05f56dc360d46a6e30f0b0083a5a8a4
2016-12-26 12:30:50 +01:00
Florian Quèze
028a82f682 Bug 1329182 - remove trailing newURI null parameters in browser/, r=jaws. 2017-01-09 20:27:25 +01:00
Tomislav Jovanovic
19ab5e2771 Bug 1320412 - Emit tabs.onUpdated event for title changes r=kmag
MozReview-Commit-ID: I0d5GJ8Rsev

--HG--
extra : rebase_source : b5cbe37fdddd048cb93504e4be3a272e5cbf1f53
2017-01-05 00:19:38 +01:00
Tom Schuster
3c8c39df45 Bug 1310026 - webext: Add cssOrigin option to insertCSS/removeCSS. r=kmag 2017-01-06 16:07:59 +01:00
Kris Maglione
51f0eeae2f Bug 1322869: Part 1 - Apply window filters per-window rather than per-tab. r=bsilverberg
MozReview-Commit-ID: AAlyBJowMOm

--HG--
extra : rebase_source : 1dd37f5d13f9128dd4310397f928b3ddad6aab2b
2016-12-19 12:34:09 -08:00
Kris Maglione
a9b0112912 Bug 1317101 - Part 4: Deduplicate the handling of context tab and window IDs, and handle <browser> nesting in tabs. r=aswan
This could still use a fair amount of additional cleanup.

MozReview-Commit-ID: BteBFMlZCsy

--HG--
extra : rebase_source : cc0dc4854167c49593a4f4046c3d6527afe1eddf
extra : source : b0521588011d866ee6b2019ee71654768b9e7677
2016-11-15 15:13:50 -08:00
Wes Kocher
4e5f6472fd Backed out 15 changesets (bug 1317101) for e10s jsreftest failures a=backout CLOSED TREE
Backed out changeset 17757ba4c0e8 (bug 1317101)
Backed out changeset 61f8a4084bbd (bug 1317101)
Backed out changeset a8cdc81cdcce (bug 1317101)
Backed out changeset e06d269a5d4f (bug 1317101)
Backed out changeset 1e1bfb578dcd (bug 1317101)
Backed out changeset 0f8144296a9d (bug 1317101)
Backed out changeset b7892d3fb0ca (bug 1317101)
Backed out changeset 039d63d5fef7 (bug 1317101)
Backed out changeset ef7e061b37bf (bug 1317101)
Backed out changeset af7b81d7a5cc (bug 1317101)
Backed out changeset 225ad2535585 (bug 1317101)
Backed out changeset b0521588011d (bug 1317101)
Backed out changeset 07321664430a (bug 1317101)
Backed out changeset 47d283897283 (bug 1317101)
Backed out changeset ffc63be3557c (bug 1317101)
2016-11-16 16:44:30 -08:00
Kris Maglione
191000683d Bug 1317101 - Part 4: Deduplicate the handling of context tab and window IDs, and handle <browser> nesting in tabs. r=aswan
This could still use a fair amount of additional cleanup.

MozReview-Commit-ID: BteBFMlZCsy

--HG--
extra : rebase_source : 8b37748c25cc5c871ebac3eaab34ae6780175f37
2016-11-15 15:13:50 -08:00
Shane Caraveo
d981ec07ec Bug 1311576 fix webrequest filter for tabId and windowId, r=kmag
MozReview-Commit-ID: FzW53LXktWz

--HG--
extra : rebase_source : e19987aa7f2bfa711f07abebaf37b75464508177
2016-11-15 16:34:33 -08:00
Tomislav Jovanovic
2c891cc35b bug 1310331 - implement matchAboutBlank for tabs.executeScript r=kmag
MozReview-Commit-ID: ApuakyrctzD

--HG--
extra : rebase_source : 8155b4244f6f9652b7cb9ef79ee3d0e9dc6f1b8b
2016-11-03 11:41:21 +01:00
Wes Kocher
93dca6f437 Backed out changeset 15886f6c3dd1 (bug 1311576) for test_ext_webrequest_filter.html failures a=backout 2016-11-10 23:36:07 -08:00
Shane Caraveo
086959718c Bug 1311576 fix webrequest filter for tabId and windowId, r=kmag
MozReview-Commit-ID: Gfg3Wv7JGI6

--HG--
extra : rebase_source : 08999bd99d095d1198a9cbaa3eb0c84b051f4473
2016-11-10 09:54:34 -08:00
Shane Caraveo
cb4c301312 Bug 1273138 fix WebRequest for background pages, r=kmag
MozReview-Commit-ID: DEW9anMmKi2

--HG--
extra : rebase_source : 7d82d1000473b2530d6144987a28e35815c11999
2016-11-02 09:30:50 -07:00
Andrea Marchesini
c119e65ac0 Bug 1302697 - Containers and WebExtensions - part 1 - Tab API, r=kmag 2016-10-28 10:15:42 +02:00
Rob Wu
70ca4c8753 Bug 1287007 - Make window.close in extension pages async r=billm
Test coverage by tabs.onRemoved + window.close() in:
toolkit/components/extensions/test/mochitest/test_ext_tab_teardown.html

MozReview-Commit-ID: 7asg2XGrTaQ

--HG--
extra : rebase_source : 4498725a207e1863bb5a1f0ee58673e6976df1f8
2016-09-13 20:26:18 -07:00
Rob Wu
bd0fa6844a Bug 1287007 - Only close extension tabs upon shutdown r=billm
In one of the previous patches, the viewType of popup changed from
"popup" to "tab". As a result it was closed by the `page-shutdown`
event handler in ext-tabs.js. This prevents that from happening.

Also added a test that checks whether the options page type is a tab, to
prevent future regressions.

MozReview-Commit-ID: 3Qcf08PgNqb

--HG--
extra : rebase_source : c4b89d122df52a7280ff5818903cb1d8737fb31c
2016-09-08 19:02:56 -07:00
Rob Wu
dce0635037 Bug 1287007 - Use IPC to share viewType, tabId and windowId r=billm
Accessing <browser> in ContentChild does not work when extensions run in
a separate process.

MozReview-Commit-ID: EK0aOYeGaZ5

--HG--
extra : rebase_source : 359cb1f9022b8097d27aa74a30e133c4a7e7c742
2016-09-06 15:25:10 -07:00
Rob Wu
6023c940a4 Bug 1287007 - Rename "context.type" to "context.viewType" r=billm
"viewType" is more easily searchable and not as ambiguous as "type".

MozReview-Commit-ID: 8sG4qagFCBu

--HG--
extra : rebase_source : 39d76379996e631b9fc33f0c77d565cf302b9df9
2016-09-05 22:26:56 -07:00
Andy McKay
e4fa3c53f8 bug 1240631 so that both invalid windows and tabs hit runtime.lastError r=kmag
MozReview-Commit-ID: EflXdTBWEEO

--HG--
extra : rebase_source : f3464383ec97250a3778ba627df10c210b3c5242
2016-10-21 14:45:18 -07:00
Rob Wu
743d610ca6 Bug 1301862 - Call tabs.create sooner r=kmag
Call tabs.create immediately after the tab is created without delay to
reduce the chance of losing tabs.onUpdated events.

If needed, the tab waiting is done by `executeScript`, etc.

MozReview-Commit-ID: 7A1zH99zafK

--HG--
extra : rebase_source : 56fb363f45040e76a120e6a3de8feaad1575c337
2016-09-11 01:32:24 -07:00
Rob Wu
7530f86ecf Bug 1298979 - move tabs.sendMessage/connect to child process r=billm
- Use the frame's message manager to direct messages via the
  ProxyMessenger to the right tab instead of directly to the tab.
- Put the implementation in a separate file that is only loaded in
  child processes (in the future).
- Explicitly list all addon-process specific files in a new category
  instead of reusing the content one.

MozReview-Commit-ID: 8oIMx9ol7Tl

--HG--
extra : rebase_source : f93805ecdf44d4607dffc20ffe1cf0cbeb8c86be
2016-08-28 20:07:46 -07:00
Rob Wu
3df8d2e80e Bug 1298979 - Add ProxyMessenger, change message managers and getSender r=billm
- Introduce a proxy for IPC messages to allow the following APIs
  to be run out-of-process (ProxyMessenger):

    * runtime.connect
    * runtime.sendMessage
    * tabs.connect
    * tabs.sendMessage
    * runtime.onConnect
    * runtime.onMessage

- Update getSender in ext-tabs, make it independent of the context
  (in particular do not throw an error when a message is received while
  the tab is gone), and move it from MessageChannel to ProxyMessenger to
  make sure that it works in webext-oop. MessageChannel lives in a child
  process, whereas the TabManager (used by getSender) requires data from
  the main process.

- Set the third parameter of `addMessageListener` to true in some places
  to make sure that messages get delivered even after unloading the
  context. This is needed for the next two points.

- Put the `messageManager` property in BaseContext, and let it be set by
  `setContentWindow` - runtime.sendMessage/connect and tabs.sendMessage/
  connect depends on this property, and using the frame message manager
  makes sense.

- Unconditionally use the frame message manager in
  runtime.sendMessage/connect instead of sometimes the cpmm.

MozReview-Commit-ID: 4QkPnlMOkjS

--HG--
extra : rebase_source : f2c753a9d396e4b5c40e46cd926024e664372002
2016-08-25 17:08:08 -07:00
Rob Wu
be3652cd57 Bug 1287010 - Make environment of Context explicit. r=billm
- Add `envType` to BaseContext.
 - Pass an explicit envType to all `registerSchemaAPI` invocations.
 - The factories passed to `registerSchemaAPI` will be split up later, so
   that content scripts (`content_child`) and addon pages can share
   common implementations.
 - The factories that implement the addon API will also be split up,
   to separate code running in the main process (`addon_parent`) from
   code running in a child process (`addon_child`).
 - Remove the use of a hardcoded list of `namespaces` from ProxyContext.
   Now `envType` is used to specify whether an API should be activated.

MozReview-Commit-ID: Jiff8HIwG92

--HG--
extra : rebase_source : 946a3c0009a4e3223c2d10044b3099a94c845394
2016-08-16 15:51:50 -07:00
Rob Wu
bacc209644 Bug 1295082 - Put Extension in BaseContext r=kmag
ExtensionContext in Extension.jsm has |extension| as an instance member,
so use it instead of passing |extension| to registerSchemaAPI's
callback.

And to make sure that this pattern also works in content processes, move
the |extension| member to BaseContext.

MozReview-Commit-ID: BgsGGCPQxJR

--HG--
extra : rebase_source : 7aa9fb7a53e057e8d3d8c477bd6821f8344c571a
2016-08-15 01:04:58 -07:00
Sebastian Hengst
2164cd95c8 Backed out changeset 0ce1cc39aa3d (bug 1295082) for timing out in test_ext_schemas_api_injection.js. r=backout 2016-08-18 16:47:09 +02:00