Commit Graph

399 Commits

Author SHA1 Message Date
Brendan Dahl
42d1485841 Bug 1548026 - Noop download button's changed callback when unloaded. r=bzbarsky
Temporary workaround to prevent wrapper assertions in torn-down
window.

Differential Revision: https://phabricator.services.mozilla.com/D29410
2019-04-30 20:29:00 +00:00
Brian Grinstead
3dd68e7775 Bug 1546501 - Remove unnecessary type attributes (i.e. [type="application/javascript"]) on non-test script tags r=mossop
This is an autogenerated commit, generated with https://bug1546501.bmoattachments.org/attachment.cgi?id=9060222

Differential Revision: https://phabricator.services.mozilla.com/D28559
2019-04-24 19:43:57 +00:00
Rob Wu
731bc4cb2e Bug 1544834 - Replace non-test uses of deprecated Array generics r=evilpie,dao
- `Array.forEach` becomes for-of loop or `array.forEach`.
- `Array.slice(a)` or `Array.slice(a, 0)` becomes `Array.from(a)`.
- `Array.map` becomes `Array.from`
- `Array` copy + concatenation becomes Array literal + spread syntax.
- All other `Array.X(a, ...)` become `Array.prototype.X.call` or `Array.from(a).X(...)`

Differential Revision: https://phabricator.services.mozilla.com/D27802
2019-04-17 19:03:17 +00:00
Mike Conley
eeb16a6513 Bug 1542756 - Bug 1543128 - Add option to only return visible nodes from nsIDOMWindowUtils.nodesFromRect. r=emilio
Depends on D26778

Differential Revision: https://phabricator.services.mozilla.com/D26809
2019-04-15 01:08:12 +00:00
Csoregi Natalia
aa00ef41ef Backed out 10 changesets (bug 1542756, bug 1543128, bug 1543122) for multiple media failures /test_setSinkId.html. CLOSED TREE
Backed out changeset ce3a15e1b737 (bug 1543128)
Backed out changeset cea8c1af70ad (bug 1543128)
Backed out changeset aeb23f8f45fb (bug 1543128)
Backed out changeset a2e73d143aba (bug 1543128)
Backed out changeset 1692fc6491a0 (bug 1543128)
Backed out changeset 9fbce4274cfd (bug 1542756)
Backed out changeset 20092bcebe6a (bug 1543122)
Backed out changeset 1645d577016c (bug 1543122)
Backed out changeset 3fce0b7586c1 (bug 1543122)
Backed out changeset aab68db4131b (bug 1543122)
2019-04-13 06:22:47 +03:00
Mike Conley
35c5d79449 Bug 1542756 - Bug 1543128 - Add option to only return visible nodes from nsIDOMWindowUtils.nodesFromRect. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D26809
2019-04-13 01:22:58 +00:00
Brian Grinstead
4243dbc600 Bug 1531119 - Remove editMenuCommands.inc.xul and make editMenuOverlay.js in charge of constructing the relevant commandset DOM r=bdahl,NeilDeakin
This allows us to drop preprocessing and makes it simpler to add edit menu functionality to any type of document.

Differential Revision: https://phabricator.services.mozilla.com/D21446
2019-03-21 14:18:48 +00:00
Dão Gottwald
248517e527 Bug 1527572 - Properly style the download panel summary. r=Felipe
Differential Revision: https://phabricator.services.mozilla.com/D22096
2019-03-08 02:55:20 +00:00
James Teh
9d8ba8b47d Bug 1531246: Support keyboard activation (space/enter) of the Downloads toolbar button when focused. r=Gijs
Depends on D21614

Differential Revision: https://phabricator.services.mozilla.com/D21615
2019-03-01 12:00:45 +00:00
Kris Maglione
856fa07b17 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
2019-01-17 10:18:31 -08:00
Kris Maglione
f498964d86 Bug 1519596: Part 1 - Remove several unnecessary/unused ChromeUtils.import() calls. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16377
2019-01-11 16:59:23 -08:00
Dão Gottwald
932ce36a51 Bug 1518441 - Remove obsolete styling for toolbarseparators in the downloads panel footer. r=paolo
Differential Revision: https://phabricator.services.mozilla.com/D15919
2019-01-08 15:23:54 +00:00
Dão Gottwald
4c229a5e20 Bug 1515902 - Introduce panel-footer class to fix common color problem with footer buttons. r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D15188
2018-12-21 15:44:44 +00:00
Paolo Amadini
e925383796 Bug 1509388 - Part 2 - Build download-subview-toolbarbutton markup directly using JS. r=mak
This makes this derived class of DownloadElementShell more similar to DownloadsViewItem, and removes batch fagment handling because proper XBL construction requires elements to be connected to the document before they are accessed from JavaScript.

