Commit graph

168 commits

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