Commit graph

176 commits

Author SHA1 Message Date
Shane Caraveo
766d86e4a3 Bug 1438985 fix showing hidden tabs on extension shutdown, r=aswan
We need a static disable event so we can handle shutdown
of extensions using hidden tabs.  This allows us to handle
shutdown when the extension has not yet used the API (thus
the ext-tabs api has not loaded).

MozReview-Commit-ID: BxV5PmbHJ8o

--HG--
extra : rebase_source : 78dd8b6e6b6ee1b09d446545dc8b38e32d7e9969
2018-03-01 12:04:52 -06:00
Shane Caraveo
dd3edd16c4 Bug 1398713 pass triggeringPrincipal when using browser.loadURI, r=Gijs,kmag 2018-02-28 17:32:01 -06:00
Shane Caraveo
4bea9207d6 Bug 1436720 use sessionstore to track controlling extension, r=Gijs
MozReview-Commit-ID: ACzGfNDVFXm

--HG--
extra : rebase_source : 7b7c8123f74b437ae5dc37c254dfb090b9321d4b
2018-02-13 15:43:31 -07:00
Kris Maglione
918ed6c474 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou
9a65a40178 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
6476f95b13 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian
af8879d1eb 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
c276bb9375 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

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
dw-dev
9d2e97a23a Bug 1415507 - changes to tabs.saveAsPDF(); r=mixedpuppy
There are three changes:

1. Adds a print progress listener to tabs.saveAsPDF() in ext-tabs.js so that the
  'saved' or 'replaced' status is not returned until the PDF file has been saved.

2. Adds four more "edge" properties to the  pageSettings object to allow positioning
   of the page headers and footers.

3. Adds automated tests for tabs.saveAsPDF() in browser_ext_tabs_saveAsPDF.js that
   cover all returned statuses: saved, replaced, canceled, not_saved, not_replaced.

MozReview-Commit-ID: iljvT8wp11

--HG--
extra : rebase_source : 081f8b6ed56ecaa5f5f5414a11f57b143c0fd19e
2018-01-19 14:13:33 +00:00
Noemi Erli
9f768aa4e8 Backed out changeset 9687e3d987be (bug 1415507) for bc failures in browser/components/extensions/test/browser/browser_ext_tabs_saveAsPDF.js on a CLOSED TREE 2018-01-19 10:22:14 +02:00
dw-dev
0af31f6b53 Bug 1415507 - changes to tabs.saveAsPDF(); r=mixedpuppy
There are three changes:

1. Adds a print progress listener to tabs.saveAsPDF() in ext-tabs.js so that the
  'saved' or 'replaced' status is not returned until the PDF file has been saved.

2. Adds four more "edge" properties to the  pageSettings object to allow positioning
   of the page headers and footers.

3. Adds automated tests for tabs.saveAsPDF() in browser_ext_tabs_saveAsPDF.js that
   cover all returned statuses: saved, replaced, canceled, not_saved, not_replaced.

MozReview-Commit-ID: LMTjKDjBwY3

--HG--
extra : rebase_source : 3fc661c737ee5800d9d40e51ecafc11a946e8780
2018-01-18 10:15:36 +00:00
Shane Caraveo
636a2a5a8f Bug 1423725 add show/hide tabs api, r=rpl
MozReview-Commit-ID: 4z73ZTRE7kN

--HG--
extra : rebase_source : 7683973921b07818c7a63ab8387e4ebe65705499
2018-01-18 16:37:18 -07:00
Shane Caraveo
d78ea2931e Bug 1423725 add event, query and details for hidden status, r=Gijs,rpl
MozReview-Commit-ID: AMcmbh4m8lK

--HG--
extra : rebase_source : 6e8c246cbe69e4d298de031361e10276ddbf7551
2018-01-18 16:37:11 -07:00
Tim Nguyen
40b755ffc4 Bug 1427463 - Implement tabs.captureTab(tabId). r=mixedpuppy
MozReview-Commit-ID: 5sr3I1A1b8A

--HG--
rename : browser/components/extensions/test/browser/browser_ext_tabs_captureVisibleTab.js => browser/components/extensions/test/browser/browser_ext_tabs_captureTab.js
extra : rebase_source : 3bcadd40eb506bbaef53f0cafcbcd4347e5cf58b
2018-01-10 14:51:43 +00:00
Bob Silverberg
ba5b0824a2 Bug 1422211 - Do not try to move a tab when it is the only tab in a window, r=mixedpuppy
The problem reported in this bug is that the newTab button moves to an invalid position when
there's only 1 tab in a window and you try to move it to the end of the tab strip via tabs.move.

This may be caused by a bug in tabbrowser, which is being investigated separately, but it
brought to light the fact that we're trying to move a tab when it's the only tab in a
window, and that just doesn't make sense.

This patch updates the code so we don't try to move a tab if it's the only tab in the
window.

MozReview-Commit-ID: 1oBs0OHnvxi

