Commit Graph

221 Commits

Author SHA1 Message Date
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
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
Kris Maglione
cfa1c486ea Bug 1472491: Part 5p - Add ExtFindChild actor. r=mikedeboer f=felipe
MozReview-Commit-ID: 3zL8iYeYAPx
2018-07-29 21:44:48 -07:00
Kris Maglione
3ceea3dedb Bug 1472491: Part 5λ - Add Split RemoteFinder into FinderChild and FinderParent actors. r=gijs
MozReview-Commit-ID: JAv8lh2gJoB
2018-07-30 12:25:58 -07:00
Kris Maglione
40aacaf484 Bug 1472491: Part 5ε - Add PurgeSessionHistoryChild actor. r=mconley
MozReview-Commit-ID: 7oOXuPNsPPG
2018-07-30 10:14:12 -07:00
Kris Maglione
4ff1647be7 Bug 1472491: Part 5δ - Add UnselectedTabHoverChild actor. r=mconley
MozReview-Commit-ID: JYAYb8NshrW
2018-07-30 10:11:41 -07:00
Kris Maglione
87af99e773 Bug 1472491: Part 5γ - Add UITourChild actor. r=MattN
MozReview-Commit-ID: 7Pfu7sSOE1i
2018-07-29 23:47:26 -07:00
Kris Maglione
5c3ca99839 Bug 1472491: Part 5β - Add ShieldFrameChild actor. r=mconley
MozReview-Commit-ID: 5HqAEEO7nJy
2018-07-29 23:45:18 -07:00
Kris Maglione
1129eaf41e Bug 1472491: Part 5α - Add DateTimePickerChild actor. r=mconley
MozReview-Commit-ID: EWTCdNCmE9S
2018-07-29 23:39:17 -07:00
Kris Maglione
0e44116ae0 Bug 1472491: Part 5z - Add WebChannelChild actor. r=markh f=mconley
MozReview-Commit-ID: 1f056kpyJW6
2018-07-29 23:36:12 -07:00
Kris Maglione
a26e48541f Bug 1472491: Part 5y - Add PopupBlockingChild actor. r=mconley
MozReview-Commit-ID: Bw7u8m3xY38
2018-07-29 23:31:39 -07:00
Kris Maglione
c3c8904fdd Bug 1472491: Part 5x - Add SelectionSourceChild actor. r=mconley
MozReview-Commit-ID: 6RioXbevgRO
2018-07-29 23:28:10 -07:00
Kris Maglione
3450f91a50 Bug 1472491: Part 5r - Add PrintingChild actor. r=felipe
MozReview-Commit-ID: K3xcS5TNiQj
2018-07-29 22:05:14 -07:00
Kris Maglione
83b21fe664 Bug 1472491: Part 5q - Add SelectChild actor. r=felipe
MozReview-Commit-ID: J5MAJMbblyr
2018-07-29 21:59:16 -07:00
Kris Maglione
04b9d8689d Bug 1472491: Part 5o - Add FindBarChild actor. r=gijs
MozReview-Commit-ID: IGNjeh8o91l
2018-07-29 21:38:21 -07:00
Kris Maglione
610f809f3d Bug 1472491: Part 5n - Add AudioPlaybackChild actor. r=felipe
MozReview-Commit-ID: DtGNW4riHQX
2018-07-29 21:27:32 -07:00
Kris Maglione
c7c7064436 Bug 1472491: Part 5l - Add OfflineAppsChild actor. r=felipe
MozReview-Commit-ID: Jo8Uqifw7sm
2018-07-29 21:17:41 -07:00
Kris Maglione
a6e4bc987a Bug 1472491: Part 5a - Add BrowserTabChild actor. r=felipe
MozReview-Commit-ID: 38Y1xwkgxCx
2018-07-29 19:42:46 -07:00
Kris Maglione
d9ce0b9f68 Bug 1472491: Part 4a - Add helper classes for lazily loading JS IPC actors. r=felipe
This adds the basic framework for defining IPC actors which are lazily
instantiated for the appropriate frame loaders based on DOM events, message
manager messages, and observers. Actual actors are defined in follow-up
commits.

