Skip to content

Instantly share code, notes, and snippets.

View hjanuschka's full-sized avatar
🤖
-.-

Helmut Januschka hjanuschka

🤖
-.-
  • Vienna/Austria
View GitHub Profile
@hjanuschka
hjanuschka / use-local-jxl-rs.sh
Created March 12, 2026 08:07
Script to switch Chromium between vendored and local jxl-rs checkout (symlinks, bisect, override)
#!/bin/bash
# Switch Chromium to use local jxl-rs checkout for development
# Usage: ./use-local-jxl-rs.sh [setup|restore|status|clean|bisect|override]
set -e
CHROMIUM_SRC="/home/chrome/chromium_2/src"
CHROMIUM_VENDOR="$CHROMIUM_SRC/third_party/rust/chromium_crates_io/vendor"
LOCAL_JXL="$HOME/jxl-rs_1"
BUILD_GN="$CHROMIUM_SRC/third_party/rust/jxl/v0_3/BUILD.gn"
@hjanuschka
hjanuschka / jxl-decoder-rewrite.patch
Created March 12, 2026 07:51
JXL decoder: use frame scanner + seeking for animations, progressive flush
diff --git a/third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder.cc b/third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder.cc
index 5cadd5f76b2b7..995f304d6fffa 100644
--- a/third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder.cc
+++ b/third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder.cc
@@ -16,20 +16,21 @@
namespace blink {
using jxl_rs::jxl_rs_decoder_create;
+using jxl_rs::jxl_rs_frame_scanner_create;
using jxl_rs::jxl_rs_signature_check;
@hjanuschka
hjanuschka / lock.html
Last active February 16, 2026 01:22
screen.orientation.lock() tester for DevTools device emulation (crbug.com/40807290)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>screen.orientation.lock() Test</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
@hjanuschka
hjanuschka / joomla3-fix.patch
Created February 12, 2026 07:55
Fix Joomla 3.x compatibility for captcha.eu plugin - adds fallback for getWebAssetManager()
diff --git a/captcha_eu.php b/captcha_eu.php
index e73a26a..72e549d 100644
--- a/captcha_eu.php
+++ b/captcha_eu.php
@@ -88,10 +88,16 @@ class PlgCaptchacaptcha_eu extends CMSPlugin
$sdkSrc = 'https://www.captcha.eu/sdk.js';
- // Load assets, the callback should be first
- $this->app->getDocument()->getWebAssetManager()
@hjanuschka
hjanuschka / screenshot-2026-02-06_17-32-27.md
Created February 6, 2026 16:33
Wayland app window bubble positioning

screenshot-2026-02-06_17-32-27

@hjanuschka
hjanuschka / pdf-jxl-README.md
Created February 2, 2026 11:31
PDFium JXL-in-PDF bringup artifacts (tar.gz base64)

PDFium JXL-in-PDF bringup artifacts

This gist contains the PDFs + rendered PNG outputs from ~/pdf-jxl/.

Because GitHub gists (via gh gist) don’t support uploading binary files directly, the artifacts are bundled as a tarball and base64-encoded.

Contents

The tarball contains:

  • pdf-jxl/zoltan-jxldecode.pdf
  • pdf-jxl/zoltan-jxldecode.pdf.0.png
@hjanuschka
hjanuschka / jxl-pdfium-one-pager.md
Last active February 2, 2026 09:57
Design Doc: JPEG XL (JXL) image support in PDFium (Rust-only)

One-page overview: JPEG XL (JXL) image decoding in PDFium (jxl-rs, Rust-only)

Overview

Add JPEG XL (JXL) image decoding support to PDFium using jxl-rs, a pure Rust decoder. This enables PDFs that embed JXL-compressed image XObjects (per the upcoming PDF Association / ISO standardization work) to render correctly in PDFium.

JXL benefits:

  • 30–50% better compression than JPEG (typical for photographic content)
  • Lossless JPEG transcoding (recompress JPEG sources without generation loss)
  • Progressive decoding
@hjanuschka
hjanuschka / screenshots.md
Created February 1, 2026 23:02
Chromium bubble fix screenshots

Chromium Bubble Fix Screenshots

Before/After

Screenshot 1

Screenshot 2

@hjanuschka
hjanuschka / 0001-Fix-bubble-positioning-in-app-windows.patch
Created February 1, 2026 22:52
Fix bubble positioning in app windows (Chromium patch)
From b29d44529f19aa24beeaf197838793b8d1b3d1cf Mon Sep 17 00:00:00 2001
From: Helmut Januschka <helmut@januschka.com>
Date: Sun, 1 Feb 2026 23:41:10 +0100
Subject: [PATCH] Fix bubble positioning in app windows
When the toolbar isn't visible (e.g., --app mode), fall back to anchoring
bubbles to the contents view and reposition them to the top-right corner.
---
.../location_bar_bubble_delegate_view.cc | 15 +++++++++++++++
chrome/browser/ui/views/toolbar/toolbar_view.cc | 9 +++++++++
@hjanuschka
hjanuschka / chromium-bubble-fix.patch
Created February 1, 2026 22:52
Fix bubble positioning in app windows
Fix bubble positioning in app windows
When the toolbar isn't visible (e.g., --app mode), fall back to anchoring
bubbles to the contents view and reposition them to the top-right corner.
---
diff --git a/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.cc b/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.cc
index 01a5846cd6d9d..203c9c56c9b8a 100644