--HG--
extra : rebase_source : 2fde9ffdac4a2f2e290b51f0f73dd877db60f009
2017-12-01 09:03:44 -05:00
Bob Silverberg
9e8f1233a1 Bug 1415913 - tabs.create without a windowId should target only normal windows, r=aswan
This introduces a new property to WindowTracker (on desktop only) called topNormalWindow
which returns the topmost window which is not a popup window. That property is then used
by tabs.create to identify the top "normal" window when a windowId is not passed to it.

Bug 1421709 has been filed to look for other opportunities to use topNormalWindow
in place of topWindow in our codebase.

MozReview-Commit-ID: DcV93wO6FoV

--HG--
extra : rebase_source : 7c7be7c364cc627d385929a2c9fd2dee757bf835
2017-11-20 17:00:20 -05:00
tushararora
b990216761 Bug 1334782 - tabs.query should pattern match the title r=zombie
MozReview-Commit-ID: 5WaKLaOP7Nc

--HG--
extra : rebase_source : 6d317b643cd6d6f38659dfc5cc0c8e16bee74e56
2017-11-16 16:17:45 +05:30
Kevin Jones
02944dc817 Bug 1322485 - Implement browser.tabs.discard API. r=mixedpuppy 2017-10-30 12:52:00 -04:00
Mark Banner
4de6bf22b1 Bug 1411368 - Automatically fix no-multi-spaces issues raised when using ESLint 4. r=mossop
MozReview-Commit-ID: H5YVp3rnzGo

--HG--
extra : rebase_source : 5b45b6c0df834131812d094e975047eaad374e06
2017-10-26 11:47:01 +01:00
Bob Silverberg
05d1c44747 Bug 1411351 - Fix Console error "WeakMap key must be an object..." that happens when opening a new tab, r=aswan
When the New Tab page is opened, the browser object that is passed into the isArticleChangeListener
is not a valid browser from the perspective of tabbrowser.xml, so it is not able to find it in its
_tabForBrowser map. This causes undefined to be passed into tabManager.getWrapper(), which causes
the error.

This patch fixes this by not calling tabManager.getWrapper(), and subsequently firing the onUpdate
event, if the return value from gBrowser.getTabForBrowser() is undefined. Testing shows that that
is only the case when the New Tab page is opened, and that page is not, and is unlikely to be
readerable any time in the foreseeable future (confirmed on IRC), so ignoring this case in the
listener is acceptable.

MozReview-Commit-ID: D9LQRrPmCoU

--HG--
extra : rebase_source : da5c074c2e59babb5385d24a4f768aa4b7ae8997
2017-10-26 14:31:43 -04:00
Mark Banner
42cb2dc6a3 Bug 1230373 - Enable mozilla/use-services for browser/components/ r=mossop
MozReview-Commit-ID: 9m9iss3jUJJ

--HG--
extra : rebase_source : e6a6f9dec168ab1d0e0343236db65f3dd1b44aeb
2017-10-11 15:43:51 +01:00
Bob Silverberg
272fe41a5f Bug 1408993 - Allow tabs.create to create URLS in reader mode, r=mixedpuppy
MozReview-Commit-ID: B5Nk0ZVvQIC

--HG--
extra : rebase_source : 6f515ef1dbc110c35b527e06f269ae703bb77468
2017-10-16 10:42:45 -04:00
Bob Silverberg
8f848ff9df Bug 1381992 - Add some reader mode support to the tabs API, r=mixedpuppy
This adds two properties to the Tab object:

- isArticle indicates whether the document in the tab is likely able to be
  rendered in reader mode.
- isInReaderMode indicates if the document in the tab is being rendered in
  reader mode.

It also adds a toggleReaderMode() which toggles a tab into and out of reader mode.

There is also a new case in which tabs.onUpdated will fire. When the isArticle
status of a tab changes, an onUpdated event will fire with data {isArticle: boolean}.

MozReview-Commit-ID: AaAQ0V5qm2Z

--HG--
extra : rebase_source : f9cbed6dff56781ecd86281cb46f23f0ec8aecf6
2017-09-08 17:00:27 -04:00
Sebastian Hengst
8abbab2bc7 Backed out changeset 4e174306e0b0 (bug 1381992) for e.g. failing chrome's mobile/android/components/extensions/test/mochitest/test_ext_activeTab_permission.html on Android. r=backout 2017-09-25 18:28:58 +02:00
Bob Silverberg
659e58f274 Bug 1381992 - Add some reader mode support to the tabs API, r=mixedpuppy
This adds two properties to the Tab object:

- isArticle indicates whether the document in the tab is likely able to be
  rendered in reader mode.
- isInReaderMode indicates if the document in the tab is being rendered in
  reader mode.

It also adds a toggleReaderMode() which toggles a tab into and out of reader mode.

There is also a new case in which tabs.onUpdated will fire. When the isArticle
status of a tab changes, an onUpdated event will fire with data {isArticle: boolean}.

MozReview-Commit-ID: AaAQ0V5qm2Z

