From 9a5a33190d3a120b34f5b539f39a0bb9c7132d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20W=C3=BClker?= Date: Thu, 17 Jul 2025 18:43:56 +0200 Subject: [PATCH] Remove Document::set_allow_declarative_shadow_roots (#38143) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This method is unused. `rustc` didn't complain because it was marked as `pub` (which it shouldn't have been). A few of the surrounding methods were also `pub`, which this change fixes. Signed-off-by: Simon Wülker --- components/script/dom/document.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 9eef30aa0a4..5b572df39ad 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -5217,19 +5217,15 @@ impl Document { } /// - pub fn allow_declarative_shadow_roots(&self) -> bool { + pub(crate) fn allow_declarative_shadow_roots(&self) -> bool { self.allow_declarative_shadow_roots.get() } - pub fn set_allow_declarative_shadow_roots(&self, value: bool) { - self.allow_declarative_shadow_roots.set(value) - } - - pub fn has_trustworthy_ancestor_origin(&self) -> bool { + pub(crate) fn has_trustworthy_ancestor_origin(&self) -> bool { self.has_trustworthy_ancestor_origin.get() } - pub fn has_trustworthy_ancestor_or_current_origin(&self) -> bool { + pub(crate) fn has_trustworthy_ancestor_or_current_origin(&self) -> bool { self.has_trustworthy_ancestor_origin.get() || self.origin().immutable().is_potentially_trustworthy() }