script: Use snakecase for variables in CSS implementation files (#42558)

Use snakecase to be consistent. Also these names are normally quite long
already.

Testing: Just renaming.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
Euclid Ye
2026-02-12 17:54:38 +08:00
committed by GitHub
parent 3f3c6a5d90
commit b088ee4697
15 changed files with 166 additions and 156 deletions

View File

@@ -22,10 +22,10 @@ use crate::script_runtime::CanGc;
#[dom_struct]
pub(crate) struct CSSLayerBlockRule {
cssgroupingrule: CSSGroupingRule,
css_grouping_rule: CSSGroupingRule,
#[ignore_malloc_size_of = "Stylo"]
#[no_trace]
layerblockrule: RefCell<Arc<LayerBlockRule>>,
layer_block_rule: RefCell<Arc<LayerBlockRule>>,
}
impl CSSLayerBlockRule {
@@ -34,8 +34,8 @@ impl CSSLayerBlockRule {
layerblockrule: Arc<LayerBlockRule>,
) -> CSSLayerBlockRule {
CSSLayerBlockRule {
cssgroupingrule: CSSGroupingRule::new_inherited(parent_stylesheet),
layerblockrule: RefCell::new(layerblockrule),
css_grouping_rule: CSSGroupingRule::new_inherited(parent_stylesheet),
layer_block_rule: RefCell::new(layerblockrule),
}
}
@@ -56,7 +56,7 @@ impl CSSLayerBlockRule {
}
pub(crate) fn clone_rules(&self) -> Arc<Locked<CssRules>> {
self.layerblockrule.borrow().rules.clone()
self.layer_block_rule.borrow().rules.clone()
}
pub(crate) fn update_rule(
@@ -64,9 +64,9 @@ impl CSSLayerBlockRule {
layerblockrule: Arc<LayerBlockRule>,
guard: &SharedRwLockReadGuard,
) {
self.cssgroupingrule
self.css_grouping_rule
.update_rules(&layerblockrule.rules, guard);
*self.layerblockrule.borrow_mut() = layerblockrule;
*self.layer_block_rule.borrow_mut() = layerblockrule;
}
}
@@ -76,15 +76,15 @@ impl SpecificCSSRule for CSSLayerBlockRule {
}
fn get_css(&self) -> DOMString {
let guard = self.cssgroupingrule.shared_lock().read();
self.layerblockrule.borrow().to_css_string(&guard).into()
let guard = self.css_grouping_rule.shared_lock().read();
self.layer_block_rule.borrow().to_css_string(&guard).into()
}
}
impl CSSLayerBlockRuleMethods<crate::DomTypeHolder> for CSSLayerBlockRule {
/// <https://drafts.csswg.org/css-cascade-5/#dom-csslayerblockrule-name>
fn Name(&self) -> DOMString {
if let Some(name) = &self.layerblockrule.borrow().name {
if let Some(name) = &self.layer_block_rule.borrow().name {
DOMString::from_string(name.to_css_string())
} else {
DOMString::new()