Commit graph

28 commits

Author SHA1 Message Date
J. Ryan Stinnett
2e1f988e96 Bug 1394841 - Check iframes for related tabs in WebExt. r=kmag
When using WebExt messaging with Responsive Design Mode, message manager
messages traveling from content to parent such as "MessageChannel:Messages" are
received with `event.target` set to the <iframe mozbrowser> inside RDM that
hosts the content.

Here we change `getSender` processing for messages like this to also check HTML
iframes for related tabs, in addition to XUL elements as before.

MozReview-Commit-ID: 3qphe2W8jHM

--HG--
extra : rebase_source : 4b9f3bc930a57bda847cede0217af29d1692d852
2017-11-01 17:19:19 -05:00
Andrew Swan
77124f8a0d Bug 1409245 Part 3 Handle update and uninstall events in WebExtensions r=kmag
This patch just forwards invocations of the bootstrap update() and
uninstall() methods to events that other parts of the WebExtension
framework can listen for.  We have an existing event that fires while
an extension is being uninstalled.  This event was named "uninstall"
but it gets renamed here to "onUninstalling" to disambiguate the two
events.

MozReview-Commit-ID: BIpIR8n9HBM

--HG--
extra : rebase_source : b191d43279129da6fc7f67b7e7960b8b20dca6b8
2017-10-25 20:49:14 -07:00
Kris Maglione
32f579d0e3 Bug 1402944: Part 6 - Optimize getBrowserInfo some more. r=mixedpuppy
MozReview-Commit-ID: 8kdeVqKb889

--HG--
extra : rebase_source : 63282fc295a50ef9743b3e6192e2b1ac726af022
2017-09-23 00:50:46 -07: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
Bob Silverberg
597114a565 Bug 1375546 - Fix sessions.getRecentlyClosed to consider the current tab history index, r=mikedeboer,mixedpuppy
If the back button is used to navigate a tab backwards in its history, and then the tab is closed,
the current implementation of sessions.getRecentlyClosed does not take this into account and
just uses the last item in the tab history for the values returned for the tab. This patch fixes
this by using the values for the current position of the tab in its history.

MozReview-Commit-ID: LcgtA5FqVWi

--HG--
extra : rebase_source : 3b8cd840fd30305471feec643f77d57378bd40d7
2017-09-19 16:05:33 -04:00
Bob Silverberg
7ab3a9f057 Bug 1366290 - Fix the ordering of tabs.onActivated and tabs.onRemoved, r=kmag
Currently tabs.onActivated (for the tab that becomes active after a tab is removed) fires before
tabs.onRemoved (for the tab that was removed). This is neither the order in which Chrome fires
these events, nor is it the order in which the internal TabSelect and TabClose happen in Firefox.
This bug fixes this so tabs.onActivated fires *after* tabs.onRemoved.

Note that this does introduce an issue in in-process mode, where window.close() will not
trigger a tabs.onRemoved event for the window, but Kris says "Meh" about that.

MozReview-Commit-ID: CrFR3jqL2u5

--HG--
extra : rebase_source : 5cc3d2a138bf812d13779e8ca1188b89ddbcdcc1
2017-05-31 12:01:58 -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
Kris Maglione
cea09f3f8f Bug 1397448: Part 2 - Speed up about:addon child frame checks. r=mixedpuppy
MozReview-Commit-ID: 4wLw0KnQvsT

--HG--
extra : rebase_source : 0b9695a25a7051a606ff5ed08cfbdc7229057e19
2017-09-08 17:11:13 -07:00
Kris Maglione
a2ec0b79b6 Bug 1396017: Redact window titles without the appropriate tabs permissions. r=mixedpuppy
MozReview-Commit-ID: 2QJYvJlqt9l

--HG--
extra : rebase_source : 33c4670a0eded6e0af4f931a1ac4cd57f6115995
extra : amend_source : 915bfac6f2c05024acd840c8fa9e282bfc31c296
2017-09-01 12:20:10 -07: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
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
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
d0f7ccc7be Bug 1387907: Part 2 - Store computed module data in the startup cache. r=mixedpuppy
MozReview-Commit-ID: 4PV4z870GTb

--HG--
rename : browser/components/extensions/ext-browser.js => browser/components/extensions/ext-browser.json
rename : toolkit/components/extensions/ext-toolkit.js => toolkit/components/extensions/ext-toolkit.json
extra : rebase_source : d0909d381724c65877517873b57e78d474948376
2017-08-06 18:04:28 -07:00
Kris Maglione
0a92c7bb9b Bug 1387898: Remove unnecessary uses of EventEmitter.decorate. r=mixedpuppy
MozReview-Commit-ID: FRCdXHc3S4K

--HG--
extra : rebase_source : 4d7eb8614745fdbcac37b101a617d7aa3d43eea0
2017-08-07 14:42:57 -07:00
Bob Silverberg
f54d2052b3 Bug 1381573 - Use callOnClose instead of onShutdown in ext-url-overrides.js, r=aswan
Also replace onStartup with onManifestEntry

MozReview-Commit-ID: GMrdzjvXZe5

