From e68dd2b284f476acc3660777cde8afade2d7d5db Mon Sep 17 00:00:00 2001 From: Karl Seguin Date: Thu, 23 Apr 2026 11:23:37 +0800 Subject: [PATCH] Clamp insert index Because we don't fully process CSS, indexes that code expect might be out of bounds. The specific case comes from https://github.com/lightpanda-io/browser/issues/2214 which uses fullcalender library. This library uses a @font-face which we do not process and thus end up with incorrect indexes. As a quick workaround aligned with previous fixes for these types of cases (and what the original issue recommended), we simply clamp the index. --- src/browser/tests/css/stylesheet.html | 22 ++++++++++++++++++++++ src/browser/webapi/css/CSSStyleSheet.zig | 14 ++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/browser/tests/css/stylesheet.html b/src/browser/tests/css/stylesheet.html index e242f99d..0dba8165 100644 --- a/src/browser/tests/css/stylesheet.html +++ b/src/browser/tests/css/stylesheet.html @@ -498,6 +498,28 @@ } + +