From 2789e0299f04661399a825e8562cea668811a3da Mon Sep 17 00:00:00 2001 From: Andrew MacGillivray Date: Tue, 6 May 2025 12:07:12 -0400 Subject: [PATCH] Add missing isPointInFill and isPointInStroke methods to SVGGeometryElement idl Fixes #4507 --- .../src/features/gen_SvgGeometryElement.rs | 30 +++++++++++++++++++ .../webidls/enabled/SVGGeometryElement.webidl | 3 ++ 2 files changed, 33 insertions(+) diff --git a/crates/web-sys/src/features/gen_SvgGeometryElement.rs b/crates/web-sys/src/features/gen_SvgGeometryElement.rs index b31cba8f7de..6b96d1d8ef2 100644 --- a/crates/web-sys/src/features/gen_SvgGeometryElement.rs +++ b/crates/web-sys/src/features/gen_SvgGeometryElement.rs @@ -38,4 +38,34 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SvgGeometryElement`*"] pub fn get_total_length(this: &SvgGeometryElement) -> f32; + # [wasm_bindgen (method , structural , js_class = "SVGGeometryElement" , js_name = isPointInFill)] + #[doc = "The `isPointInFill()` method."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInFill)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgGeometryElement`*"] + pub fn is_point_in_fill(this: &SvgGeometryElement) -> bool; + #[cfg(feature = "DomPointInit")] + # [wasm_bindgen (method , structural , js_class = "SVGGeometryElement" , js_name = isPointInFill)] + #[doc = "The `isPointInFill()` method."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInFill)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `SvgGeometryElement`*"] + pub fn is_point_in_fill_with_point(this: &SvgGeometryElement, point: &DomPointInit) -> bool; + # [wasm_bindgen (method , structural , js_class = "SVGGeometryElement" , js_name = isPointInStroke)] + #[doc = "The `isPointInStroke()` method."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInStroke)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgGeometryElement`*"] + pub fn is_point_in_stroke(this: &SvgGeometryElement) -> bool; + #[cfg(feature = "DomPointInit")] + # [wasm_bindgen (method , structural , js_class = "SVGGeometryElement" , js_name = isPointInStroke)] + #[doc = "The `isPointInStroke()` method."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInStroke)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `SvgGeometryElement`*"] + pub fn is_point_in_stroke_with_point(this: &SvgGeometryElement, point: &DomPointInit) -> bool; } diff --git a/crates/web-sys/webidls/enabled/SVGGeometryElement.webidl b/crates/web-sys/webidls/enabled/SVGGeometryElement.webidl index 28029794c67..305feb31a73 100644 --- a/crates/web-sys/webidls/enabled/SVGGeometryElement.webidl +++ b/crates/web-sys/webidls/enabled/SVGGeometryElement.webidl @@ -17,4 +17,7 @@ interface SVGGeometryElement : SVGGraphicsElement { float getTotalLength(); [NewObject, Throws] SVGPoint getPointAtLength(float distance); + + boolean isPointInFill(optional DOMPointInit point); + boolean isPointInStroke(optional DOMPointInit point); };