From 274a2bcfa960d521e36d5cff6cca024d3d27d875 Mon Sep 17 00:00:00 2001 From: ldm0 Date: Sun, 30 Aug 2026 07:53:55 +0800 Subject: [PATCH] fix(geometry): propagate NaN through DOMRect bounds --- .../assets/constructor_templates.rs | 5 ----- .../src/context_bootstrap/dom_rect.rs | 16 ---------------- 2 files changed, 21 deletions(-) diff --git a/moli-renderer-v8/src/context_bootstrap/assets/constructor_templates.rs b/moli-renderer-v8/src/context_bootstrap/assets/constructor_templates.rs index 421eebb0e7..92a6363fa1 100644 --- a/moli-renderer-v8/src/context_bootstrap/assets/constructor_templates.rs +++ b/moli-renderer-v8/src/context_bootstrap/assets/constructor_templates.rs @@ -500,11 +500,6 @@ pub(in crate::context_bootstrap) fn build_constructor_template<'s>( .length(0) .build(scope) } - ConstructorKind::DomRectReadOnly => v8::FunctionTemplate::builder( - super::super::dom_rect::dom_rect_readonly_constructor_callback, - ) - .length(0) - .build(scope), ConstructorKind::DomRect => { v8::FunctionTemplate::builder(moli_webapi_declare::web_api_constructor!( web_api_interfaces::DOMRect, diff --git a/moli-renderer-v8/src/context_bootstrap/dom_rect.rs b/moli-renderer-v8/src/context_bootstrap/dom_rect.rs index bb382dd71e..c91bdb8861 100644 --- a/moli-renderer-v8/src/context_bootstrap/dom_rect.rs +++ b/moli-renderer-v8/src/context_bootstrap/dom_rect.rs @@ -35,22 +35,6 @@ struct DomRectReadOnlyObjectDeclaration { height: f64, } -#[derive(WebApiObject)] -#[webapi(interface = "DOMRectReadOnly")] -struct DomRectReadOnlyObjectDeclaration { - #[webapi(slot = DOM_RECT_BRAND_SLOT, init = true)] - brand: (), - - #[webapi(slot = DOM_RECT_X_SLOT)] - x: f64, - #[webapi(slot = DOM_RECT_Y_SLOT)] - y: f64, - #[webapi(slot = DOM_RECT_WIDTH_SLOT)] - width: f64, - #[webapi(slot = DOM_RECT_HEIGHT_SLOT)] - height: f64, -} - #[derive(WebApiFunctionTemplate)] #[webapi(interface = web_api_interfaces::DOMRectReadOnly)] struct DomRectReadOnlyPrototypeDeclaration {