Commit graph

108 commits

Author SHA1 Message Date
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
Rob Wu
dfc11d6f00 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 : 9a85d95f0c147198938b86c57127f6e7403fd53c
2016-08-15 01:04:58 -07:00
Rob Wu
65acb9a681 Bug 1290157 - Always pass an array to tabs.executeScript on success r=kmag
MozReview-Commit-ID: Ctw8RUtfEZC

--HG--
extra : rebase_source : 7f76c1c99b5948463e5bfa0f7270fe50f6e95a88
2016-08-09 00:28:47 -07:00
Kris Maglione
4f1b1dda0b Bug 1225215: [webext] Raise the expected errors when given invalid tab IDs. r=aswan
MozReview-Commit-ID: E5G0GmVhzLh

--HG--
extra : rebase_source : 5c6624b9d2d06109a1b047ad48dcac7e9405ee59
extra : amend_source : fb23020f7d2772f56fabc61f2e32f7d9c4c2f52a
2016-02-26 17:56:30 -08:00
Kris Maglione
8d58c7c636 Bug 1285493: Add-on Manager should not be closed when an add-on with options_ui is disabled. r=billm
MozReview-Commit-ID: 8oRK8uPphDf

--HG--
extra : rebase_source : c6dcc7da1823711e3223ba39d038e1ccc949f6fd
2016-07-24 15:05:39 -07:00
Pushpankar
c6670d980f Bug 1286854 - Replace ownerDocument.defaultView with ownerGlobal in browser/. r=dao
--HG--
extra : rebase_source : 72d50e73baf595840a2aade57ae782e4c40d4c27
2016-07-16 10:20:04 +02:00
Kris Maglione
a1dac7caad Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
MozReview-Commit-ID: 8m7wJrAbFwS

--HG--
extra : source : a00cf073f5c00380d4e42b13bc0cd3146b708845
extra : amend_source : d74ef90e88acbe62e33af3b5b9cf870d5c0a9d3e
2016-06-09 17:44:47 -07:00
Sebastian Hengst
f8035f62a8 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
b465305345 Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
MozReview-Commit-ID: 8m7wJrAbFwS

--HG--
extra : rebase_source : cba877c0ef400917b0b7e5913895e64ebefb34b9
extra : amend_source : 6e943015e3e00854c431cbd653994a6734e66ce4
2016-06-09 17:44:47 -07:00
Kris Maglione
c98153037d Bug 1276025: Stop using injectInDocShell to tag docShells with types. r=billm
MozReview-Commit-ID: 7h5PI2birY4

--HG--
extra : source : 99b213f494e1a9e20629e936681faedec16d22a3
extra : amend_source : d70ffaecbc11445a5bddeb52c9c940a866934347
2016-06-02 20:53:41 -07:00
Wes Kocher
3ec856c177 Backed out changeset 99b213f494e1 (bug 1276025) for xpcshell bustage CLOSED TREE 2016-06-07 16:59:20 -07:00
Kris Maglione
c5d392a9bc Bug 1276025: Stop using injectInDocShell to tag docShells with types. r=billm
MozReview-Commit-ID: 7h5PI2birY4

--HG--
extra : rebase_source : a8b8b9b49f9ef8304ee669f6c28c9290a1198ff3
extra : amend_source : f868dc11e3da5f89852343e88e373db14f5dcbd3
extra : histedit_source : 6ee59978a58828e22a9f2cbf651cb713ba28d25d
2016-06-02 20:53:41 -07:00
Kris Maglione
d5cf648d4d Bug 1254003: Don't call tabs.create callback before the tab is ready. r=gabor
MozReview-Commit-ID: 3qK6GpTmIFQ

--HG--
extra : source : 8afadb96e97704a98492c2286fb92479deb3365f
extra : amend_source : 90180f99ce13f9266b4b55b9a1f8689cdf3aa5ce
2016-04-03 19:31:47 -07:00
Claas Augner
3c65a4e758 Bug 1247455 - Add a .removeCSS method to complement .insertCSS. r=kmag 2016-04-15 00:39:09 +02:00
Kris Maglione
0c6f1f4c22 Backed out changeset a3fbed43aa55 for a new set of intermittent failures.
MozReview-Commit-ID: 1lIDylABshC
2016-04-25 18:13:41 -07:00
Kris Maglione
3e9bda71d8 Bug 1254003: Don't call tabs.create callback before the tab is ready. r=gabor
MozReview-Commit-ID: 3qK6GpTmIFQ

--HG--
extra : rebase_source : 16b5a51afade88ec9cf1d7ccc0878e310c7fad78
extra : source : 8afadb96e97704a98492c2286fb92479deb3365f
2016-04-03 19:31:47 -07:00
Kris Maglione
d78e5a3050 Bug 1238310: Part 5 - Implement the browser.tabs.onZoomChange event. r=gabor f=aswan
MozReview-Commit-ID: JlxSM13SeYg