MozReview-Commit-ID: Jb6CWWW7v3v
2018-08-11 15:27:12 -07:00
Kris Maglione
2ff453e4e5 Bug 1479310: Don't load content-UITour.js until needed. r=Mossop
MozReview-Commit-ID: 55EPBxUYv9o
2018-07-29 12:36:45 -07:00
Brindusan Cristian
fe2a940ebf Backed out changeset 5212e051d039 (bug 1479310) for bc failures on /browser/browser_onboarding_uitour.js. 2018-08-07 20:49:43 +03:00
Kris Maglione
a2719e529a Bug 1479310: Don't load content-UITour.js until needed. r=Mossop
MozReview-Commit-ID: 55EPBxUYv9o
2018-07-29 12:36:45 -07:00
Kris Maglione
a309347f9b Bug 1479318: Minimize the amount of content Findbar code loaded by default. r=felipe
MozReview-Commit-ID: Gu4RyWKmaAz
2018-07-29 14:38:44 -07:00
Cosmin Sabou
073139a2ec Backed out 12 changesets (bug 1479309, bug 1479312, bug 1479313, bug 1479310, bug 1479235, bug 1479945, bug 1479241, bug 1479318) for causing a big performance regression on OS X. a=backout
Backed out changeset 915862a355e9 (bug 1479318)
Backed out changeset f150e62dcbbd (bug 1479241)
Backed out changeset a68daa762119 (bug 1479312)
Backed out changeset 2a5aa9de1fd9 (bug 1479945)
Backed out changeset 163276881d35 (bug 1479945)
Backed out changeset 20a1a11b4d0b (bug 1479945)
Backed out changeset ca43bd11f431 (bug 1479945)
Backed out changeset 71700b368132 (bug 1479945)
Backed out changeset f5d647fae973 (bug 1479313)
Backed out changeset 3583823171de (bug 1479310)
Backed out changeset 2d46e1fe3121 (bug 1479309)
Backed out changeset 8f9c9580f687 (bug 1479235)
2018-08-07 17:30:52 +03:00
Kris Maglione
c56f2bac84 Bug 1479318: Minimize the amount of content Findbar code loaded by default. r=felipe
MozReview-Commit-ID: Gu4RyWKmaAz
2018-07-29 14:38:44 -07:00
Andreea Pavel
a458b6af91 Backed out changeset 177e4adb94d1 (bug 1479318) for failing android on different files on a CLOSED TREE 2018-08-02 03:10:16 +03:00
Kris Maglione
96720fbc27 Bug 1479318: Minimize the amount of content Findbar code loaded by default. r=felipe
MozReview-Commit-ID: Gu4RyWKmaAz
2018-07-29 14:38:44 -07:00
Kris Maglione
7af74e3fba Bug 1479310: Don't load content-UITour.js until needed. r=Mossop
MozReview-Commit-ID: 55EPBxUYv9o
2018-07-29 12:36:45 -07:00
Kris Maglione
e7008c50c1 Bug 1479309: Don't load shield-content-frame.js until needed. r=mythmon
MozReview-Commit-ID: 5usNkHYjifd
2018-07-29 12:29:45 -07:00
alwu
c96fe8806b Bug 1476701 - notify observer when audible autoplay occurred. r=cpearce,jaws
In our autoplay shield-study, we want to collect the information which could tell us how many website
contains audible autoplay media, but there is no way to get this information on current API desigin.

Therefore, I would like to send a new notification when autoplay occurred.

The extension code could get the information by following way,
```
Services.obs.addObserver((subject, topic, data) => {
    // DO SOMETHING
}, "AudibleAutoplayMediaOccurred");
```

MozReview-Commit-ID: 4bSYcxDZOGK
2018-07-25 09:08:44 -07:00
Boris Zbarsky
1b419c917c 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
Kris Maglione
b57496f0be Bug 1474155: Part 3 - Move WebChannel message listeners to a separate JSM. r=mconley
MozReview-Commit-ID: AHCTFDBnChn
2018-07-07 20:15:45 -07:00
Kris Maglione
6d2169d69a Bug 1474155: Part 5 - Null out frame script singleton init methods after they're called. r=mconley
Believe it or not, the memory these references hold alive is significant.
Nulling them out saves 5-10K per process.

MozReview-Commit-ID: JONjE48yE8I
2018-07-07 20:49:30 -07:00
Kris Maglione
31a7a482ad Bug 1474155: Part 2 - Move AutoCompletePopup to a separate JSM. r=mconley
MozReview-Commit-ID: HH2kiS12aEV
2018-07-10 11:57:47 -07:00
Kris Maglione
acff205415 Bug 1474155: Part 1 - Move PopupBlocking to a separate JSM. r=mconley
MozReview-Commit-ID: FbVGSsmt8C3
2018-07-10 11:57:55 -07:00
Chris Pearce
6a59f8fd07 Bug 1472580 - Gesture activate documents which are played via the tab audio indicator. r=mconley
(This patch was first presented for review in bug 1463919, I've split it off
into its own bug here).

If the user opens a tab in the background, and that tab tries to play media,
we'll delay playing that media until the tab is brought to the foreground.
But the user can explicitly start playback of such delayed media by clicking
the "play" icon we show in the tab indicator. Then if autoplay is disabled,
we'll block the play (unless the origin is whitelisted). This is bad, as the
user has clearly indicated intent to play media in this tab.

