Remove TLayoutNode::get.

It is highly unsafe and unused.
This commit is contained in:
Ms2ger 2015-06-21 13:07:09 +02:00
parent eb2c508df0
commit ae5191275a

View file

@ -21,8 +21,6 @@
//!
//! Rules of the road for this file:
//!
//! * You must not use `.get()`; instead, use `.unsafe_get()`.
//!
//! * Do not call any methods on DOM nodes without checking to see whether they use borrow flags.
//!
//! o Instead of `get_attr()`, use `.get_attr_val_for_layout()`.
@ -91,12 +89,6 @@ pub trait TLayoutNode {
/// call and as such is marked `unsafe`.
unsafe fn get_jsmanaged<'a>(&'a self) -> &'a LayoutJS<Node>;
/// Returns the interior of this node as a `Node`. This is highly unsafe for layout to call
/// and as such is marked `unsafe`.
unsafe fn get<'a>(&'a self) -> &'a Node {
&*self.get_jsmanaged().unsafe_get()
}
fn node_is_element(&self) -> bool {
match self.type_id() {
Some(NodeTypeId::Element(..)) => true,
@ -740,10 +732,6 @@ impl<'ln> TLayoutNode for ThreadSafeLayoutNode<'ln> {
self.node.get_jsmanaged()
}
unsafe fn get<'a>(&'a self) -> &'a Node { // this change.
&*self.get_jsmanaged().unsafe_get()
}
fn first_child(&self) -> Option<ThreadSafeLayoutNode<'ln>> {
if self.pseudo != PseudoElementType::Normal {
return None