- Work-around in browser_ext_menus_events.js for bug 1428213
- Fix indentation issues (eslint)
- Hide the "pageUrl" property for bookmark menu events
(fixes test failure in test_bookmark_contextmenu).
MozReview-Commit-ID: 4YHJci0J7Rh
--HG--
extra : rebase_source : 3879e843bd2826fcd34dbd41708d570024e681e8
This test ensures that the menu events will always be fired in the
natural event order.
Two menus are tested:
- A context menu in the page.
- The tools menu.
MozReview-Commit-ID: 4sLyvgMYMtE
--HG--
extra : rebase_source : 9837661f034530b63c9cbbbb3104fb6367f513a8
This commit lifts the restriction that onShown is only fired for
extensions with a visible menu item.
MozReview-Commit-ID: Ao4MgBoRWLR
--HG--
extra : rebase_source : c1acd1bcbfdcc6ef4bfaf199f3f016dde71ad2e5
The logic in onClicked had some flaws:
- editable can be undefined instead of a boolean.
- linkText, linkUrl is set in non-link contexts.
- srcUrl is set even in non-media contexts.
This change does not add new tests, because test coverage for the
event data generator is provided by:
browser/components/extensions/test/browser/browser_ext_menus_events.js
There is one observable change here.
Previously, linkUrl and linkText would also be set for non-link context
if the selected text contained a URL. When this happens, then
nsContextMenu.js sets onPlainTextLink=true.
With this refactor, linkText and linkUrl are only set if the context is
"link" (onLink=true).
MozReview-Commit-ID: 2xf1F41bn0U
--HG--
extra : rebase_source : 698e0b9a2eb10f58d02e062f930753752aff9a54
- Adds most of the OnClickData properties to the onShown event parameter
(except for menu-specific properties such as parentMenuId / checked).
- Add tests to verify the values of these properties.
MozReview-Commit-ID: 7705sJyAOIJ
--HG--
extra : rebase_source : 8948ea20129cfd1c34653a3cbe9b36cebd6fa00d
Together with the previous patches that introduced menus.onShown,
this enabled extensions to update/remove menu items after a menu
has been shown.
At this point, it is not yet possible to add a menu item if an
extension has not shown a menu item before; this can be added later.
MozReview-Commit-ID: E0JrE9gd4gS
--HG--
extra : rebase_source : 0d21c369eb17b3a819603f27af8d9f9fccf5b783
Splot gMenuBuilder.build in three separate functions because the
individual functionality is needed later.
This is just moving some code around, nothing interesting to see.
MozReview-Commit-ID: Lo6QmLQBtO5
--HG--
extra : rebase_source : 6476a8834c378d6fa059fab1a5f2323f82688658
Previously, there was no guarantee for the uniqueness of the ID.
Now the ID is unique, and always set.
See https://bugzil.la/1358213#c6 and #c7 for examples of collisions.
MozReview-Commit-ID: 7CHP6tWFDUg
--HG--
extra : rebase_source : a585dcfd3a83eb590de9b69a02dba8b4bb1b0a0c
This commit adds the bare minimum to support the onShown and onHidden
methods in the contextMenus and menus API (plus tests).
The onShown event data may be extended in a separate commit, to make it
easier to see how the additional properties are reflected in the tests.
MozReview-Commit-ID: 20VJS2YLhTN
--HG--
extra : rebase_source : 1fe9985b2e5daa1be455e07ccf58e36e6d9fe508
Most close*Menu methods in browser tests allow itemToSelect to be null.
Some did not.
Now they do (after this commit)
MozReview-Commit-ID: 2jSGAi2R3ZD
--HG--
extra : rebase_source : 897d4a66f5b1da8027180f85c5f5f5284734e860
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
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
There's a heavy enough overhead to going through XPConnect for
every observer for every visit on the nsINavHistoryObserver
interface, so this patch reduces that by replacing the single-
visit notification with one which accepts an array of visits.
Some notes: To avoid problems with the orderings of the various
ways in which we notify about visits, we have to send our bulk
onVisits notification before doing any of the others. This does
mean it technically behaves slightly different than the prior
approach of interleaving the notifications, but I can't find any
way in which this has any consequences to the end result, and it
doesn't break any tests.
MozReview-Commit-ID: GdeooH8mCkg
--HG--
extra : rebase_source : 48b5f886c4650a756e70f4657cb9d62c8ce40f74
The return value from Cu.import() does not include lexically scoped
symbols so stop using it here. Also stop using Extension.generate()
while we're here.
MozReview-Commit-ID: HnX3RGgDHbR
--HG--
extra : rebase_source : b4e238f2a5f1c9dce838b4dd70447edd9f401c10