mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Move DOMRefCell back into script.
We’re not using it in style after all.
This commit is contained in:
parent
89a29a7f12
commit
c831369e3e
4 changed files with 5 additions and 8 deletions
|
@ -4,15 +4,14 @@
|
||||||
|
|
||||||
//! A shareable mutable container for the DOM.
|
//! A shareable mutable container for the DOM.
|
||||||
|
|
||||||
use refcell::{BorrowError, BorrowMutError, Ref, RefCell, RefMut};
|
use style::refcell::{BorrowError, BorrowMutError, Ref, RefCell, RefMut};
|
||||||
use thread_state;
|
use style::thread_state;
|
||||||
|
|
||||||
/// A mutable field in the DOM.
|
/// A mutable field in the DOM.
|
||||||
///
|
///
|
||||||
/// This extends the API of `core::cell::RefCell` to allow unsafe access in
|
/// This extends the API of `core::cell::RefCell` to allow unsafe access in
|
||||||
/// certain situations, with dynamic checking in debug builds.
|
/// certain situations, with dynamic checking in debug builds.
|
||||||
#[derive(Clone, PartialEq, Debug)]
|
#[derive(Clone, PartialEq, Debug, HeapSizeOf)]
|
||||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
|
||||||
pub struct DOMRefCell<T> {
|
pub struct DOMRefCell<T> {
|
||||||
value: RefCell<T>,
|
value: RefCell<T>,
|
||||||
}
|
}
|
|
@ -128,9 +128,8 @@
|
||||||
//! return `Err()` from the method with the appropriate [error value]
|
//! return `Err()` from the method with the appropriate [error value]
|
||||||
//! (error/enum.Error.html).
|
//! (error/enum.Error.html).
|
||||||
|
|
||||||
pub use style::domrefcell as cell;
|
|
||||||
|
|
||||||
pub mod callback;
|
pub mod callback;
|
||||||
|
pub mod cell;
|
||||||
pub mod constant;
|
pub mod constant;
|
||||||
pub mod conversions;
|
pub mod conversions;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
|
|
|
@ -35,6 +35,7 @@ use cssparser::RGBA;
|
||||||
use devtools_traits::CSSError;
|
use devtools_traits::CSSError;
|
||||||
use devtools_traits::WorkerId;
|
use devtools_traits::WorkerId;
|
||||||
use dom::abstractworker::SharedRt;
|
use dom::abstractworker::SharedRt;
|
||||||
|
use dom::bindings::cell::DOMRefCell;
|
||||||
use dom::bindings::js::{JS, Root};
|
use dom::bindings::js::{JS, Root};
|
||||||
use dom::bindings::refcounted::{Trusted, TrustedPromise};
|
use dom::bindings::refcounted::{Trusted, TrustedPromise};
|
||||||
use dom::bindings::reflector::{Reflectable, Reflector};
|
use dom::bindings::reflector::{Reflectable, Reflector};
|
||||||
|
@ -89,7 +90,6 @@ use std::sync::mpsc::{Receiver, Sender};
|
||||||
use std::time::{SystemTime, Instant};
|
use std::time::{SystemTime, Instant};
|
||||||
use string_cache::{Atom, Namespace, QualName};
|
use string_cache::{Atom, Namespace, QualName};
|
||||||
use style::attr::{AttrIdentifier, AttrValue, LengthOrPercentageOrAuto};
|
use style::attr::{AttrIdentifier, AttrValue, LengthOrPercentageOrAuto};
|
||||||
use style::domrefcell::DOMRefCell;
|
|
||||||
use style::element_state::*;
|
use style::element_state::*;
|
||||||
use style::properties::PropertyDeclarationBlock;
|
use style::properties::PropertyDeclarationBlock;
|
||||||
use style::selector_impl::{ElementSnapshot, PseudoElement};
|
use style::selector_impl::{ElementSnapshot, PseudoElement};
|
||||||
|
|
|
@ -90,7 +90,6 @@ pub mod context;
|
||||||
pub mod custom_properties;
|
pub mod custom_properties;
|
||||||
pub mod data;
|
pub mod data;
|
||||||
pub mod dom;
|
pub mod dom;
|
||||||
pub mod domrefcell;
|
|
||||||
pub mod element_state;
|
pub mod element_state;
|
||||||
pub mod error_reporting;
|
pub mod error_reporting;
|
||||||
pub mod font_face;
|
pub mod font_face;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue