Commit graph

16753 commits

Author SHA1 Message Date
Dan Stillman
0ae2e42ca2 Use proper accent color for the selected autocomplete row
In an autocomplete popup, focus remains in the text field, so the
inactive selection color was being used instead.
2026-08-03 18:59:01 -04:00
Dan Stillman
1dffe21de0 fx153: Don't embed source-repo info in custom Windows builds
Some checks failed
CI / Test (shard 3) (push) Has been cancelled
CI / Test (shard 4) (push) Has been cancelled
CI / Utilities Tests (push) Has been cancelled
CI / Build, Upload (push) Has been cancelled
CI / Test (shard 1) (push) Has been cancelled
CI / Test (shard 2) (push) Has been cancelled
Better fix than d5aacafe3f -- we don't need source-repo info in our
builds at all, so just disable MOZ_INCLUDE_SOURCE_INFO rather than
synthesizing it.
2026-08-03 18:59:01 -04:00
Dan Stillman
d5aacafe3f fx153: Stamp the git source repo and changeset for Windows packaging
Firefox's official-build source-repo.h generator only auto-detects
Mercurial, so building from our git checkout left the file empty and
packaging failed with "no preprocessor directives found". Derive
MOZ_SOURCE_REPO and MOZ_SOURCE_CHANGESET from git in the mozconfig so
configure records them for any invocation, including a manual
./mach package.
2026-08-03 18:32:11 -04:00
Dan Stillman
ea30bbd2af Update version to 11.0 2026-08-03 14:14:05 -04:00
Dan Stillman
72115c3cb4 Set Rust default toolchain before adding the target
Some checks failed
CI / Test (shard 1) (push) Has been cancelled
CI / Test (shard 2) (push) Has been cancelled
CI / Test (shard 3) (push) Has been cancelled
CI / Test (shard 4) (push) Has been cancelled
CI / Utilities Tests (push) Has been cancelled
CI / Build, Upload (push) Has been cancelled
app/win/build added the cross-compilation target to whatever toolchain
was default before switching to RUST_VERSION, so after a Rust version
bump the new toolchain lacked the aarch64/i686 target and the arm and
win32 builds failed at configure. Set the default first.
2026-08-03 13:06:24 -04:00
Dan Stillman
6f3e4b5499 fx153: Update Mozilla patch for Windows 2026-08-03 12:33:59 -04:00
Dan Stillman
e4ee85296c fx153: Update Rust version for Mozilla builds 2026-08-03 12:09:02 -04:00
Dan Stillman
b5ceb6fa65 fx153: Don't assign oncommand attribute strings to .oncommand
Bug 1974578 added oncommand to GlobalEventHandlers for the Invoker
Commands API, so the assignment in _initImportedNodesPostInsert() -- an
inert expando write until now -- started setting the WebIDL event
handler, and [LegacyTreatNonObjectAsNull] turns a string into null. That
wiped the handlers compiled when the pane fragment was imported, leaving
every inline oncommand handler in the preferences panes dead.

importNode() compiles the attribute handlers itself, so the loop can
just be removed.
2026-08-03 11:48:42 -04:00
Dan Stillman
35a70117b0 fx153: Restore the toolbarbutton dropmarker
Bug 1980856 removed both wantdropmarker support and the rule that gave
.toolbarbutton-menu-dropmarker its image, once Firefox's last consumer
stopped using it, so the New Item, Add Attachment, and New Note buttons
lost their chevrons, along with the ones in advanced search, the feed
settings dialog, and Scaffold.

