Граф коммитов

127 Коммитов

Автор SHA1 Сообщение Дата
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
Mark Banner 691543ee89 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

--HG--
extra : moz-landing-system : lando
2018-08-31 05:59:17 +00:00
Boris Zbarsky 6e84b66899 Bug 1476145 part 6. Stop using getInterface(nsIDOMWindowUtils) in toolkit. r=mossop
This is not quite a mechanical change, because some places have a .top or
whatnot snuck in there, so please review carefully!
2018-07-24 19:47:42 -04:00
Boris Zbarsky 0cf65db1d3 Bug 1465875 part 2. Eliminate use of "instanceof nsIDOMNSEditablElement". r=qdot 2018-06-01 22:35:22 -04:00
Boris Zbarsky c4000f8b65 Bug 1377980 part 3. Remove nsIDOMRange use in JS. r=mccr8 2018-05-17 12:01:38 -04:00
Kris Maglione bf4d9f1be5 Bug 1456035: Part 5 - Convert manual QueryInterface to ChromeUtils.generateQI. r=mccr8
Manually-implemented QueryInterface functions don't benefit from the
MozQueryInterface optimizaions, and a lot of them are in hot code, and
implement a large number of interfaces.

MozReview-Commit-ID: 8OzglraowZt

--HG--
extra : rebase_source : 5fff3d9973a0ea976096339a63ce9ff628b68441
2018-04-23 12:58:34 -07:00
Boris Zbarsky 45a3faf8f6 Bug 1455052 part 12. Remove JS uses of nsIDOMEvent. r=masayuki,kmag
MozReview-Commit-ID: 5g0H3rzxTXt
2018-04-20 12:55:31 -04: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
Florian Quèze 682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Mike de Boer fd90dab99f Bug 1337869 - Optimizations for the modal find-in-page highlighting: don't render range cut-outs when scrolling big pages or results in iframes, ignore the paint event when the highlighter caused it to fire and pause the highlighter when the document is hidden. r=jaws
This patch implements three different performance optimizations:
1. When the page is marked as 'too big' or there are ranges inside dynamic containers,
   don't draw the white cut-outs whilst scrolling the page.
