Commit graph

480 commits

Author SHA1 Message Date
Kris Maglione
9d78661f88 Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
2020-07-10 23:58:28 +00:00
Marco Bonardo
66e30e7da6 Bug 1627361 - Stop examining the clipboard data when updating Places commands. r=Standard8
We used to read the contents of the clipboard to tell if paste was enabled,
that unfortunately means updating commands was extremely slow for large
clipboard data.
After this change we only check the data flavors. This means paste will be
enabled more often, even for unsupported strings, but commands updating will
be much faster. Places updates commands often, so this is quite useful.

Differential Revision: https://phabricator.services.mozilla.com/D75202
2020-05-15 14:20:58 +00:00
Ian Moody
011b59d595 Bug 1536556 - Replace raw thrown Cr.ERRORs with Components.Exception. r=mossop,remote-protocol-reviewers,marionette-reviewers,whimboo,necko-reviewers,geckoview-reviewers,valentin,agi
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.

This was done automatically with a new eslint rule that will be introduced in
the next commit.  One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS.  The rule will be disabled for that instance.

Differential Revision: https://phabricator.services.mozilla.com/D28073
2020-05-05 17:41:36 +00:00
Mark Banner
88fb3a72de Bug 1622243 - Implement the bookmark pages option in the library window. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D68776

--HG--
extra : moz-landing-system : lando
2020-04-07 12:56:19 +00:00
Ed Lee
acb960676c Bug 1620556 - Automatic code fixes for Prettier 1.19.1 upgrade. r=Standard8,remote-protocol-reviewers,marionette-reviewers,webcompat-reviewers,perftest-reviewers,sparky,whimboo,denschub
Differential Revision: https://phabricator.services.mozilla.com/D66128

--HG--
extra : moz-landing-system : lando
2020-03-13 23:38:52 +00:00
monikamaheshwari
9d60e0d578 Bug 1578683 Turn on ESLint rule prefer-boolean-length-check for toolkit and browser r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D45629

--HG--
extra : moz-landing-system : lando
2019-09-14 09:39:26 +00:00
Gijs Kruitbosch
dca75bf8ea Bug 1567414 - ensure we display the 'Open' context menu entry on bookmarks when they load in new tabs by default, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D39025

--HG--
extra : moz-landing-system : lando
2019-07-23 15:24:38 +00:00
Hamzah
7d7ca018fd Bug 1559956 - UX: Bookmark bar context menu item "Open in New Tab" is not consistent with anchor link context menu. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D37197

--HG--
extra : moz-landing-system : lando
2019-07-15 18:38:01 +00:00
Victor Porof
1f830c96da Bug 1561435 - Format browser/components/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36042

--HG--
extra : source : d3afcafdce650a6f36cebbc126ee93b17f13cf52
2019-07-05 09:53:32 +02:00
Mihir
f52d50a249 Bug 543314 - Allow bookmarks to be moved (as well as copied) from a bookmarks search. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D32629

--HG--
extra : moz-landing-system : lando
2019-06-11 20:33:51 +00:00
Boris Zbarsky
5eb248348f Bug 1557847. Stop using [array] in nsIClipboard. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D34243

--HG--
extra : moz-landing-system : lando
2019-06-09 01:06:39 +00:00
Kris Maglione
e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Toby Ward
b7922e7f75 Bug 1435562 - browser.tabs.warnOnOpen is now respected when opening multiple items from the library. r=Standard8
- Unified openContainerNodeInTabs and openURINodesInTabs in PlacesUIUtils into openMultipleLinksInTabs
- Users are now warned when the amount of links to be opened is equal to or exceeds browser.tabs.maxOpenBeforeWarn

Differential Revision: https://phabricator.services.mozilla.com/D12983

--HG--
extra : moz-landing-system : lando
2018-12-10 17:04:18 +00:00
Csoregi Natalia
322dfaf9c2 Backed out changeset 81a6b32f2a8b (bug 1435562) for causing Bug 1512180. a=backout 2018-12-06 14:20:20 +02:00
Toby Ward
16581f028e Bug 1435562 - browser.tabs.warnOnOpen is now respected when opening multiple items from the library. r=Standard8
- Unified openContainerNodeInTabs and openURINodesInTabs in PlacesUIUtils into openMultipleLinksInTabs
- Users are now warned when the amount of links to be opened is equal to or exceeds browser.tabs.maxOpenBeforeWarn