--HG--
extra : rebase_source : aaa1ac864a0cbcbe22aa7aa694ab0203f8e39d0b
extra : amend_source : 2a8a0081e853d5f2f3975ebee4c3bcb0ee46c2e9
2016-04-01 11:45:01 -07:00
Carsten "Tomcat" Book
84eb46bafd merge mozilla-inbound to mozilla-central a=merge
--HG--
rename : toolkit/components/prompts/test/test_bug861605.html => toolkit/components/prompts/test/test_dom_prompts.html
2016-04-25 11:55:12 +02:00
Phil Ringnalda
664d43385b Back out a57938cd29d2 (bug 1254003) for timeouts in browser_ext_tabs_* 2016-04-24 22:16:13 -07:00
Kris Maglione
6640885354 Bug 1254003: Don't call tabs.create callback before the tab is ready. r=gabor
MozReview-Commit-ID: 3qK6GpTmIFQ

--HG--
extra : rebase_source : cd0d5f5fae93e7e4f6436d2fae1d6e4c9363d2d4
extra : source : 8afadb96e97704a98492c2286fb92479deb3365f
2016-04-03 19:31:47 -07:00
Kris Maglione
b783efe7d8 Backed out changeset 8afadb96e977 for too many intermittent failures (bug 1254003).
MozReview-Commit-ID: 2wFCgIaH9lM
2016-04-24 00:39:29 -07:00
Kris Maglione
24d6448f60 Bug 1254003: Don't call tabs.create callback before the tab is ready. r=gabor
MozReview-Commit-ID: 3qK6GpTmIFQ

--HG--
extra : rebase_source : 5510c5bc106eb3a5d35b761439b654fe7fe68a8f
2016-04-03 19:31:47 -07:00
Kris Maglione
512b5f6bcb Bug 1238310: Part 4 - Refactor tab listener code. r=aswan
MozReview-Commit-ID: 66ZXlvepRsz

--HG--
extra : rebase_source : 72e6f860df44b31c25940d0ea6b75242bf340851
extra : source : f4e7fed2020e146726efc653527d55b1a67b091e
extra : histedit_source : c4ea6bdbeac642fe3ba558ec3fdb4a497513a377
2016-02-17 11:47:56 -08:00
Kris Maglione
02eba536f1 Bug 1238310: Part 3 - Implement the base browser.tabs zoom API. r=aswan
MozReview-Commit-ID: BZEFOnCRMba

--HG--
extra : rebase_source : b43761bbeccfa2da0fad969676c2e7ac9b434f7d
extra : histedit_source : d0f195f76ff32e3889adcba2b691ce89fc4ad0c7
2016-04-01 15:44:29 -07:00
Matthew Wein
f64c3ca257 Bug 1245355 - Add a unit test for tabs.getAllInWindow. r=kmag
MozReview-Commit-ID: 5wVRCLdCuq9

--HG--
extra : transplant_source : %B0%89%CB%F5%9C%C8%A7%94%BAJ%1Cz%BE%1AU%99%BE%A4%D0%AE
2016-03-17 09:35:58 +01:00
tofumatt
0f151b21a6 Bug 1237822 - Throw error if tabs.query is used without "tabs" permission with url param. r=kmag
MozReview-Commit-ID: 4WpawIYcwnl

--HG--
extra : transplant_source : %1FD%00%5D%CEJ%E6%10Wj%C3%92%87%FFN%A4Vo%0C%E7
2016-03-15 15:39:27 +01:00
Bill McCloskey
74d6b169e1 Bug 1197346 - Rename ExtensionPage to ExtensionContext (r=kmag) 2016-04-23 20:04:29 -07:00
Sebastian Hengst
1b915e4b70 Backed out changeset 562dbcad5a6e (bug 1245355) for leaking windows and a docshell in its new test browser_ext_tabs_getAllInWindow.js. r=backout 2016-03-16 19:19:41 +01:00
Matthew Wein
eb7409d4cd Bug 1245355 - Add a unit test for tabs.getAllInWindow r=kmag
MozReview-Commit-ID: 5wVRCLdCuq9

--HG--
extra : rebase_source : 3d937ea9c1806499d6ae0701014728700687f07f
2016-03-15 12:01:40 +01:00
Kris Maglione
876d0a0806 Bug 1220154, 1249830: Handle sendMessage replies with 0 and >1 listeners correctly. r=billm
MozReview-Commit-ID: 7lE7RaJcl7n

--HG--
extra : rebase_source : 424987c745840d56647600b8d9e1bf941afb1d95
2016-03-04 15:40:56 -08:00