Move DOMRefCell back into script.

We’re not using it in style after all.
This commit is contained in:
Simon Sapin 2016-09-28 02:28:59 +02:00
parent 89a29a7f12
commit c831369e3e
4 changed files with 5 additions and 8 deletions

View file

@ -4,15 +4,14 @@
//! A shareable mutable container for the DOM.
use refcell::{BorrowError, BorrowMutError, Ref, RefCell, RefMut};
use thread_state;
use style::refcell::{BorrowError, BorrowMutError, Ref, RefCell, RefMut};
use style::thread_state;
/// A mutable field in the DOM.
///
/// This extends the API of `core::cell::RefCell` to allow unsafe access in
/// certain situations, with dynamic checking in debug builds.
#[derive(Clone, PartialEq, Debug)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Clone, PartialEq, Debug, HeapSizeOf)]
pub struct DOMRefCell<T> {
value: RefCell<T>,
}

View file

@ -128,9 +128,8 @@
//! return `Err()` from the method with the appropriate [error value]
//! (error/enum.Error.html).
pub use style::domrefcell as cell;
pub mod callback;
pub mod cell;
pub mod constant;
pub mod conversions;
pub mod error;

View file

@ -35,6 +35,7 @@ use cssparser::RGBA;
use devtools_traits::CSSError;
use devtools_traits::WorkerId;
use dom::abstractworker::SharedRt;
use dom::bindings::cell::DOMRefCell;
use dom::bindings::js::{JS, Root};
use dom::bindings::refcounted::{Trusted, TrustedPromise};
use dom::bindings::reflector::{Reflectable, Reflector};
@ -89,7 +90,6 @@ use std::sync::mpsc::{Receiver, Sender};
use std::time::{SystemTime, Instant};
use string_cache::{Atom, Namespace, QualName};
use style::attr::{AttrIdentifier, AttrValue, LengthOrPercentageOrAuto};
use style::domrefcell::DOMRefCell;
use style::element_state::*;
use style::properties::PropertyDeclarationBlock;
use style::selector_impl::{ElementSnapshot, PseudoElement};

View file

@ -90,7 +90,6 @@ pub mod context;
pub mod custom_properties;
pub mod data;
pub mod dom;
pub mod domrefcell;
pub mod element_state;
pub mod error_reporting;
pub mod font_face;