2. After drawing the highlights (yellow _and_ white boxes, doesn't matter which),
   ignore the next paint event that's fired, because it's self-inflicted.
3. Don't continue to update the modal highlights when the document is not visible
   anymore, e.g. after a tab switch. Kick-off a re-render when the document becomes
   visible again.

MozReview-Commit-ID: vcBSeUYBBs

--HG--
extra : rebase_source : 56408cabff9a7a0eaf87073ae943277e7642b0f8
2018-02-11 14:18:41 +01:00
Andrew McCreight 5dec0e0beb 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

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Kris Maglione 918ed6c474 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 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 6476f95b13 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione c276bb9375 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

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Emilio Cobos Álvarez 8aea8ade34 Bug 1422257: Make FinderHighlighter not use -moz-border-*-colors. r=Gijs
I was going to use box-shadow to make the same effect we have now, but I got
into the intersection logic and I wasn't very excited about rewriting it in
terms of shadow offsets, so came up with this, which IMO looks equally good /
better.

MozReview-Commit-ID: 19xX2zh2tzK

--HG--
extra : rebase_source : 371266623aefd1af27e2c4a21cf792cf3fd3ecf4
2017-12-01 10:48:06 +01:00
Mike de Boer 8678d63172 Bug 1366646 - Include borders and padding when calculating the offset of a window inside an (i)frame. r=jaws
MozReview-Commit-ID: 58fBRcw1lg3

--HG--
extra : rebase_source : 7e125ba0203ce56e9782152b036ab5c26e0a3aa5
2017-10-18 13:58:36 +02:00
Dan Banner 7caa92d5d8 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01:00
Mike de Boer 39112c4528 Bug 1305059 - Adhere to the 'drawOutline' option as passed in by the Finder to decide whether an outline should be visible. r=jaws
MozReview-Commit-ID: 2vVAp5HoKTO

--HG--
extra : rebase_source : 340d69f6e343acdc5b1fa6e26d7947950d2bd05a
2017-10-12 16:57:26 +02:00
Mike de Boer 2dcd3790e0 Bug 1302470 Part 5: Connect up FinderHighlighter.jsm with the new isRangeVisible function. r=mikedeboer
MozReview-Commit-ID: ABfAoZ4CBjP

--HG--
extra : rebase_source : d46fd3205481c0715e0f4ffde71ed056a648fadf
2017-01-23 17:39:07 +01:00
Phil Ringnalda b8183bc0b4 Backed out 6 changesets (bug 1302470) for mochitest-chrome failures
CLOSED TREE

Backed out changeset 3aab8b1494ef (bug 1302470)
Backed out changeset fdd40abac611 (bug 1302470)
Backed out changeset a67bc2f1b624 (bug 1302470)
Backed out changeset 160522290018 (bug 1302470)
Backed out changeset 6b948c533944 (bug 1302470)
Backed out changeset 399011313b3c (bug 1302470)

MozReview-Commit-ID: 2B3uMAkzNGv
2017-08-31 20:04:24 -07:00
Mike de Boer b1b4d0cc5e Bug 1302470 Part 5: Connect up FinderHighlighter.jsm with the new isRangeVisible function. r=mikedeboer
MozReview-Commit-ID: ABfAoZ4CBjP

--HG--
extra : rebase_source : fe4a1673a80b37b2507b930f356f31866c0509ae
2017-01-23 17:39:07 +01:00
Florian Quèze 5e3539e504 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +02:00
Phil Ringnalda b9b730fd1f Backed out 7 changesets (bug 1302470) for mochitest-chrome failures
CLOSED TREE

Backed out changeset de9f42b512c8 (bug 1302470)
Backed out changeset 2394e63f50ff (bug 1302470)
Backed out changeset 3542d7bacbdc (bug 1302470)
Backed out changeset 22793139a866 (bug 1302470)
Backed out changeset cc6ff95187d0 (bug 1302470)
Backed out changeset 033fce5ecd39 (bug 1302470)
Backed out changeset 0bb3e70e5f46 (bug 1302470)

MozReview-Commit-ID: 5DmpbQp335X
2017-04-28 20:12:06 -07:00
Mike de Boer ab63baf3ba Bug 1302470 Part 6: Connect up FinderHighlighter.jsm with the new isRangeVisible function. r=mikedeboer
MozReview-Commit-ID: ABfAoZ4CBjP

--HG--
extra : rebase_source : ee8773fd33327410584240db2a35b80cab5d7733
2017-01-23 17:39:07 +01:00
Sebastian Hengst 4608be37d8 Backed out changeset 726e98cd071e (bug 1302470) 2017-04-21 19:09:11 +02:00
Mike de Boer 5d0044b89a Bug 1302470 Part 6: Connect up FinderHighlighter.jsm with the new isRangeVisible function. r=mikedeboer
MozReview-Commit-ID: ABfAoZ4CBjP

--HG--
extra : rebase_source : 5099f8cd35e3f293bf8a6e791929ddbc054f7c31
2017-01-23 17:39:07 +01:00
Carsten "Tomcat" Book b6ae5cfccc Backed out changeset eb2930fc7c59 (bug 1302470)
--HG--
extra : rebase_source : b7ea38492e4d956798e3dd94230674f1aece0d47
2017-04-21 17:10:35 +02:00
Mike de Boer 0b8a2bd88b Bug 1302470 Part 6: Connect up FinderHighlighter.jsm with the new isRangeVisible function. r=mikedeboer
MozReview-Commit-ID: ABfAoZ4CBjP

--HG--
extra : rebase_source : 24d59c8d804771a5c6d65cc6246dfb457b0f10aa
2017-01-23 17:39:07 +01:00
Mike de Boer e15ac779d7 Bug 1339782 - use a WeakMap to keep track of windows with active findbar highlighters and make sure no JS error occurs when a window is closed. r=jaws
MozReview-Commit-ID: KGdvuWJZzMV

--HG--
extra : rebase_source : 1a854af27787b0a55b132c1429a05515e84f037e
2017-02-27 16:15:12 +01:00
Mike de Boer 75ddc332a5 Bug 1335730 - delete the map entry when a window unloads and is tracked by the FinderHighlighter. r=jaws
MozReview-Commit-ID: 7vJ4HQwNnPp

--HG--
extra : rebase_source : be5f971a7b3a3552245d20b02341405c761e8dc8
2017-02-06 16:25:33 +01:00
Mike de Boer 4811200bb1 Bug 1334213 - listen to scroll events at the capturing phase to make sure to catch them when event propagation is stopped by a script in the current document. Also make sure to always update the yellow range outline position. r=jaws
MozReview-Commit-ID: 8C5uccBFGJ7

--HG--
extra : rebase_source : 7437e7479c597dc8b47b4f12c31ebe3e996c1e91
2017-02-02 14:59:53 +01:00
Florian Quèze bdc1ffa608 Bug 1334831 - script-generated patch to use .remove() instead of .parentNode.removeChild, r=jaws. 2017-01-30 08:10:22 +01:00
Florian Quèze b11907c7aa Bug 1334156 - script-generated patch to replace .ownerDocument.defaultView with .ownerGlobal, r=jaws. 2017-01-27 10:51:03 +01:00
Florian Quèze be4dbae285 Bug 1334199 - script-generated patch to omit getComputedStyle's second argument when it's falsy, r=jaws. 2017-01-27 10:51:02 +01:00
Mike de Boer 0ca886f4ee Bug 1316459 - play range outline animations after its properties have been set as the result of a scheduled repaint of the modal highlighter. r=Gijs
MozReview-Commit-ID: 4xLHwB0l4ja

--HG--
extra : rebase_source : 34e045fb3264ad86e819bd341dab57cd820f77ed
2017-01-23 20:13:07 +01:00
Mike de Boer 6e5d62a6f2 Bug 1316514 - if we attempt to make the 'Highlight All' toggle a global setting, then we need to set the pref when toggled. r=Gijs
What you see first is the removal of the line `this._highlightAll = aHighlight;`, which is repeated in the `_setHighlightAll` method.
This line was put here initially to make the test_findbar_events.xul test pass but in fact makes it so that the pref is never set in `_setHighlightAll`!
In other words, we never actually persisted the 'Highlight All' state properly.
Reading further: the `_dispatchFindEvent` attaches some findbar state flags to the event details, including the value of `_highlightAll`.
Even though none of our consumers use it currently (haven't checked if TB does, though), you can cancel further execution of highlighting all ranges.
Since the `_setHighlightAll` doesn't do that kind of processing, but merely makes sure the internal state is up to snuff, is persisted properly and the buttons are updated, I moved it up to be invoked before dispatching the event.

MozReview-Commit-ID: 4BBy4FR1r5c

--HG--
extra : rebase_source : 204e77aaef3cd55886daeb2e0fdef84da1159c68
2017-01-13 17:27:18 +01:00
Mike de Boer f4e5c815e1 Bug 1324143 - part 3 - disable CPU intensive tasks when the page is too big to bother. r=jaws
MozReview-Commit-ID: CIEc2bYnxOq

--HG--
extra : rebase_source : f23d768de4ac35a4c61e44b9bb3b2f44669f5e74
2017-01-06 13:13:28 +01:00
Mike de Boer 15f7ccaaf7 Bug 1324143 - part 2 - stop doing expensive operations when we don't have to. r=jaws
MozReview-Commit-ID: 8v602Hiam4w

--HG--
extra : rebase_source : 38b29cec7dde482a1277b252ef369368a0e548d6
2017-01-06 13:11:31 +01:00
Mike de Boer 1a8c598c70 Bug 1324143 - part 1 - remove the deprecated '_getRangeContentArray' utility method and its uses, the unused '_maybeHighlightAll' findbar method and cleanup range outline highlighting code. r=jaws
MozReview-Commit-ID: gLKKEd3CoA

--HG--
extra : rebase_source : d9a7d19ac8787b0292a82387df886b8635d9fe43
2017-01-06 13:11:26 +01:00
Jared Wein ecab54a7c9 Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN
MozReview-Commit-ID: 7E7LPorrEje

--HG--
extra : rebase_source : 0572a35415a766a3f31d266760ecd07f0dcc3f72
2016-12-29 18:34:54 -05:00
Wes Kocher 0dfb7c2b5c Backed out 3 changesets (bug 1325464) for xpcshell failures a=backout
Backed out changeset 562ddc32cc21 (bug 1325464)
Backed out changeset cd10db6087dd (bug 1325464)
Backed out changeset 4079437c4648 (bug 1325464)
2016-12-29 14:05:44 -08:00
Jared Wein 7255df4e9a Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN
MozReview-Commit-ID: 8WoGr8i6oCR

--HG--
extra : rebase_source : da7172285d43b820421557ed3b05887e091ff939
2016-12-29 15:20:47 -05:00
Wes Kocher 1b3fc382aa Backed out 5 changesets (bug 1302470) for causing bug 1323200 a=backout
Backed out changeset 005adbf78cd2 (bug 1302470)
Backed out changeset 113f7b13475c (bug 1302470)
Backed out changeset 3d2569996ebc (bug 1302470)
Backed out changeset b92b78271941 (bug 1302470)
Backed out changeset 5b92678afff8 (bug 1302470)


MozReview-Commit-ID: FgeA5OQV8WP

--HG--
extra : histedit_source : 4513cf8271a0bf4d2ca373b5b87aac2c5beeddf9%2C489053b6db62d02f62b4f240fcd9a40fee09dbfb
2016-12-16 16:45:09 -08:00
Mark Banner 4f94e4bd68 Bug 1322343 - Enable no-unused-vars in the local scope in toolkit/.eslintrc.js. r=mossop
MozReview-Commit-ID: CiIsUjQzp4D

--HG--
extra : rebase_source : 1b98e88673625a52ef82c1fad5d56aec3e2e8e80
2016-11-09 22:06:32 +00:00
Phil Ringnalda 0111ff534b Merge m-i to m-c, a=merge
MozReview-Commit-ID: BnSh8kutBaR
2016-12-10 08:27:52 -08:00
Mike de Boer b272d59f6c Bug 1302470 Part 3: Call the new isRangeVisible function to determine whether or not to draw a highlight rect. r=mikedeboer
MozReview-Commit-ID: ExO6zdjHGVO
2016-11-10 09:03:58 -08:00
Sebastian Hengst 7de6273ae5 Backed out changeset 3d34b2ac22a3 (bug 1302470) 2016-11-17 17:49:41 +01:00
Mike de Boer f9050034f4 Bug 1302470 Part 3: Call the new isRangeVisible function to determine whether or not to draw a highlight rect. r=mikedeboer
MozReview-Commit-ID: ExO6zdjHGVO

--HG--
extra : rebase_source : 17ddfcf1a277df7eb02b4eb4b88b3f22c847060b
2016-11-10 09:03:58 -08:00