Commit Graph

123 Commits

Author SHA1 Message Date
Tomislav Jovanovic
0be52ef43e Bug 1295072 - Focus urlbar after opening an empty new tab r=kmag
MozReview-Commit-ID: 3dzCzHTxQrh
2017-02-04 20:48:38 +01:00
Phil Ringnalda
d06e2ad618 Backed out changeset 70253d6678af (bug 1295072) for failures in browser_ext_tabs_create.js 2017-02-05 13:23:21 -08:00
Tomislav Jovanovic
d497eb8908 Bug 1295072 - Focus urlbar after opening an empty new tab r=kmag
MozReview-Commit-ID: 3dzCzHTxQrh
2017-02-04 20:48:38 +01:00
Kris Maglione
1ccc618561 Bug 1260548: Part 5 - Factor out <browser> data logic into shared modules. r=aswan
MozReview-Commit-ID: GHPympWA7U
2017-01-30 20:11:14 -08:00
Kris Maglione
d398f0d718 Bug 1260548: Part 4 - Factor out tab status listener logic into shared module. r=aswan
MozReview-Commit-ID: Ff9gLKdGQHX
2017-01-28 20:00:24 -08:00
Kris Maglione
cc2f0c186b Bug 1260548: Part 2 - Factor out the excuteScript/insertCSS logic. r=aswan
MozReview-Commit-ID: 8FxlX7MKZsN
2017-01-30 18:51:29 -08:00
Kris Maglione
bbe2608ca7 Bug 1260548: Part 1 - Factor out the common functionality of the tabs API. r=aswan
MozReview-Commit-ID: AS7asn6nXzr
2017-01-30 22:44:16 -08:00
Andrew Swan
d23b45b581 Bug 1203330 Part 2 Convert EventManager uses to SingletonEventManager r=kmag
MozReview-Commit-ID: A12TPwAYzTS
2017-01-26 11:27:03 -08:00
Phil Ringnalda
5781d2a09e 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
99c8d3a692 Bug 1203330 Part 2 Convert EventManager uses to SingletonEventManager r=kmag
MozReview-Commit-ID: A12TPwAYzTS
2017-01-26 11:27:03 -08:00
Florian Quèze
91f7a2ef3a 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
Rob Wu
d1dbc4a42a 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
2016-12-26 12:30:50 +01:00
Florian Quèze
45647c4570 Bug 1329182 - remove trailing newURI null parameters in browser/, r=jaws. 2017-01-09 20:27:25 +01:00
Tomislav Jovanovic
feea6913fa Bug 1320412 - Emit tabs.onUpdated event for title changes r=kmag
MozReview-Commit-ID: I0d5GJ8Rsev
2017-01-05 00:19:38 +01:00
Tom Schuster
dc5a9c790a Bug 1310026 - webext: Add cssOrigin option to insertCSS/removeCSS. r=kmag 2017-01-06 16:07:59 +01:00
Kris Maglione
1f770639ea Bug 1322869: Part 1 - Apply window filters per-window rather than per-tab. r=bsilverberg
MozReview-Commit-ID: AAlyBJowMOm
2016-12-19 12:34:09 -08:00
Kris Maglione
158298c36f 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
2016-11-15 15:13:50 -08:00
Wes Kocher
2876e6bba5 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
6050204429 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
2016-11-15 15:13:50 -08:00
Shane Caraveo
514b6a6f46 Bug 1311576 fix webrequest filter for tabId and windowId, r=kmag
MozReview-Commit-ID: FzW53LXktWz
2016-11-15 16:34:33 -08:00
Tomislav Jovanovic
e7e303ee0e bug 1310331 - implement matchAboutBlank for tabs.executeScript r=kmag
MozReview-Commit-ID: ApuakyrctzD
2016-11-03 11:41:21 +01:00
Wes Kocher
1ce6160424 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
beac0c5fcf Bug 1311576 fix webrequest filter for tabId and windowId, r=kmag
MozReview-Commit-ID: Gfg3Wv7JGI6
2016-11-10 09:54:34 -08:00
Shane Caraveo
b2ca77fcab Bug 1273138 fix WebRequest for background pages, r=kmag
MozReview-Commit-ID: DEW9anMmKi2
2016-11-02 09:30:50 -07:00
Andrea Marchesini
bc1116fcdc Bug 1302697 - Containers and WebExtensions - part 1 - Tab API, r=kmag 2016-10-28 10:15:42 +02:00
Rob Wu
95ffcd5efd 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
2016-09-13 20:26:18 -07:00
Rob Wu
e498d721b2 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
2016-09-08 19:02:56 -07:00
Rob Wu
0b6a21b18a 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
2016-09-06 15:25:10 -07:00
Rob Wu
85f4c6b8ea 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
2016-09-05 22:26:56 -07:00
Andy McKay
1b0a8253b8 bug 1240631 so that both invalid windows and tabs hit runtime.lastError r=kmag
MozReview-Commit-ID: EflXdTBWEEO
2016-10-21 14:45:18 -07:00
Rob Wu
1adbe191ae 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
2016-09-11 01:32:24 -07:00
Rob Wu
9cfd0fcca8 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
2016-08-28 20:07:46 -07:00
Rob Wu
91820391f9 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
2016-08-25 17:08:08 -07:00
Rob Wu
812e170fe8 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
2016-08-16 15:51:50 -07:00
Rob Wu
6efdd88867 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
2016-08-15 01:04:58 -07:00
Sebastian Hengst
c7a498ffbd 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
Rob Wu
6189daa99f 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
2016-08-15 01:04:58 -07:00
Rob Wu
8472b153c7 Bug 1290157 - Always pass an array to tabs.executeScript on success r=kmag
MozReview-Commit-ID: Ctw8RUtfEZC
2016-08-09 00:28:47 -07:00
Kris Maglione
3531e0dc55 Bug 1225215: [webext] Raise the expected errors when given invalid tab IDs. r=aswan
MozReview-Commit-ID: E5G0GmVhzLh
2016-02-26 17:56:30 -08:00
Kris Maglione
946c03abd0 Bug 1285493: Add-on Manager should not be closed when an add-on with options_ui is disabled. r=billm
MozReview-Commit-ID: 8oRK8uPphDf
2016-07-24 15:05:39 -07:00
Pushpankar
77a14e357c Bug 1286854 - Replace ownerDocument.defaultView with ownerGlobal in browser/. r=dao 2016-07-16 10:20:04 +02:00
Kris Maglione
843973aa31 Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
MozReview-Commit-ID: 8m7wJrAbFwS
2016-06-09 17:44:47 -07:00
Sebastian Hengst
d97f588f03 Backed out changeset a00cf073f5c0 (bug 1279392) for failing mochitest test_ext_contentscript_create_iframe.html at least on Linux x64 opt. r=backout 2016-06-14 13:37:52 +02:00
Kris Maglione
b2a33e3bf1 Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
MozReview-Commit-ID: 8m7wJrAbFwS
2016-06-09 17:44:47 -07:00
Kris Maglione
403332897f Bug 1276025: Stop using injectInDocShell to tag docShells with types. r=billm
MozReview-Commit-ID: 7h5PI2birY4
2016-06-02 20:53:41 -07:00
Wes Kocher
ef8b093de7 Backed out changeset 99b213f494e1 (bug 1276025) for xpcshell bustage CLOSED TREE 2016-06-07 16:59:20 -07:00
Kris Maglione
3b83db606e Bug 1276025: Stop using injectInDocShell to tag docShells with types. r=billm
MozReview-Commit-ID: 7h5PI2birY4
2016-06-02 20:53:41 -07:00
Kris Maglione
ed18f55d09 Bug 1254003: Don't call tabs.create callback before the tab is ready. r=gabor
MozReview-Commit-ID: 3qK6GpTmIFQ
2016-04-03 19:31:47 -07:00
Claas Augner
1737833daa Bug 1247455 - Add a .removeCSS method to complement .insertCSS. r=kmag 2016-04-15 00:39:09 +02:00
Kris Maglione
daea263459 Backed out changeset a3fbed43aa55 for a new set of intermittent failures.
MozReview-Commit-ID: 1lIDylABshC
2016-04-25 18:13:41 -07:00