Firefox/Meeting/26-Jul-2022
Contents
- 1 Friends of the Firefox team
- 2 Project Updates
- 2.1 Add-ons / Web Extensions
- 2.2 WebExtensions Framework
- 2.3 WebExtension APIs
- 2.4 Developer Tools
- 2.5 Toolbox
- 2.6 WebDriver BiDi
- 2.7 ESMification status
- 2.8 Lint, Docs and Workflow
- 2.9 PDFs & Printing
- 2.10 Picture-in-Picture
- 2.11 Performance
- 2.12 Performance Tools (aka Firefox Profiler)
- 2.13 Search and Navigation
- 2.14 This week I learned
Friends of the Firefox team
Resolved bugs (excluding employees)
Script to find new contributors from bug list
Volunteers that fixed more than one bug
- Janvi Bajoria [:janvi01]
- sayuree
- Shane Hughes [:aminomancer]
New contributors (đ = first patch)
- đ camastromonaco removed extraneous CaptivePortalWatcher reference
- Daniel Qeli improved alignment of "Learn more about performance" button with cache headers
- Edward Brace added PiP Subtitles Support for Washington Post
General triage
- Drew Willcoxon, Rob Helmer, Sam Foster, Stephanie Cunnane are this monthâs triagers!
Project Updates
Add-ons / Web Extensions
WebExtensions Framework
As part of the ongoing ManifestVersion 3 (MV3) work:
New unified extensions toolbar button: William Durand has started to work on the new unified extensions UI - Bug 1777481 / Bug 1778722 / Bug 1780782
- The new unified toolbar button is meant to replace the browserAction toolbar buttons but it does not cover all the features that are currently provided by the browserActions toolbar buttons yet. The new toolbar button is currently only enabled when the âextensions.unifiedExtensions.enabledâ preference is explicitly set to true in about:config.
- A huge shout out to both Itiel and James Teh for the great support they provided in the reviews for the unified extensions button!!!
Event Pages (non persistent background pages): In Firefox >= 104, the event page will not be terminated if there is an active connection to a native app through the native messaging APIs (browser.runtime.connectNative and browser.runtime.sendNativeMessage) - Bug 1770696
New web_accessible_resources manifest field syntax: In Firefox >= 104, in the âmatchesâ properties of the web_accessible_resources entries in the manifest_version 3 format supports the â<all_urls>â host permission string - Bug 1776841
WebExtension APIs
- In Firefox >= 104, restricted schemes (eg. âresourcesâ or âchromeâ schemes) are allowed in scripting.registerContentScripts API when called from a (MV2) privileged extension - Bug 1756758
- Fixed a bug with browser.extension.getViews and preloaded browserAction popup pages - Bug 1780008
Starting from Firefox 104, the history WebExtensions API will use internal PlacesUtils.history async API
Some extensions (e.g. DownThemAll! add-on) were calling the history API during startup and so this fix will also result in a startup performance improvement for Firefox users that have extensions using this API and blocking web requests triggered during the Firefox startup.
Huge shout out to Emilio for investigating and fixing this issue!!!
Developer Tools
Toolbox
Many thanks to arai for helping us with instant evaluation issues (bug & bug).
Those patches will prevent the following expression to be instantly evaluated as the user is typing
- [1, 2, 3].map(alert)
- Function.prototype.call.bind(Function.prototype.call)(alert);
We finally added the Evaluation Context Selector in the Browser Console https://bugzilla.mozilla.org/show_bug.cgi?id=1780156
Easily evaluate expression within a Content Process
We fixed a bug for logPoint in the Browser Toolbox where the logs would only appear if the âShow Content Messagesâ setting was checked (bug)
Thanks Tim and Mike for the bug reports!
Julian fixed an issue with debugging addons + reloading (easily triggered when using webext to write your extension) (bug)
Uplifted to ESR
Bomsy worked on a couple things in the Netmonitor we should improve memory usage and performance
- Ochameau is still making progress on Debugger source tree stability and performance (bug, bug, bug and bug, showing decent performance improvement to the Browser Toolbox: DAMP results)
WebDriver BiDi
The team improved the script.evaluate command
Adding support for the awaitPromise argument (https://bugzilla.mozilla.org/show_bug.cgi?id=1770461)
Handling errors (https://bugzilla.mozilla.org/show_bug.cgi?id=1770477)
Handling returned primitive values (https://bugzilla.mozilla.org/show_bug.cgi?id=1770476)
Basic support for script.callFunction (bug) and implementation for
- Support source for log.entryAdded event ( bug )
ESMification status
- ESMification is underway! We have 73 .sys.mjs files and 1287 jsm files, ~5.6%
Assuming you don't have anything complex, Standard8 recommends no more than an hour to do both the .jsm -> .sys.mjs conversion and to convert imports to use .sys.mjs directly using scripts.
Recommend pushing to the try server to check for issues as well.
There are example bugs that have already landed shown on areweesmifiedyet.
If you're working on a bug, add [esmification-timeline] to the whiteboard so that it gets added and everyone can see.
Known issues you might hit:
In attempting to land the address bar conversions, browser_preferences_usage.js fails due to accessing dom.importMaps.enabled too many times. The fix for this is landing today.
The new tab code can't currently cope with defineESModuleGetters. The patches are awaiting review.
- Thereâs an #esmification Matrix room for questions and coordination
Check out this walkthrough to see how to do one of these conversions.
Most of the grunt-work is automated with `./mach esmify`!
Resources links:
Lightning talk slides on how to do ESMification:ESMification
- Are we esmified yet? website
- The phase 1 explainer document
- [dev-platform] emails on ESMification by Arai [1][2][3]
- Example transformation
[mconley] Once youâve done a few of these and gotten used to it, this is a great opportunity to file good-first-bugs and walk new contributors through the process!
Put [lang=js] in the whiteboard, and your Bugzilla email address in the Mentors field, and then be ready to pounce if anybody asks a question in the bug.
Lint, Docs and Workflow
- All node_modules directories should now be excluded from our linters. Previously, if you installed node_modules locally for particular directories, the linters may have picked up issues in those directories.
- Arai has reworked our frame-worker ESLint environment into multiple environments more suited to the different types of environments that we have around the tree. These are now listed on the ESLint documentation page on firefox source docs.
PDFs & Printing
- PDF annotating support is being worked on, and can be tested in Nightly right now! Itâs enabled in Nightly and Early Beta for testing.
Picture-in-Picture
- Janvi is very close to landing her patch to fix hover states and add tooltips for the player window controls!
Janvi added a site-specific wrapper for video.js players! This gives us subtitle/caption support for a number of sites that use that library, including:
Wired.com
Udemy
PBS
ABC News
Funimation
- hiro and florian closed out this bug which can cause the compositor to run at 60hz at all times even when nothing is animating on Windows!
- emilio made chrome windows support document.visibilityState, which means the refresh driver is now throttled in fully occluded background windows.
- Removed the timeline graph type radio buttons (#4147)
- Profiler no longer crashes when the profile data is too big, instead we discard only the profile of the child process that was too big, and we log error messages in the JSON file. Itâs visible in profile.profileGatheringLog from the console. (Bug 1779685, Bug 1758643, Bug 1779367)
- Added a power profiling setting to the profiler popup (Power usage data in Watt is available only on Windows 11 with Intel CPUs and Apple Silicon, but the preset can still be used elsewhere for a low overhead profiling of whatâs causing thread wake-ups) (Bug 1778282) You can change the profiler setting either via profiler popup or about:profiling.
- Added profiler sub-category for Wasm frames (Bug 1780383)
- Added doc for local profiling on android with screenshots. Hereâs the link to the doc. (#4145)
- Hid the user interface components showing stacks for tracks that don't have stack samples (#4133)
:daleharvey made more progress to QuickActions in the URL bar
He added the ability to View Add-ons (addons), View Bookmarks (bookmarks), View Logins (logins, passwords), Open a Private Browsing Window (private), from the URL bar. Try it out by typing out words in the parenthesis in the url bar with QuickActions turned on.
Various fixes related to the feature, namely[1]removed a flash that happens when typing in the url bar and[2]alignment of address bar results.
He also added[3]group title for the results and[4]added the ability to localize the commands to other languages
To enable the feature, create and set browser.urlbar.quickactions.enabled and browser.urlbar.shortcuts.quickactions to true in about:config
We are looking to enable this feature in Nightly shortly, feedback is welcome!
- :jteow changed the default behavior of the URL bar to[5]no longer automatically fixup http addresses
- :adw fixed an issue with adaptive autofill where a host with a prefix like www would not autofill if you re-typed the host in http:// without www
- :daisuke is modifying the Places database to support the Sponsored Tile Offboarding effort
- :standard8 migrated files to ES6 Modules, specifically relevant files in toolkit/components/search and browser/components/search and changed some search consumers to use ESM imports directly. He also[6]modified a couple excluded search files to now be included in the rejected-words linter
- [mconley] Pro-tip: If you have an element with a data-l10n-id, and then you set the textContent on it to override the translation, remember to remove the data-l10n-id.
- [florian] Using EventUtils.synthesizeNativeMouseEvent can cause unexpected test failures in the next tests due to leaving the mouse in an unexpected location. Even in other test folders! (thatâs being fixed) đ
Performance
Performance Tools (aka Firefox Profiler)
Before, we have the âGraph typeâ radio buttons with an additional line
After, we donât have the radio buttons and we reclaimed this space
If you are a power user and would like to use another timeline graph type, you can call window.toggleTimelineType from the devtools console with various types. See the console message in profiler.firefox.com for more details.
about:profiling now includes a âPowerâ setting