mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
script: JSContextify dom/css partially (#44406)
This JSContextifies parts of dom/css directory. Testing: Compilation is the test. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
use std::cell::RefCell;
|
||||
|
||||
use dom_struct::dom_struct;
|
||||
use js::context::JSContext;
|
||||
use js::rust::MutableHandleValue;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::ToCssWithGuard;
|
||||
@@ -14,7 +15,7 @@ use style_traits::ToCss;
|
||||
use super::cssrule::{CSSRule, SpecificCSSRule};
|
||||
use super::cssstylesheet::CSSStyleSheet;
|
||||
use crate::dom::bindings::codegen::Bindings::CSSLayerStatementRuleBinding::CSSLayerStatementRuleMethods;
|
||||
use crate::dom::bindings::reflector::reflect_dom_object;
|
||||
use crate::dom::bindings::reflector::reflect_dom_object_with_cx;
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::bindings::utils::to_frozen_array;
|
||||
@@ -41,18 +42,18 @@ impl CSSLayerStatementRule {
|
||||
}
|
||||
|
||||
pub(crate) fn new(
|
||||
cx: &mut JSContext,
|
||||
window: &Window,
|
||||
parent_stylesheet: &CSSStyleSheet,
|
||||
layerstatementrule: Arc<LayerStatementRule>,
|
||||
can_gc: CanGc,
|
||||
) -> DomRoot<CSSLayerStatementRule> {
|
||||
reflect_dom_object(
|
||||
reflect_dom_object_with_cx(
|
||||
Box::new(CSSLayerStatementRule::new_inherited(
|
||||
parent_stylesheet,
|
||||
layerstatementrule,
|
||||
)),
|
||||
window,
|
||||
can_gc,
|
||||
cx,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user