Commit Graph

80 Commits

Author SHA1 Message Date
Brian Grinstead
5caf04c8f7 Bug 1553188 - Part 4 - Update remaining references to browser.xul;r=bdahl
These are generally:
- Code comments to browser.xhtml
- Testcases, assertions that were mostly using browser.xul as a generic chrome URL
- References to the browser.xul path in tree

Differential Revision: https://phabricator.services.mozilla.com/D33208
2019-05-28 16:40:42 -07:00
Brian Grinstead
3a8b6c2114 Bug 1553188 - Part 3 - Support eslint for browser.xhtml;r=Standard8
Since it's not a xul document anymore we can't rely on the xul.js lint preprocessor.
This means we need to remove preprocessor attributes from inline scripts, and tell
lint about the browser window environment.

Differential Revision: https://phabricator.services.mozilla.com/D33207
2019-05-30 09:30:21 -07: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
Brendan Dahl
a7006bcba9 Bug 1527977 - Share XUL prototype cache with XUL and XHTML. r=smaug
Create a new parser (PrototypeDocumentParser) and content sink
(PrototypeDocumentContentSink) that can be used by both XUL and XHTML.

The new parser moves the code from XULDocument that handles creating and
loading a nsXULPrototypeDocument from either the cache or the source
file. Once the parser has finished loading the prototype it notifies the
content sink. The parser is largely a stub and would be better suited
for use as a nsBaseParser, but nsHTMLDocument unfortunately needs an
nsIParser.

The new content sink has the XULDocument code responsible for the
prototype traversal that creates the DOM (XULDocument::ResumeWalk and
friends) and fires off various events.

To unify XUL and XHTML, the XHTML readystate event sequence is used in
XUL. However, the layout path of XHTML loaded from the prototype cache
more closely follows XUL, where frame initializers and layout don't
start until the entire DOM is built.

Differential Revision: https://phabricator.services.mozilla.com/D21236
2019-03-09 01:00:23 +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
Dão Gottwald
7d8b412c97 Bug 1510579 - Load scripts in global-scripts.inc the same way browser.xul does. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D13237
2018-11-28 16:13:16 +00:00
Dão Gottwald
29b000b09b Bug 1509309 - Move most browser-*.js scripts from global-scripts.inc to browser.xul. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D13064
2018-11-27 21:55:21 +00:00
Dão Gottwald
c080ee4c28 Bug 1508963 - Load browser-siteIdentity.js lazily. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D12521
2018-11-21 17:09:23 +00:00
Dão Gottwald
7d72afae11 Bug 1508590 - Load searchbar.js from browser.xul rather than global-scripts.inc. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D12406
2018-11-21 02:18:32 +00:00
Dão Gottwald
3fc79275ce Bug 1506261 - Convert search-one-offs from a custom element to a plain JS class and initialize it lazily. r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D11889
2018-11-17 08:46:35 +00:00
Cosmin Sabou
8d0425cd85 Backed out changeset 10a5af6d30df (bug 1506261) for causing window leaks on OSX debug. CLOSED TREE 2018-11-15 10:53:29 +02:00
Dão Gottwald
6935b86814 Bug 1506261 - Convert search-one-offs from a custom element to a plain JS class and initialize it lazily. r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D11889
2018-11-15 00:55:31 +00:00
Brian Grinstead
351e034123 Bug 1493536 - Convert search-one-offs binding to custom element;r=dao
Differential Revision: https://phabricator.services.mozilla.com/D9710
2018-10-25 09:36:15 +00:00
Gijs Kruitbosch
fa4965716a Bug 1477669 - remove feed preview code and associated files/code, r=flod,mak,nika
Differential Revision: https://phabricator.services.mozilla.com/D8524
2018-10-16 12:47:36 +00:00
Brian Grinstead
f5fda6062b Bug 1460982 - Convert <searchbar> to a Custom Element;r=adw
Differential Revision: https://phabricator.services.mozilla.com/D5912
2018-09-27 23:09:55 +00:00
Brendan Dahl
138e79ac2d Bug 1482256 - Support switching to browser.xul to browser.xhtml. r=mossop
Adds a new environment variable MOZ_BROWSER_XHTML to change Firefox to load
a modified version of browser.xul as browser.xhtml. Adds the xhtml
namespace to the script tags to make them work.