Draw it with a background, since a <dropmarker> doesn't render
list-style-image, and use chevron-6 to match the quick search dropmarker
and the menu marker on our own buttons. The rule also moves out of the
toolbarbutton block, since a plain <button> can host one too.
2026-08-03 11:48:42 -04:00
Dan Stillman
030cd3dc5e fx153: Drop the hover background on native search clear buttons
It runs into the field's focus ring, and we don't use hover effects on
comparable buttons.
2026-08-03 11:48:42 -04:00
Dan Stillman
503bb03aec fx153: Hide the native clear button in search fields
Firefox now creates a clear button for <input type="search"> in chrome
documents regardless of layout.forms.input-type-search.enabled (bug
1655503), which doubled up with the one we draw ourselves.
2026-08-03 11:48:42 -04:00
Dan Stillman
3430ad241b fx153: Keep our own Assets.car in the Mac app
Firefox 153 ships an asset catalog with its own AppIcon, which the merge
from Firefox's Resources copied over ours, so the app got the Firefox
icon.
2026-08-03 11:48:42 -04:00
Dan Stillman
00cad2ced0 Remove 32-bit Linux build support
Mozilla stopped publishing linux-i686 builds after Firefox 144, so there's
no 153 runtime to build against.
2026-08-03 11:48:42 -04:00
Dan Stillman
2bd9342188 Don't inject a platform wizard stylesheet on macOS
There's no mac wizard.css -- the shared one from the global list is all
macOS needs, as on Linux -- so this only produced a missing-file warning
whenever a <wizard> was created.
2026-08-03 11:48:42 -04:00
Dan Stillman
d43dc2fa37 Fail the xulrunner download on an HTTP error
Without -f, curl saves the error page and the download appears to succeed,
so a missing build fails later with a confusing "Unrecognized archive
format" from tar.
2026-08-03 11:48:42 -04:00
Dan Stillman
78d21617af fx153: Hide the about:addons sidebar
The sidebar customizations all broke: the category buttons are
moz-page-nav-buttons now rather than button[name="..."], and the Settings
and Support links moved out of <sidebar-footer> into a secondary nav. The
sidebar also has a heading now that duplicates the main pane's "Manage
Your Plugins", so hide the whole column instead of the pieces.
2026-08-03 11:48:41 -04:00
Dan Stillman
7793b469c9 fx153: Hide the Help button label on macOS
-moz-mac-help-button draws the question mark itself, and the Help label is
now painted over it at the bottom of the settings panes. Firefox hides the
label the same way for the Page Info help button (bug 2009625).
2026-08-03 11:48:41 -04:00
Dan Stillman
8110ab4eea Add a newline after the Zotero prefs in the built prefs file
Babel strips the trailing newline from defaults/preferences/zotero.js, so
the platform-specific prefs appended after it shared a line with the last
Zotero pref.
2026-08-03 11:48:41 -04:00
Dan Stillman
45e38322e1 fx153: Keep backup-constants.mjs
SelectableProfile.sys.mjs now statically imports BackupService, which
statically imports chrome://browser/content/backup/backup-constants.mjs,
so startup failed once SelectableProfileService was instantiated as a
command-line handler.
2026-08-03 11:48:41 -04:00
Dan Stillman
2eba3398e9 fx153: Restore Settings in the macOS application menu
nsMenuBarX now looks for a menuitem with the id menu_settings on Ventura
and later, falling back to menu_preferences only on older versions, so
declare both the way Firefox does.
2026-08-03 11:48:41 -04:00
Dan Stillman
01b7d0667c fx153: Move to nsIPKCS11Token for the NSS key database
Bug 2037682 removed nsIPK11TokenDB in favor of getting the internal key
token directly from @mozilla.org/security/internalkeytoken;1, and bug
2043434 replaced initPassword()/needsUserInit with changePassword().
2026-08-03 11:48:41 -04:00
Dan Stillman
a32dd2b959 fx153: Don't freeze built-ins in the translation sandbox
Bug 2017957 made Cu.Sandbox freeze built-ins by default for
system-principal sandboxes, so the translation framework's assignments to
Promise silently failed and loading the framework threw on
Zotero.Promise.method.
2026-08-03 11:48:41 -04:00
Dan Stillman
6fbe5e4135 fx153: Match XUL boolean attributes in selectors without a value
Bug 2008041 made disabled, checked, hidden, collapsed, and selected
boolean attributes, so their value is empty and [disabled="true"] no
longer matches. Nothing sets any of them to "false", so matching on
presence alone is equivalent.
2026-08-03 11:48:40 -04:00
Dan Stillman
567cc2d43a fx153: Set XUL hidden/collapsed as boolean attributes
Bug 2008041's change to boolean attributes also covers hidden and
collapsed, whose UA selectors became [hidden] and [collapsed], so
setAttribute('hidden', false) now hides the element. Switch the setters
that can be passed a falsy value to toggleAttribute(), read them with
hasAttribute(), and match the [collapsed=true] selectors in our own
stylesheets to the new presence-only form.
2026-08-03 11:48:40 -04:00
Dan Stillman
f245f5c2b2 fx153: Set XUL checked/disabled as boolean attributes
Bug 2008041 made them html-style boolean attributes, so presence alone
means true and setAttribute('disabled', false) now disables the element.
Switch the sites that can be passed a falsy value to toggleAttribute(),
read them with hasAttribute(), and drop a disabled="false" from markup.
Sites that only ever pass true are left alone.
2026-08-03 11:48:40 -04:00
Dan Stillman
bcd8ad20ec fx153: Use command events for checkbox changes
Bug 2009806 moved XUL checkbox click handling into C++ and dropped the
CheckboxStateChange event, so listen for command instead. The event now
only fires on user interaction, so the tests have to click the checkboxes
rather than assign to .checked.
2026-08-03 11:48:40 -04:00
Dan Stillman
eac3838f00 fx153: Use ChromeUtils.predictRemoteTypeForURI() in HiddenBrowser
Bug 2011326 moved remote type prediction into C++ and removed
E10SUtils.predictOriginAttributes() and getRemoteTypeForURI(). The
resulting TypeError meant nothing ever loaded in the hidden browser.
2026-08-03 11:48:40 -04:00
Dan Stillman
bca6537e6d fx153: Allow eval() in the parent process
Translators are evaluated with the system principal, which worked until
now only because nsContentSecurityUtils::IsEvalAllowed() exempted any
profile with "JS hacks" present -- which for us meant
xpinstall.signatures.required being false. Bug 2038660 dropped that
exemption, so ask for eval explicitly.
2026-08-03 11:48:40 -04:00
Dan Stillman
5ea6243384 fx153: ownerGlobal -> documentGlobal
Bug 2033243 renamed the attribute and moved it from EventTarget to Node.
2026-08-03 11:48:40 -04:00
Dan Stillman
3bb3b4f2c9 fx153: Move off the removed synchronous nsILoginManager methods
findLogins() now throws, and removeLogin()/modifyLogin()/removeAllLogins()
are Async-suffixed and return promises. Without this, Zotero couldn't read
the stored API key and showed the corrupted-logins-database error on
startup.

