unrelenting.technology

Hi! You are viewing the archive of unrelenting.technology. This website is no longer updated, my current one is val.packett.cool. Check it out instead :)

Tag #firefox

Ported the Firefox Profiler to FreeBSD in order to investigate why WebRender has some jank when scrolling some walls of text on my 4K/HiDPI setup.

The profiler code initially looked somewhat scary: some Google Breakpad code is used, a custom stack unwinder called LUL is used on Linux (which also partially derived from Breakpad code)…

Initially, I got it working with “pre-symbolication” (an option to build the goblin ELF parser into Firefox for this purpose) only, ifdef’ing any Breakpad code out.

Turns out:

  • the only part of Breakpad used is extracting build IDs from shared objects (and in fact the “base profiler”, a copy (for now) of the Gecko profiler used for profiling during the early startup phase, just copied all the relevant code);
  • devel/breakpad was there in FreeBSD Ports (but expires in like three days!), and its patches showed that it’s really trivial to get all it working.

So I got the main symbolication system working. Which, it turns out, runs WebAssembly-compiled goblin in a web worker! Fun stuff. Requires stripping libxul for now tho.

In the end, the patch turned out to be mostly just ifdef’s! The only meaningful parts are: thr_self/thr_kill2 instead of gettid/tgkill, supporting the different mcontext structs, and (for the pre-symbolication code path) ignoring symbol names returned by dladdr because they’re hilariously bad.

BTW, earlier in the dev-tools-on-FreeBSD space: heaptrack! I even used it to find a real memory leak in Wayfire.

Screenshot of Shadertoy in Firefox, with procstat showing C flag on firefox processes

Firefox content process sandboxing with Capsicum: it’s alive! Work in progress, but I have WebGL and audio working :)

Was wondering for a month why Firefox on my laptop would forget my GitHub session (and some other sessions) after restarting. Turns out “Delete cookies and site data when Firefox is closed” got enabled somehow. Facepalm.

I was wondering why I can’t watch Twitch streams in Firefox… turns out they serve a broken player if your User-Agent does not contain Linux/Windows/macOS. Fail.

AMO front page screenshot, "YouTube boosters" featured section

haha wow my SoundFixer addon is on the addons.mozilla.org front page

The best Cloud-to-Butt replacement I’ve seen yet, thanks to this page:

Butthole was released in 2016 for Firefox to make Buttflare captchas less painful

LOL. MEGA says “use Chrome to download large files because Firefox has a small buffer”. Opened in Chromium… “unzoom or use Firefox because of a zoom rendering bug in Chrome/ium” :D

haha, Phoronix wrote about the stuff I posted on wayland-devel@. So yeah, I’m working on Rust bindings for libweston that would eventually allow me to write the best Wayland compositor ever :)

And fractional HiDPI scaling was pretty easy to add. Wayland apps look awesome. However, X11 apps are blurry now, and bypassing the scaling for Xwayland is not as easy… So I made some changes to my Ports fork to enable Wayland support in more apps. Turns out a lot of complex applications run fine — LibreOffice (!), Inkscape, MyPaint, RawTherapee, Darktable.

The Firefox Wayland support though… is not usable yet :( It looks awesome but EGL isn’t working and, even worse, the screen doesn’t refresh when it needs to — so you’re typing and letters don’t appear until you scroll or some time passes. Hopefully this will be fixed soon.

Wow, Opera 48 converts units, time zones and currencies on text selection. That’s really awesome.

Some WebExtensions attempt similar things but as there’s no native select popover thingy in Firefox, they either add a context menu item (okay) or just edit text inline (please don’t). At least they don’t inject custom UI into the page.

Mozilla finally approved Transmitter! Finally!

If that’s the new “streamlined review process” I can’t imagine how slow the old one was. Although I definitely got into the big initial wave of everyone publishing WebExtensions…

GitHub Gist logo with all round curves displaying as straight angles

Some time ago, Firefox Nightly on Windows displayed SVGs in a… strange way :D

I made a WebExtension! It’s called Transmitter for Transmission. It lets me add torrents to the transmission-daemon instance running on my home server. And watch their status. I think Transmission actually allows you to expose the remote API in desktop versions as well.

tl;dr on WebExtensions: it’s Chrome’s extension API, but with Promises and it’s a W3C standard. Fully supported in Firefox. Chrome/Opera need a tiny polyfill for the Promise support. MS Edge can be supported too.

Publishing experience: Chrome’s store asks for $5 to get your stuff published (one time payment for up to 20 extensions) and there’s no pre-moderation. Addons.Mozilla is pre-moderated but the extension shows up on its URL before approval. Opera is pre-moderated and the extension doesn’t show up before it’s moderated.

Wow, so Firefox on all platforms supports SVG in OpenTypesince October 2014 even! And finally there’s a color emoji font using this. Yes, color emoji in Firefox on UNIX :-)

Note: you should set your GTK font to your preferred font, not “sans-serif”.

TIL: Firefox still doesn’t enable hardware accelerated rendering on X11 by default!

Go to about:support and look at GPU Accelerated Windows to check. about:config: layers.acceleration.force-enabled=true, gfx.xrender.enabled=false.