MozReview-Commit-ID: 2adtOVzXHKd
2018-08-14 13:13:38 -07:00
Dorel Luca
1a132cf04b Backed out changeset 9aae17d0e090 (bug 1482256) for browser-chrome failures on browser/base/content/test/static/browser_all_files_referenced.js. CLOSED TREE 2018-08-14 05:33:44 +03:00
Brendan Dahl
0a0fc9eeec Bug 1482256 - Support switching to browser.xul to browser.xhtml. r=mossop
Adds a new environment variable MOZ_BROWSER_XHTML to change Firefox to load
a modified version of browser.xul as browser.xhtml. Adds the xhtml
namespace to the script tags to make them work.

MozReview-Commit-ID: 2adtOVzXHKd
2018-08-13 14:39:47 -07:00
Johann Hofmann
4f70cfcab3 Bug 1476218 - Part 1 - Update Tracking Protection section in the identity popup for Content Blocking. r=nhnt11
This commit switches the identity popup to use "Content Blocking" as a top-level section
instead of Tracking Protection, which is now demoted to a category of Content Blocking.

To keep this change halfway reviewable, I avoided renaming variables, classNames, ids, etc.
that use the term trackingProtection if they were otherwise unaffected by this patch. There
will be other patches that can do this in the future

Differential Revision: https://phabricator.services.mozilla.com/D2775
2018-08-06 12:43:59 +02:00
Prathiksha
31c4b9f813 Bug 1440247 - Move gIdentityHandler into its own file (browser-siteIdentity.js). r=johannh
MozReview-Commit-ID: CsOzYthmrgl
2018-03-29 19:21:50 +05:30
Brendan Dahl
8a8bb26748 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
2018-03-12 10:43:35 -07:00
Dão Gottwald
3f43e08bd6 Bug 1442651 - Remove the tabbrowser element and binding. r=bgrins
MozReview-Commit-ID: 2IXukkFq5C2
2018-03-05 20:33:36 +01:00
Brendan Dahl
6021e79769 Bug 1441378 - Replace baseMenuOverlay.xul with inlining and preprocessing. r=Gijs
The overlay defined two elements (helpMenu, menu_ToolsPopup) for all
platforms and three others (windowMenu, baseMenuCommandSet, baseMenuKeyset)
that were MacOS only. The two all platform elements and windowMenu were only
used once and inlined into browser-menubar.inc. The rest of the MacOS only
elements were conditionally inlined into browser-sets.inc.

MozReview-Commit-ID: D2uyCrnepuH
2018-02-26 16:49:34 -08:00
Brian Grinstead
938da9ee8f Bug 1392352 - Part 2 - Translate the tabbrowser implementation into a JS class;r=mconley,r=dao CLOSED TREE
We keep the XBL binding around for <content>, <constructor>, and <destructor>. This can
eventually be migrated to a Custom Element once we have platform support, but in the meantime
this is a way to get the many thousands of LOC into a JS class.

MozReview-Commit-ID: 1dCQp527yF9
2018-02-27 10:04:14 -08:00
Kris Maglione
1e99372ec0 Bug 1384714: Use subscript loader to load browser.xul scripts. r=Mossop
There's a lot of overhead to loading scripts from <script> tags in
browser.xul. They're loaded asynchronously, and can't begin loading until
after we begin loading browser.xul. They're loaded using off-main-thread
compilation, which means we need to create and merge a new JS zone for each
script we load that way. They don't benefit from the startup cache at all.

If we load those scripts using the subscript loader, they're loaded from the
preloader cache, and begin loading as early as possible. And they're all
loaded into a single off-thread zone, which means there are less zones to
create and merge. From a quick test, this seems to save about 20-40ms on
Windows ts_paint talos runs.

The main downside is that subscript loader scripts don't benefit from lazy
parsing, so we might wind up increasing memory usage if most of the functions
in those scripts aren't used very often. But we should hopefully be able to
fix that by migrating more browser JS to lazy loading.