So this patch "gesture activates" the root content document when the tab audio
indicator play button is pressed. This means the block autoplay logic will
behave as if there's been a user gesture in the tab (mouse click or keypress),
and not block the play. Gesture activation state is per document, so it does
not persist across document loads.

MozReview-Commit-ID: 3pgrADRrJqt
***
fix
2018-07-04 09:32:22 +12:00
Brindusan Cristian
559c33b85e Backed out 2 changesets (bug 1472580) for browser chrome LeakSanitizer failures.
Backed out changeset d3d4619e8133 (bug 1472580)
Backed out changeset 4913ce5ab6cb (bug 1472580)
2018-07-04 03:53:39 +03:00
Chris Pearce
d7670d6de0 Bug 1472580 - Gesture activate documents which are played via the tab audio indicator. r=mconley
(This patch was first presented for review in bug 1463919, I've split it off
into its own bug here).

If the user opens a tab in the background, and that tab tries to play media,
we'll delay playing that media until the tab is brought to the foreground.
But the user can explicitly start playback of such delayed media by clicking
the "play" icon we show in the tab indicator. Then if autoplay is disabled,
we'll block the play (unless the origin is whitelisted). This is bad, as the
user has clearly indicated intent to play media in this tab.

So this patch "gesture activates" the root content document when the tab audio
indicator play button is pressed. This means the block autoplay logic will
behave as if there's been a user gesture in the tab (mouse click or keypress),
and not block the play. Gesture activation state is per document, so it does
not persist across document loads.

MozReview-Commit-ID: 3pgrADRrJqt
***
fix
2018-07-04 09:32:22 +12:00
Tom Schuster
842fbd09b9 Bug 1418033 - Make it possible to disable fast find. r=mikedeboer 2018-05-14 21:49:43 +02:00
Felipe Gomes
69a91cb236 Bug 1467586 - Convert the DateTimePickerListener object into a class to be instantiated when needed. r=mconley
MozReview-Commit-ID: FFXPkLFjJk
2018-06-09 18:46:39 -03:00
Felipe Gomes
331081d0a6 Bug 1467586 - Part 0. hg cp the DateTimePickerListener object to a new file, and rename the DateTimePickerHelper. r=mconley
Since we're naming this new file as DateTimePickerContent, it's also a good opportunity to rename the DateTimePickerHelper to DateTimePickerParent to make it more meaningful

MozReview-Commit-ID: 9xNwUjZb6UF
2018-06-09 18:46:35 -03:00
Felipe Gomes
862ad7f6a6 Bug 1467278 - Lazily instantiate the AutoScrollController when a middle click occurs. r=Gijs,kats
MozReview-Commit-ID: BCpAHzMcubP
2018-06-09 18:42:51 -03:00
Felipe Gomes
fe14bc41fc Bug 1467278 - Part 0 - hg copy the ClickEventHandler code to a new file. r=kats
MozReview-Commit-ID: 2ncvTj8Njbj
2018-06-09 18:42:47 -03:00
Kris Maglione
ca255e9ec8 Bug 1464552: Part 4 - Split selection source helpers into separate JSM. r=felipe
MozReview-Commit-ID: 5ak7dg2umfu
2018-05-25 18:26:32 -07:00
Kris Maglione
5e835d276a Bug 1464552: Part 3 - Split print preview helpers into separate JSM. r=felipe
MozReview-Commit-ID: 59Z0fZIf7Ym
2018-05-25 18:22:09 -07:00
Chris Pearce
91caf2ccc0 Bug 1458383 - Remove browser mediaBlocked attribute. r=mikedeboer
This is a partial backout of Bug 1347791 part 3; a5fbb7e2d1d0.

a5fbb7e2d1d0 added a mediaBlocked attribute to the browser element, which
tracked whether the tab has ever been in the foreground, so that this could
be saved and restored in session restore. We don't session restore this
anymore, so we can remove this attribute and associated event handlers.

This also removes the media.autoplay* pref accesses which are accounted for in
the test browser_preferencecs_usage.js, so remove those prefs from that test.

MozReview-Commit-ID: HLeylLzEsW8
2018-05-09 14:45:39 +12:00
Kris Maglione
fd7e9e6a69 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
2018-04-22 20:55:06 -07:00
Gijs Kruitbosch
6ff3afdc1a Bug 1453421 - stop findbar from looping over every single property, r=mikedeboer
MozReview-Commit-ID: KsrzhUZ167g
2018-04-18 12:02:35 +01:00
Nika Layzell
3d4a532d9d Bug 1434768 - Part 3: Rewrite JS consumers of .sessionHistory, r=bz 2018-04-10 17:49:45 -04:00
Gijs Kruitbosch
03c94e56b1 Bug 1371523 - remove find bar sync ipc message, r=mikedeboer
MozReview-Commit-ID: C0VO0U3UJ76
2018-03-21 17:10:40 +00:00