--HG--
extra : rebase_source : 010c3b2d328e6738a49d7a1e551720117950bfc0
2017-07-17 14:01:04 -04:00
Bob Silverberg
5e8fe99296 Bug 1330494 - Part 2: Use the ExtensionsSettingsStore to handle precedence for extensions using chrome_url_overrides, r=aswan
MozReview-Commit-ID: 5sKtIXjdSmC

--HG--
extra : rebase_source : d4a57b71c009c32fab03c890df10f657afdc17bb
2017-06-28 13:11:19 -07:00
Bob Silverberg
460568b25e Bug 1374237 - Part 3: Declare all top-level functions in browser API files files via const., r=mixedpuppy
Also changed some function names to attempt to guarantee uniqueness across API files.

MozReview-Commit-ID: FU5JU1lRHzn

--HG--
extra : rebase_source : 4fdda100649f1bf604f6d5445aa04ce561859964
2017-06-21 16:13:00 -04:00
Christoph Kerschbaumer
1b0622cda9 Bug 1375023 - Have switchToTabHavingURI() provide the correct triggeringPrincipal. r=gijs,aswan 2017-06-25 14:03:06 +02:00
Tomislav Jovanovic
fc1fbb5770 Bug 1333403 - Part 2: Implement browser.menus as alias for contextMenus r=kmag
MozReview-Commit-ID: JPaKsOyavDb

--HG--
rename : browser/components/extensions/ext-c-contextMenus.js => browser/components/extensions/ext-c-menus.js
rename : browser/components/extensions/ext-contextMenus.js => browser/components/extensions/ext-menus.js
rename : browser/components/extensions/schemas/context_menus.json => browser/components/extensions/schemas/menus.json
rename : browser/components/extensions/schemas/context_menus_internal.json => browser/components/extensions/schemas/menus_internal.json
rename : browser/components/extensions/test/browser/browser_ext_contextMenus_chrome.js => browser/components/extensions/test/browser/browser_ext_menus.js
extra : rebase_source : cfdc20e9bbec7fb93d7055925d9b3037d3ea1501
2017-06-10 16:43:20 +02:00
Sebastian Hengst
7f39e1a3f2 Backed out changeset cfc47df74537 (bug 1333403)
--HG--
rename : browser/components/extensions/ext-c-menus.js => browser/components/extensions/ext-c-contextMenus.js
rename : browser/components/extensions/ext-menus.js => browser/components/extensions/ext-contextMenus.js
rename : browser/components/extensions/schemas/menus.json => browser/components/extensions/schemas/context_menus.json
rename : browser/components/extensions/schemas/menus_internal.json => browser/components/extensions/schemas/context_menus_internal.json
rename : browser/components/extensions/test/browser/browser_ext_menus.js => browser/components/extensions/test/browser/browser_ext_contextMenus_chrome.js
2017-06-10 16:06:44 +02:00
Tomislav Jovanovic
2e019f4e0b Bug 1333403 - Part 2: Implement browser.menus as alias for contextMenus r=kmag
MozReview-Commit-ID: JPaKsOyavDb

--HG--
rename : browser/components/extensions/ext-c-contextMenus.js => browser/components/extensions/ext-c-menus.js
rename : browser/components/extensions/ext-contextMenus.js => browser/components/extensions/ext-menus.js
rename : browser/components/extensions/schemas/context_menus.json => browser/components/extensions/schemas/menus.json
rename : browser/components/extensions/schemas/context_menus_internal.json => browser/components/extensions/schemas/menus_internal.json
rename : browser/components/extensions/test/browser/browser_ext_contextMenus_chrome.js => browser/components/extensions/test/browser/browser_ext_menus.js
extra : rebase_source : 8de33b11034ee159567ae43b998b700e94730081
2017-06-06 23:25:06 +02: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
Mark Banner
4fb45e5b8c Bug 1365412 - Clean up various ESLint global definitions in browser/. r=mossop
MozReview-Commit-ID: JqAm9x1XGCM

--HG--
extra : rebase_source : e9215288195f1fe683832db53d87dbe77c697b4c
2017-05-16 22:22:42 +01:00
Alexandre Poirot
c90bccb53a Bug 1356231 - Use toolkit EventEmitter.jsm instead of devtools module. r=mossop
MozReview-Commit-ID: 49JI7NtLwKK

--HG--
extra : rebase_source : 7fb015f56be94c4bbe2d56506653f069c9ad8dd3
2017-04-27 17:58:09 +02:00
Doug Thayer
979585d6ed Bug 1326572 - Provide an API for nsIProfiler r=kmag,mstange
In order to rewrite the Gecko Profiler add-on as a WebExtension,
we need an API for the profiler which allows us to control the
nsIProfiler, and symbolicate the stacks that it provides. This
is the implementation of the simpler parts of that API.

TODO:
- Support profiling of remote targets through a new devtools
  API.
- Support the dump_syms breakpad code which was asm.js in the
  old extension by directly calling into native code.
- Figure out a faster way to send the large volume of data from
  getSymbols all the way from our extension down to the content
  process and then into the page's context.

MozReview-Commit-ID: JzDbV4l2eXd

--HG--
extra : rebase_source : fee9acfaa522372c22c61f9b0f1cab13d5da2a86
2017-04-11 09:03:40 -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