MozReview-Commit-ID: Lozb0d0QweC
2017-07-25 20:56:37 -07:00
Brian Grinstead
1639cc6e15 Bug 1385452 - Add a keyboard shortcut in local builds to restart the browser;r=mossop
MozReview-Commit-ID: Du4PTPawzhm
2017-08-08 11:35:47 -07:00
Drew Willcoxon
4611af424f Bug 1374477 - Add browser-pageActions.js for Photon page actions. r=Gijs
MozReview-Commit-ID: DUl7WlSnk4k
2017-07-29 20:24:58 -07:00
Florian Quèze
3f2180c26f Bug 1381853 - lazy load browser-thumbnails.js into the browser window, r=mconley. 2017-07-23 00:17:59 +02:00
Florian Quèze
24a053cb8d Bug 1381853 - lazy load browser-sync.js into the browser window, r=mconley. 2017-07-23 00:17:59 +02:00
Florian Quèze
8a541878c5 Bug 1381853 - lazy load browser-social.js into the browser window, r=mconley. 2017-07-23 00:17:59 +02:00
Florian Quèze
41a3775df3 Bug 1381853 - lazy load browser-safebrowsing.js into the browser window, r=mconley. 2017-07-23 00:17:58 +02:00
Florian Quèze
4f18b57bbb Bug 1381853 - Remove browser-refreshblocker.js and move its code to tabbrowser.xml, avoiding the RefreshBlocked event completely, r=mconley. 2017-07-23 00:17:58 +02:00
Florian Quèze
a72f907c5f Bug 1381853 - lazy load browser-gestureSupport.js into the browser window, r=mconley. 2017-07-23 00:17:58 +02:00
Florian Quèze
50fea258c7 Bug 1381853 - lazy load browser-fullScreenAndPointerLock.js into the browser window, r=mconley. 2017-07-23 00:17:57 +02:00
Florian Quèze
441e30cff4 Bug 1381853 - lazy load browser-customization.js into the browser window, r=mconley. 2017-07-23 00:17:57 +02:00
Florian Quèze
72c7bf79a4 Bug 1381853 - lazy load browser-ctrlTab.js into the browser window, r=mconley. 2017-07-23 00:17:57 +02:00
Florian Quèze
f0035bea93 Bug 1381853 - lazy load browser-addons.js into the browser window, r=mconley. 2017-07-23 00:17:57 +02:00
Florian Quèze
fbb9f92668 Bug 1381853 - lazy load viewSourceUtils.js into the browser window, r=mconley. 2017-07-23 00:17:56 +02:00
Florian Quèze
297c9e8335 Bug 1381853 - lazy load panelUI.js into the browser window, r=mconley. 2017-07-23 00:17:56 +02:00
Florian Quèze
3fa089754c Bug 1381853 - lazy load browserPlacesViews.js into the browser window, r=mconley. 2017-07-23 00:17:56 +02:00
Florian Quèze
3d74a9e644 Bug 1381853 - load viewZoomOverlay.js and browser-fullZoom.js into the browser window lazily, r=mconley. 2017-07-23 00:17:55 +02:00
Florian Quèze
bdb041710a Bug 1381853 - load printUtils.js into the browser window lazily, r=mconley. 2017-07-23 00:17:55 +02:00
Edouard Oger
bf97626bd8 Bug 1353571 part 3 - Refactor browser-syncui and browser-fxaccounts. r=markh
MozReview-Commit-ID: K790Ag8WZgv
2017-04-18 14:15:43 -04:00
Sebastian Hengst
6471972ae8 Backed out changeset 0a0138825fb5 (bug 1353571) 2017-05-03 21:56:44 +02:00
Edouard Oger
c9a99ae676 Bug 1353571 part 3 - Refactor browser-syncui and browser-fxaccounts. r=markh
MozReview-Commit-ID: K790Ag8WZgv
2017-04-18 14:15:43 -04:00
Mark Banner
1b6f3efb6e Bug 1352969 - Fix various ESLint no-undef issues in browser/base (no-undef is not enabled yet). r=mossop
MozReview-Commit-ID: BuTyJAfUoWR
2017-02-22 17:02:59 +00:00
Nihanth Subramanya
882395b6f6 Bug 1313568 - Handle captive portal UI in per-window script. r=MattN
MozReview-Commit-ID: FxjE2NblJe4
2017-01-08 03:23:09 +01:00
Brian Grinstead
736b5301b8 Bug 1314091 - Rename devedition.* to compacttheme.*;r=Gijs
MozReview-Commit-ID: 9y9BTK2TeAr
2017-01-13 11:53:58 -08:00
Eric Rahm
7e595b6484 Bug 1312143 - Delete toolkit/obsolete. r=John-Galt
This removes the obsolete toolkit directory. A few references to dialogOverlay
have been updated to just used <dialog> directly. The InlineSpellCheckerUI var
has also been moved directly to browser.js and defined as lazy getter.

MozReview-Commit-ID: JZfi0W2wqCL
2016-10-24 18:23:24 -07:00
Jared Wein
05088cc7cb Bug 336290 - remove --enable-safe-browsing from configure since its used everywhere. r=gcp
MozReview-Commit-ID: Duwu5vZOhtF
2016-08-31 19:28:29 -04:00