Differential Revision: https://phabricator.services.mozilla.com/D14573
2018-12-19 16:50:12 +00:00
Paolo Amadini
fc784c6722 Bug 1509388 - Part 1 - Don't use a toolbarbutton element for the download-subview-toolbarbutton binding. r=Gijs
Download items in the Downloads Subview of the Library Panel are implemented using a XBL binding that is associated to a "toolbarbutton" element, but inherits from "button-base" in order to avoid the display="xul:button" of the "toolbarbutton" binding. This is because the item contains an inner button, and using a button CSS frame for the outer element would break hover behavior and mouse events.

This changes the binding so it doesn't use a "toolbarbutton" element, which is a different way to avoid the outer button CSS frame, and eventually allows removing support for the "display" attribute in XBL.

Differential Revision: https://phabricator.services.mozilla.com/D14572
2018-12-13 18:47:28 +00:00
Paolo Amadini
3d858408e1 Bug 1513149 - Hovering the action buttons doesn't display the command associated with the button. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D14172
2018-12-11 18:27:01 +00:00
Tom Schuster
9c64b67174 Bug 1503588 - Remove aDataLen parameter from nsITransferable.getAnyTransferData. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D10441
2018-11-02 11:02:25 +00:00
Paolo Amadini
e7f5507915 Bug 1499704 - Use html:progress for downloads. r=dao,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D8973
2018-10-17 15:25:00 +01:00
Paolo Amadini
1b1a2ac959 Bug 1452626 - Remove the "download" binding. r=mak,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D7176
2018-10-04 11:12:03 +01:00
Alexander Surkov
36ae6997c9 Bug 1491197 - replace progressmeter XBL binding by a custom element, r=paolo 2018-10-03 11:13:05 +05:00
Paolo Amadini
1549bd8b40 Bug 1493969 - Refactor the user interface update code of download elements. r=mak,ursula
Differential Revision: https://phabricator.services.mozilla.com/D4539
2018-09-28 14:59:30 +01:00
Paolo Amadini
d2bf5d8048 Bug 1328519 - Simplify the definition of the Downloads Panel width. r=mak
The width is now defined on the entire list instead of the inner elements, similarly to other Photon panels like the main menu. This is a prerequisite for preventing layout issues while removing the "download" binding.

Differential Revision: https://phabricator.services.mozilla.com/D6284
2018-09-19 17:01:09 +01:00
Paolo Amadini
3ac95b4d1f Bug 1452629 - Part 5 - Remove the "downloadDetailsFull" description element. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D4461
2018-08-28 16:53:04 +01:00
Paolo Amadini
3881a2a3fb Bug 1452629 - Part 4 - Remove the "downloadShowMoreInfo" description element. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D4460
2018-08-28 15:41:36 +01:00
Paolo Amadini
814e4aa7c1 Bug 1452629 - Part 3 - Remove the "downloadOpenFile" description element. r=mak
The "Open File" message is now correctly displayed when hovering the one-pixel-wide clickable area around the action button.

Differential Revision: https://phabricator.services.mozilla.com/D4459
2018-08-28 15:36:36 +01:00
Paolo Amadini
5e6873180c Bug 1452629 - Part 2 - Avoid redundant button label elements in the "download" widget. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D4447
2018-08-28 15:57:52 +01:00
Paolo Amadini
a9a795fc41 Bug 1452629 - Part 1 - Avoid redundant button elements in the "download" widget. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D4441
2018-09-13 16:16:46 +01:00
Mark Banner
462116b7f9 Bug 1486739 - Add missing dangling commas in browser/, services/, taskcluster/ and toolkit/. r=mossop
Automatic changes by ESLint, except for manual corrections for .xml files.

Differential Revision: https://phabricator.services.mozilla.com/D4439
2018-08-31 05:59:17 +00:00
Paolo Amadini
c241dbc46c Bug 1457218 - Part 1 - Don't inherit from "menu-button-base" in the "download-subview-toolbarbutton" binding. r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D4529
2018-08-30 10:28:01 +01:00
Brendan Dahl
532fe1f6b0 Bug 1485426 - Use createXULElement instead of createElement in XUL docs. r=bgrins
Preparing for transitioning to XHTML.

MozReview-Commit-ID: JLlmUxsvhIB

