Use RefCell in DOMRefCell to reduce duplicated code.

This commit is contained in:
Ms2ger 2014-11-14 13:31:51 +01:00
parent c0016c7438
commit 86d609abaf
8 changed files with 28 additions and 95 deletions

View file

@ -37,7 +37,6 @@ use util::{LayoutDataAccess, LayoutDataFlags, LayoutDataWrapper, OpaqueNodeMetho
use util::{PrivateLayoutData};
use gfx::display_list::OpaqueNode;
use script::dom::bindings::cell::{Ref, RefMut};
use script::dom::bindings::codegen::InheritTypes::{ElementCast, HTMLIFrameElementCast};
use script::dom::bindings::codegen::InheritTypes::{HTMLImageElementCast, HTMLInputElementCast};
use script::dom::bindings::codegen::InheritTypes::{TextCast};
@ -62,6 +61,8 @@ use style::{PropertyDeclarationBlock, SpecificNamespace, TElement, TElementAttri
use url::Url;
use string_cache::{Atom, Namespace};
use std::cell::{Ref, RefMut};
/// Allows some convenience methods on generic layout nodes.
pub trait TLayoutNode {
/// Creates a new layout node with the same lifetime as this layout node.