There's no synchronous read left, so Zotero.Sync.Runner.enabled -- which is
consulted from places that can't await -- now reads a value that
hasCredentials() caches.
2026-08-03 11:48:39 -04:00
Dan Stillman
1c005c7e21 fx153: Re-enable chrome: DTD loading
Bug 2043845 put the FORCE_ALLOWED_DTD content policy type behind a pref
that's off for everything but Thunderbird, so NS_NewChannel() refused the
load with NS_ERROR_CONTENT_BLOCKED and the XML parser silently skipped the
entity. Custom elements whose markup uses DTD entities then failed to
parse with "not well-formed XML".
2026-08-03 11:48:39 -04:00
Dan Stillman
14b43c9559 fx153: Disable Firefox's baseline CSP for chrome: documents
Bug 2038660 applies "script-src chrome: resource: moz-src:" to every
chrome: document, which blocks inline <script>s and inline event
handlers, so the main window loaded but ran none of its scripts.

We should move our inline scripts and event handlers into separate files
so that we can drop the pref.
2026-08-03 11:48:39 -04:00
Dan Stillman
b7232f130f fx153: Don't remove the Pocket actor, removed from Firefox 2026-08-03 11:48:39 -04:00
Dan Stillman
c192127ab1 fx153: Take over <search-textbox>, removed from Firefox
Mozilla removed the widget and its stylesheet in bug 1968916 without a
drop-in replacement, so bring both into Zotero. The two rules that lived
in Firefox's UA sheets (text-shadow and -moz-window-dragging) move to
_search.scss, and the aria-autocomplete removal that fetch_xulrunner
used to patch in is now part of the widget itself.
2026-08-03 11:48:39 -04:00
Dan Stillman
d701c43862 fx153: Restore autocomplete popup sizing from the anchor element
Firefox now sizes autocomplete popups to their content (bug 2045828), so
add the --panel-width calculation back instead of adjusting it.
2026-08-03 11:48:39 -04:00
Dan Stillman
06848ce17f fx153: Update about:addons patches for the ES module split
aboutaddons.js and aboutaddonsCommon.js were split into
aboutaddons-utils.mjs plus per-component modules under components/, and
the addon details template moved out of aboutaddons.html into
addon-details.mjs.

The unsigned-addon warning is now suppressed through Firefox's own
isUnsignedWarningMessageDisabled(), which is otherwise gated on
MOZILLA_OFFICIAL.
2026-08-03 11:48:38 -04:00
Dan Stillman
408179ad09 fx153: Anchor the actor-removal patterns in ActorManagerParent
AboutTranslations and the PictureInPicture actors moved out of the
JSWINDOWACTORS literal into conditional assignments after it.