Differential Revision: https://phabricator.services.mozilla.com/D4265
2018-08-25 00:16:27 +00:00
Brian Grinstead
1c86f46ecd 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
2018-08-08 15:22:53 -07:00
Boris Zbarsky
e98236cf07 Bug 1476145 part 3. Stop using getInterface(nsIDOMWindowUtils) in browser/. r=gijs 2018-07-24 19:47:41 -04:00
Mark Banner
6a204ea1c1 Bug 1474638 - Change users of nsIDownloadHistory::removeAllDownloads() to PlacesUtils.history.removeVisitsByFilter. r=mak
Also change PlacesUtils.history.removeVisitsByFilter to be able to remove by transition type.

MozReview-Commit-ID: Bkiv0ScUi07

Differential Revision: https://phabricator.services.mozilla.com/D2056
2018-07-11 16:04:25 +00:00
Paolo Amadini
f014461b31 Bug 1473521 - Load "richlistbox.css" as a document stylesheet. r=bgrins
This adds an ID selector to the rules meant to override "richlistitem". This was missing only in the Downloads Panel and the Downloads View.

MozReview-Commit-ID: D6NEQlICGQi
2018-07-06 19:25:18 +01:00
Mike de Boer
15e60d9e71 Bug 1034036 - Part 2: Rename and shorten getMostRecentBrowserWindow to getTopWindow and modernize the style used in BrowserWindowTracker.jsm. r=dao
MozReview-Commit-ID: EvgAhq4uR3a
2018-04-11 12:05:59 +02:00
Mike de Boer
2271d50b55 Bug 1034036 - Part 1: Merge RecentWindow.jsm and UpdateTopLevelContentWindowIDHelper.jsm into one module called 'BrowserWindowTracker.jsm'. r=dao
MozReview-Commit-ID: 9qzq1aGvjDu
2018-04-11 12:05:56 +02:00
Brendan Dahl
3930802738 Bug 1443971 - Remove allDownloadsViewOverlay.xul. r=Paolo
This overlay was used in two places: places.xul and
contentAreaDownloadsView.xul. Move the commandset, menuppop and
downloadsRichListBox into include files. Inline the scripts and
DTDs.

MozReview-Commit-ID: LroiQlRTE2T
2018-03-19 16:21:50 -07:00
Brendan Dahl
10bb02704a Bug 1439766 - Replace editMenuOverlay.xul by inlining and preprocessing. r=Gijs
The overlay elements with children of editMenuOverlay.xul are moved into
include files (editMenuCommands.inc.xul and editMenuKeys.inc.xul). For
the other single elements in the overlay, the attributes are inlined
wherever they are used.

MozReview-Commit-ID: 792cuzUvQxT
2018-02-22 15:48:24 -08:00
Ciure Andrei
642bbf1d1c Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-02-23 02:06:26 +02:00
Paolo Amadini
f7c87a1ab1 Bug 1439358 - Part 2 - Don't use the "current" property when restoring focus from the blocked downloads subview. r=Gijs
MozReview-Commit-ID: ASmmdQMctr5
2018-02-22 12:20:53 +00:00
Brendan Dahl
08481d480b Bug 1434077 - Inline indicators overlay. r=Paolo
This is part of the work to remove XUL overlays. The overlay was originally
created to help startup performance, but inlining the overlay seems to
no longer have detrimental effects to performance and is more straightforward.

MozReview-Commit-ID: 7sfVel6qvgv
2018-02-14 12:20:58 -08:00
Brendan Dahl
e5f0a48b9a Bug 1434077 - Inline downloads overlay. r=Paolo
This is part of the work to remove XUL overlays. The overlay was originally
created to help startup performance, but using a hidden panel instead seems to
have no detrimental effects to performance and is more straightforward.

MozReview-Commit-ID: JlWcZEhPXyH
2018-02-06 15:55:50 -08:00
Boris Zbarsky
4fd6e65c55 Bug 1436508 part 10. Remove use of nsIDOMKeyEvent in JS. r=masayuki
MozReview-Commit-ID: GGciORX62Yh
2018-02-09 11:17:09 -05:00
Paolo Amadini
ff1ddd6adf Bug 1434883 - Part 2 - Use an asynchronous API to open PanelMultiView panels. r=Gijs
MozReview-Commit-ID: 3VzoxJ3Ociy
2018-02-06 09:02:27 +00:00
Andrew McCreight
272cee1e65 Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG
2018-02-06 09:36:57 -08:00
Florian Quèze
c5f15a4700 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Paolo Amadini
1b1da3067b Bug 1424469 - The Downloads view in the Library window doesn't get focus when opened. r=mak
We have to keep track of the focused element while we remove the richlistbox element temporarily.

MozReview-Commit-ID: AePydUyyUS7
2018-01-30 14:38:25 +00:00
Kris Maglione
0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00