Differential Revision: https://phabricator.services.mozilla.com/D12983

--HG--
extra : moz-landing-system : lando
2018-12-04 19:20:59 +00:00
Tom Schuster
5a9d2a428c Bug 1493292 - Remove aDataLen parameters from nsITransferable.getTransferData. r=smaug
Depends on D11200

Differential Revision: https://phabricator.services.mozilla.com/D11201

--HG--
extra : moz-landing-system : lando
2018-11-20 16:59:56 +00:00
Csoregi Natalia
df7483024d Backed out 6 changesets (bug 1493292) for bustage on /nsTransferable.cpp. CLOSED TREE
Backed out changeset f198bf91320b (bug 1493292)
Backed out changeset 6487aa307123 (bug 1493292)
Backed out changeset f2cabd69c568 (bug 1493292)
Backed out changeset 71430fceb4a3 (bug 1493292)
Backed out changeset 3a9b6d65d8c7 (bug 1493292)
Backed out changeset 55769869037c (bug 1493292)
2018-11-20 17:13:18 +02:00
Tom Schuster
b292ec7c2c Bug 1493292 - Remove aDataLen parameters from nsITransferable.getTransferData. r=smaug
Depends on D11200

Differential Revision: https://phabricator.services.mozilla.com/D11201

--HG--
extra : moz-landing-system : lando
2018-11-20 14:47:02 +00:00
Mark Banner
4eabeccb20 Bug 1502954 - Remove livemarks code from toolkit. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D12118

--HG--
extra : moz-landing-system : lando
2018-11-20 13:29:54 +00:00
Tom Schuster
8c1f89b6e5 Bug 1503588 - Remove aDataLen parameter from nsITransferable.getAnyTransferData. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D10441

--HG--
extra : moz-landing-system : lando
2018-11-02 11:02:25 +00:00
Marco Bonardo
d77d9c899f Bug 1502655 - Remove remaining frontend livemarks code. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D9992

--HG--
extra : moz-landing-system : lando
2018-10-29 13:18:17 +00:00
Mark Banner
8b5c6973b6 Bug 1501811 - Remove livemarks support from browserPlacesViews/treeView. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D9701

--HG--
extra : moz-landing-system : lando
2018-10-26 07:40:15 +00:00
Marco Bonardo
59f27ba50d Bug 1477671 - Stop allowing creation of new live bookmarks from the backend. r=standard8
Differential Revision: https://phabricator.services.mozilla.com/D7083

--HG--
extra : rebase_source : 89475d197e412ad5756eb1e9f4b9a4ea06dbf2a2
2018-10-06 10:32:13 +01:00
Mark Banner
bf2dba5c9f Bug 1476228 - Enable comma-dangle ESLint rule for Places directories. r=mikedeboer
MozReview-Commit-ID: K8HcZfyF4Sz

Differential Revision: https://phabricator.services.mozilla.com/D3796

--HG--
extra : moz-landing-system : lando
2018-08-22 15:44:43 +00:00
Brian Grinstead
abf1620630 Bug 1479125 - Migrate calls that expect an element to be returned to use element variation firstChild etc to firstElementChild etc;r=Paolo
This allows the JS to work in HTML documents, where whitespace is preserved. In XUL
documents, whitespace is ignored when parsing so text nodes are generally not returned.

The following changes were made, with manual cleanups as necessary (i.e. when firstChild actually
refers to a text node, or when firstChild is used in a loop to empty out an element):

  firstChild->firstElementChild
  lastChild->lastElementChild
  nextSibling->nextElementSibling
  previousSibling->previousElementSibling
  childNodes->children

MozReview-Commit-ID: 95NQ8syBhYw

--HG--
extra : rebase_source : 186d805f7a2a56694dda9032aceac2dfe5424753
2018-08-08 15:22:53 -07:00
Marco Bonardo
23cf556fe1 Bug 1477996 - Move getURIsForTag to the bookmarking API. r=Standard8,lina
The tagging API is being merged into the bookmarking API. This is part of it.

Differential Revision: https://phabricator.services.mozilla.com/D2450