Anchor every pattern to the start of the line while we're here, since
'PictureInPicture: {' matched the MozTogglePictureInPicture event name in
the new file and silently deleted everything through the next '  },'.
2026-08-03 11:48:38 -04:00
Dan Stillman
242bbccda5 Update Mac and Linux builds to Firefox 153.0esr 2026-08-03 11:48:38 -04:00
Dan Stillman
fdd3434349 Update English strings for Transifex 2026-08-03 11:12:15 -04:00
Dan Stillman
c9d5aa3c8e Use general strings for file renaming prompt buttons
The invalid-template prompt had its own strings for "Go Back" and
"Reset to Default".
2026-08-03 11:08:55 -04:00
Dan Stillman
d54327a045 Fix retracted-item icon spacing in items list
Some checks failed
CI / Test (shard 1) (push) Has been cancelled
CI / Test (shard 2) (push) Has been cancelled
CI / Test (shard 3) (push) Has been cancelled
CI / Test (shard 4) (push) Has been cancelled
CI / Utilities Tests (push) Has been cancelled
CI / Build, Upload (push) Has been cancelled
The gap after the icon came from whitespace baked into the legacy
cross.png, so it disappeared when the icon switched to the
edge-to-edge cross.svg and the title abutted the icon.
2026-08-01 10:42:29 -04:00
Mynacol
b5ea455c1f
Fix release build on x86 mac (#5926)
Some checks are pending
CI / Test (shard 1) (push) Waiting to run
CI / Test (shard 2) (push) Waiting to run
CI / Test (shard 3) (push) Waiting to run
CI / Test (shard 4) (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
While trying to [fix](https://github.com/NixOS/nixpkgs/pull/519431) another issue in the Zotero package for nixpkgs, I discovered a new bug. When setting a non-`source` update channel, the build fails on MacOS with x86 architectures.

The build fails with:
```
source not found twice in ChannelPrefs

source

stringWithCString:encoding:
```
Which definitely means it is caused by the `strings` command [here](https://github.com/zotero/zotero/blob/main/app/mac/set-channel-prefs-channel#L29).

When manually executing the strings command on the file, I can repeat getting only one `source` result on x86 mac, while getting two on arm64 or linux. After digging around, I tried with the flag `-arch all`, and both `source` values are found on x86 mac. Full command: `strings -n 3 -arch all $binary`.
2026-07-31 13:41:33 -04:00
Adomas Venčkauskas
9c03a93e00
Fix tree multi-selection collapse/expand behaviour (#5983)
Closes #5974.

Additional fixes for broken item tree behaviour when multiple items are
selected, and changing focus with ctrl/cmd-arrow keys.

Aligned Collection Tree/Virtualized Tree collapse/expand behaviour when
multiple containers are selected, one of them is focused, and arrow key
left-right is pressed, to the behaviour in Item Tree - now all of them
are collapsed/expanded.

---------

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2026-07-31 13:25:01 -04:00
Martynas Bagdonas
a7cae87be8
Improve undo/redo in the note editor (#3398)
- Fix "redo" command not enabled in the note editor
- Centralize note editor undo and redo commands
- Update note editor submodule

Co-authored-by: Tom Najdek <tom@doppnet.com>
2026-07-31 14:22:53 +02:00
Dan Stillman
4ec5ba9c27 Don't fail translation on open-access lookup error 2026-07-30 20:59:07 -04:00
Dan Stillman
7abcf23ef7 Move PMC lookup after open-access lookup
The PMC lookup in #5906 was added before the OA lookup, but the OA
lookup often returns a PMC URL of its own (including, at least now, for
the DOI given in the PR), with a direct file URL rather than a page to
scrape, so try it first and fall back to the PMCID-derived URL only when
it turns up nothing.
2026-07-30 20:56:28 -04:00
Dan Stillman
8bebaf0ead Fix open-access lookup for PMCID items during in-app translation
Since #5906, the 'oa' resolver list can start with a plain URL object
for items with a PMCID, but _getOpenAccessPDFURLs() and
saveOpenAccessAttachment() called resolvers[0](), which threw for those
items -- skipping the lookup silently in the first case and failing the
save in the second.
2026-07-30 20:55:16 -04:00
Dan Stillman
80658e928e Handle download challenge on PubMed Central
PMC now returns a proof-of-work challenge page in place of the PDF.
2026-07-30 16:49:59 -04:00
Dan Stillman
4388f6da20 Drop redundant charset extraction in blobToText()
readAsText() already reads the charset from the blob's type when no
encoding is passed, so pulling it out first had no effect. The regex
was also missing a quantifier and captured a single character, which
readAsText() discarded as an unrecognized label.
2026-07-30 15:49:43 -04:00
Dan Stillman
9ed00c843d Don't update read status when using Show File
Some checks are pending
CI / Test (shard 1) (push) Waiting to run
CI / Test (shard 2) (push) Waiting to run
CI / Test (shard 3) (push) Waiting to run
CI / Test (shard 4) (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
Show File triggered a file 'open' notification, so revealing a file
moved its item to the top of Recently Read. Use a separate 'reveal'
event, which file syncing still observes to queue a modification check.

https://forums.zotero.org/discussion/133006/
2026-07-30 13:43:41 -04:00