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,7 +22,7 @@ use crate::script_runtime::CanGc;
#[dom_struct]
pub(crate) struct CSSImportRule {
cssrule: CSSRule,
css_rule: CSSRule,
#[ignore_malloc_size_of = "Stylo"]
#[no_trace]
import_rule: RefCell<Arc<Locked<ImportRule>>>,
@@ -34,7 +34,7 @@ impl CSSImportRule {
import_rule: Arc<Locked<ImportRule>>,
) -> Self {
CSSImportRule {
cssrule: CSSRule::new_inherited(parent_stylesheet),
css_rule: CSSRule::new_inherited(parent_stylesheet),
import_rule: RefCell::new(import_rule),
}
}
@@ -63,7 +63,7 @@ impl SpecificCSSRule for CSSImportRule {
}
fn get_css(&self) -> DOMString {
let guard = self.cssrule.shared_lock().read();
let guard = self.css_rule.shared_lock().read();
self.import_rule
.borrow()
.read_with(&guard)
@@ -75,7 +75,7 @@ impl SpecificCSSRule for CSSImportRule {
impl CSSImportRuleMethods<crate::DomTypeHolder> for CSSImportRule {
/// <https://drafts.csswg.org/cssom-1/#dom-cssimportrule-layername>
fn GetLayerName(&self) -> Option<DOMString> {
let guard = self.cssrule.shared_lock().read();
let guard = self.css_rule.shared_lock().read();
match &self.import_rule.borrow().read_with(&guard).layer {
ImportLayer::None => None,
ImportLayer::Anonymous => Some(DOMString::new()),