--HG--
extra : moz-landing-system : lando
2018-07-27 15:16:57 +00:00
Brian Grinstead
4121127ab8 Bug 1445764 - Move Places imports from XUL to JS for the Places documents;r=standard8
MozReview-Commit-ID: 1LKRgTlaupu

--HG--
extra : rebase_source : ac36bf61df6d77f495e018ac6a972d78e3cbc173
2018-07-03 14:26:49 -07:00
Mark Banner
5b8ba7f27e Bug 1452645 - Remove load in sidebar functionality. r=lina,mak
Based on patch by mixedpuppy.

MozReview-Commit-ID: BZwOtr4VbCH

--HG--
extra : rebase_source : 2e3ad3fedaf82d0e5d3db9bcebf1c2faa46447e7
2018-06-06 21:00:45 +01:00
Mark Banner
9f30e28934 Bug 1463738 - Remove the Bookmark description UI. r=dao
This removes the bookmark description UI, but leaves the backend in-place for a release or two, so that users have time to save anything they want (e.g. via backup).
The backend will be removed in bug 1402890.

MozReview-Commit-ID: La4AYFar7eK

--HG--
extra : rebase_source : 02bfe3cacdac331d09d5e62a1a70f48b68741670
2018-05-23 17:15:09 +01:00
Mark Banner
b7d8bea195 Bug 1209518 - Fix highlighting of cut bookmarks. r=mak
Fix the ownership check to correctly check if we're cutting or copying.

MozReview-Commit-ID: 1eLt4Fyy2nE

--HG--
extra : rebase_source : 78850cde9d4433d844bef32b6624331460663025
2018-05-21 16:55:26 +01:00
jakehm
7a8a48c884 Bug 1089691 - Convert consumers of removePagesByTimeframe and removePagesFromHost to PlacesUtils.history.removeByFilter. r=mak
MozReview-Commit-ID: HevUcwPhYhd

--HG--
extra : rebase_source : da8c9df153a2358a339ada1b82850fba55c42913
2018-02-25 14:27:03 -05:00
Kris Maglione
a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Marco Bonardo
dc7cbba002 Bug 1453545 - Properties option disabled when right-clicking a bookmarks folder. r=standard8
MozReview-Commit-ID: 30JmVhO7sh9

--HG--
extra : rebase_source : d7e46a4b5a3cbe631305e909dca7edf3ab54e5ce
2018-04-19 00:16:48 +02:00
Marco Bonardo
3a337abf8a Bug 1452621 - Cleanup some tag queries related code. r=standard8
MozReview-Commit-ID: L8L3i5W1CHe

--HG--
extra : rebase_source : 50b547644e39238402985072d400022c83a33a7a
2018-04-09 15:38:45 +02:00
Marco Bonardo
a68b7f8aea Bug 1293445 - 5 - Rename RESULTS_AS_TAG_QUERY. r=standard8
MozReview-Commit-ID: 7HwPKkGvAvv

--HG--
extra : rebase_source : e8c8bb963061c23907bacc68082d4e70a609bbf2
2018-04-04 16:14:20 +02:00
Marco Bonardo
df5bf9e86f Bug 1293445 - 4 - Remove RESULTS_AS_TAG_CONTENTS. r=standard8
MozReview-Commit-ID: rybSCGrfnf

--HG--
extra : rebase_source : 86105516beb29be7adb941c8039093451864b44b
2018-04-03 18:32:00 +02:00
Mark Banner
d9cffeba70 Bug 1450223 - Remove unnecessary synchronous annotation lookups from the places context menu. r=mak
MozReview-Commit-ID: Ck2eaeVAjXs

--HG--
extra : rebase_source : 8de9f419570773d922a6d73c6f44069ffe403376
2018-03-29 15:49:39 +01:00
Marco Bonardo
d666e0fda1 Bug 1421664 - 3 - Fix the UI and tests. r=standard8
test_419731.js can be removed since it is already covered by browser_bookmarkProperties_editTagContainer.js

MozReview-Commit-ID: K0LFuTptWyW

--HG--
extra : rebase_source : 10066aa0bdb6a598fc6af638fed455d58422b7fb
2018-03-22 14:13:07 +01:00
Marco Bonardo
26f5fb6357 Bug 1446951 - 2 - Change nsINavHistoryQueryResultNode::GetQueries to a query attribute. r=standard8
MozReview-Commit-ID: 77xEeAE13xW

--HG--
extra : rebase_source : 287644bf9fad4960c963dd7e07a4a7fe1f8c569e
2018-03-16 16:20:22 +01:00
Mark Banner
00e92cb7a4 Bug 1425555 - Avoid a database fetch after showing the new bookmark dialog. r=mak
MozReview-Commit-ID: 1pjynkFFSOd

--HG--
extra : rebase_source : bfdcaa8ba5eeae485bfa69f688a37bea636cce6f
2018-03-20 23:52:58 +00:00
Brendan Dahl
8a6f97c45c Bug 1442302 - Remove placesOverlay.xul. r=Gijs,mak,standard8
The overlay was responsible for script loading and defining three elements
(bhTooltip, placesCommands, placesContext). In the majority of places where
the overlay was included only part of it was used. To remove the overlay, the
elements were each split into include files and moved into where they
were used. For the scripts, a JS file was added that defines all the lazy
modules and then this script, globalOverlay.js and utilityOverlay.js were
inlined to everywhere that would have included them from the overlay.

MozReview-Commit-ID: 8T5D46oYWLn

--HG--
rename : browser/components/places/content/placesOverlay.xul => browser/components/places/content/placesCommands.inc.xul
rename : browser/components/places/content/placesOverlay.xul => browser/components/places/content/placesContextMenu.inc.xul
extra : rebase_source : c1071af4ea264a95183cbc65caae98feb23d58e5
2018-03-12 10:43:35 -07:00
manikishan
92de2db258 Bug 1431050 - Replace NS_ASSERT with conditional exceptions/console.assert and remove the debug.js module. r=mak
console.assert keeps the same semantics as NS_ASSERT in that it doesn't throw an exception,
but a lot of the places code was using it in a way that would be better served by throwing
an exception when the condition is false.

MozReview-Commit-ID: DEF5HSfYO36
2018-02-03 11:32:25 +05:30
Michael Kaply
b7a354c792 Bug 1432355 - Add a policy to disable private browsing. r=Gijs
MozReview-Commit-ID: AprbL6usEv5

--HG--
extra : rebase_source : d0a9255aae8b8d038c69978cbeabbfc394ad46cd
2018-03-01 10:20:38 -06:00
Marco Bonardo
039ea5e750 Bug 1439315 - 6 - Move some utils into PlacesController or PlacesUIUtils. r=standard8
MozReview-Commit-ID: D7J6hY7Akro

--HG--
extra : rebase_source : 9e9f885db98c72a857c941b2eb6b8a294d1b570e
2018-02-28 13:51:28 +01:00
Marco Bonardo
66361b299d Bug 1439315 - 5 - defineLazyScriptGetter controller.js. r=standard8
MozReview-Commit-ID: 4Kq3XvJNNGB

--HG--
extra : rebase_source : a72bbdee84965d716b14d5ddbb020579cdc83f8c
2018-02-28 12:31:37 +01:00
Marco Bonardo
19f9286fc5 Bug 1439315 - 3 - Don't use NetUtil.newURI. r=standard8
MozReview-Commit-ID: 58jYURt7EWF

--HG--
extra : rebase_source : e215b0a8890b3dc2169d82fbf63ba2fba4e65b4f
2018-02-28 12:28:54 +01:00
Marco Bonardo
a49f4669c5 Bug 1439315 - 2 - Move command utils to PlacesUIUtils. r=standard8
MozReview-Commit-ID: 6hN9LxVQunX

--HG--
extra : rebase_source : 7dacee00aecf5cfb00a6977a88ecea5334958022
2018-02-28 12:27:21 +01:00
Marco Bonardo
388f9e4090 Bug 1439315 - 1 - rename InsertionPoint to PlacesInsertionPoint. r=standard8
MozReview-Commit-ID: 1NfkueEUPXC

--HG--
extra : rebase_source : 9e3e6f58742a0900fdd73e6c5ed5089f7d01da63
2018-02-28 12:10:12 +01:00
Florian Quèze
c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Mark Banner
93a5b36959 Bug 1434261 - Disable user actions on the places trees not in the library window to avoid accidential/unintentional actions. r=mak
MozReview-Commit-ID: ILo09hwWRsZ

--HG--
extra : rebase_source : 3231ff9ab3b7f4a036b208daffe8f72418951566
2018-02-21 17:51:23 +00:00