--HG--
extra : rebase_source : 579fccb76358dc0d333409ed81669cf45576e67f
2017-09-08 17:00:27 -04:00
Kris Maglione
daa3085d2b Bug 1398630: Part 3 - Use document.docShell rather than longer/slower XPC paths. r=zombie
MozReview-Commit-ID: 5oD0Uvv1pvx

--HG--
extra : rebase_source : 977b6df718df231082f1c7594f25d954cfa50a5f
2017-09-11 14:53:20 -07:00
Bob Silverberg
bad1c19a1b Bug 1397383 - Add loadReplace option to tabs.update, r=mixedpuppy
This adds a loadReplace option into the updateOptions object for tabs.update()
which, when set to true, will cause the loading of the new URL to replace the
current URL in the tab's history.

MozReview-Commit-ID: KZTuEl7cgb0

--HG--
extra : rebase_source : 24f006fe197f56b3102cb00e226d53036b9ba93b
2017-09-08 08:31:39 -04:00
Kevin Jones
c103f1eb75 Bug 1377733 - Add discarded property to tabs.Tab on desktop. r=zombie, r=kmag
--HG--
extra : histedit_source : 618b98850265ef2d26695366d023459e6d0cd2a7
2017-08-31 16:14:26 -06:00
Lee Bousfield
c9deae8e08 Use extension ID instead of URL UUID for tab.mutedInfo (bug 1391168) r=kmag
MozReview-Commit-ID: 4U2oDzli9oX

--HG--
extra : rebase_source : cf32733f026e7d3b9b22c4bc2eeb13317b1b8ad0
2017-08-17 20:29:36 -06:00
Kris Maglione
b6480eaf24 Bug 1238314: Part 2 - Implement browser.tabs openerTabId functionality. r=aswan
MozReview-Commit-ID: L4ycNoQDfa

--HG--
extra : rebase_source : 6c7a92cd6a068d446d60469637ebc88b4355671d
2017-08-04 16:13:59 -07:00
dw-dev
291d2c4afb Bug 1386805 - changes to saveAsPDF() and printPreview(); r=mixedpuppy
saveAsPDF() - changed to return error message in lastError if called on Mac OS X.

saveAsPDF() - changed returned status values to lower case with underscores instead of spaces.

printPreview() - changed to return error message in lastError if print preview fails.

MozReview-Commit-ID: KxWJ3ClqaHy

--HG--
extra : rebase_source : 4526b66ff0c342dc1302132a7f187d1cdc5b1399
2017-08-11 18:24:57 +01:00
Kris Maglione
701fb54270 Bug 1387907: Part 3 - Merge ext-browser.js and ext-utils.js. r=mixedpuppy
MozReview-Commit-ID: CmOax5b5Gki

--HG--
extra : rebase_source : d0200575bfe49607f277cef5aea3da920852fd45
2017-08-06 18:20:25 -07:00
Kris Maglione
f87ef7bd44 Remove unused lazy imports. r=trivial (no bug)
MozReview-Commit-ID: rqUFJw7Wsb

--HG--
extra : rebase_source : cdda5d87fe33bdb9dacc1846fd67f3cb4154f230
2017-08-02 21:09:38 -07:00
dw-dev
6c4686768a Bug 1269300 Patch 5;r=mixedpuppy
MozReview-Commit-ID: ByikIYU4ASF

--HG--
extra : rebase_source : 85e2bed93c47f8bdb2df7165b1f01169619cb170
2017-07-13 18:34:29 +01:00
Andrew Swan
c29de224fb Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag
MozReview-Commit-ID: 7nsYWdSTJCG

--HG--
extra : rebase_source : 7afd89a9a1853d51bd31196bb2faa7e0d786043c
2017-06-09 13:49:07 -07:00
Sebastian Hengst
6d1aee1b24 Backed out changeset 26fd6d0a1254 (bug 1369577) for failing xpcshell's test_ext_simple.js and test_ext_startup_cache.js on Android. r=backout 2017-06-30 01:01:13 +02:00
Andrew Swan
c60b71854e Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag
MozReview-Commit-ID: 7nsYWdSTJCG

--HG--
extra : rebase_source : 22cf5ee36dfa27e121a5c577bce2fd0189ccb164
2017-06-09 13:49:07 -07:00
Mark Banner
403075400a Bug 1371292 - Clean up more ESLint global definitions in configuration files in toolkit/ and browser/. r=mossop
MozReview-Commit-ID: 5KC23kzaCFN

--HG--
extra : rebase_source : 6a7541b5ffe85d275bc16194c155ad43f93d52ae
2017-06-08 10:59:12 +01:00
Kris Maglione
87f57f76b7 Bug 1322235: Part 3 - Use MatchPatternSet for whiteListedHosts and webRequest. r=aswan,zombie
This is the second step to migrating the policy service to pure native code,
with similar impacts and reasoning to the previous patch.

MozReview-Commit-ID: L5XdPzWNZXM

--HG--
extra : rebase_source : dda006a0afb9d56e2738dbc0b0d94ba0496db5c9
2017-06-03 22:11:20 -07:00
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