feat: Add Arc's boosts implementation, b=no-bug, c=boosts#11071
feat: Add Arc's boosts implementation, b=no-bug, c=boosts#11071mr-cheffy merged 136 commits intozen-browser:boostsfrom
Conversation
|
I love this so much! |
|
I've added the boilerplate code we should use in order to change how firefox renders colors for certain shells. If you could make it in a window instead of a popup, it would be great via using |
Remove unecessary ZenBoosts.mjs Update ZenBoostsEditor to be a module
Add animated sparkle icon to control center if site is boosted Fix bad management with the boost/registered css sheet maps Remove boost-editor.inc and references
…bug, c=no-component
|
Nice work! We’re almost finished! |
There was a problem hiding this comment.
Pull request overview
This PR implements a comprehensive Boosts feature inspired by Arc browser, allowing users to customize website appearance through font changes, color themes, smart color inversion, element hiding (zapping), and custom CSS injection. The implementation spans across multiple layers including C++ backend for color manipulation, JavaScript managers and actors for coordination, and UI components for user interaction.
Changes:
- Added backend color manipulation system with C++ patches to Firefox's rendering engine
- Implemented boost management system with storage, style generation, and actor-based communication
- Created UI components including boost editor window, element selector, and zap overlay with WebGL dissolve effects
Reviewed changes
Copilot reviewed 50 out of 70 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/zen/boosts/nsZenBoostsBackend.cpp/h | Core C++ backend for color filtering and inversion |
| src/zen/boosts/ZenBoostsManager.sys.mjs | Main boost management, storage, and coordination |
| src/zen/boosts/actors/*.sys.mjs | Parent/child actor communication for content process |
| src/zen/boosts/ZenSelectorComponent.sys.mjs | Element selection and CSS path generation |
| src/zen/boosts/ZenZapDissolve.sys.mjs | WebGL-based dissolve animation for zapped elements |
| src/zen/urlbar/ZenSiteDataPanel.sys.mjs | Integration with site data panel UI |
| src/layout/*/patches | Patches to Firefox rendering engine for color manipulation |
| src/zen/tests/boosts/*.js | Unit tests for selector component |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| void BrowsingContext::DidSet(FieldIndex<IDX_ZenBoostsData>, | ||
| ZenBoostData aOldValue) { | ||
| MOZ_ASSERT(IsTop()); | ||
| if (ZenBoostsData() == aOldValue) { |
There was a problem hiding this comment.
Missing early return if appInfo is null. If do_GetService fails and returns null, calling GetInSafeMode on a null pointer will crash. Add a check: if (!appInfo) { mEnabled = !inSafeMode && ...; return; }
| this.getElementById("selector-element-preview-text").innerHTML = | ||
| `<b>[${selection.length}]</b> ${selectionPath.substring(0, Math.min(maxPathLength, selectionPath.length))}`; |
There was a problem hiding this comment.
Potential XSS vulnerability: Using innerHTML without sanitization. The selectionPath variable comes from user-controlled CSS selectors and is directly inserted into the DOM. Use textContent instead of innerHTML or sanitize the input properly.
Signed-off-by: fen4flo <75260616+FlorianButz@users.noreply.github.com>
…=no-bug, c=no-component



This PR aims to implement a basic version of the Boosts feature from Arc. This currently features font customization, theme customization and smart inverting.
ScreenRecording_Boosts.mp4