Commit graph

159 commits

Author SHA1 Message Date
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
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