style: Remove UnsafeNode.

No longer needed since a while ago.
This commit is contained in:
Emilio Cobos Álvarez 2017-09-25 01:58:25 +02:00
parent 3db1776326
commit e3c58df155
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 3 additions and 43 deletions

View file

@ -61,7 +61,6 @@ use std::fmt;
use std::fmt::Debug;
use std::hash::{Hash, Hasher};
use std::marker::PhantomData;
use std::mem::transmute;
use std::sync::atomic::Ordering;
use style::CaseSensitivityExt;
use style::applicable_declarations::ApplicableDeclarationBlock;
@ -70,7 +69,7 @@ use style::computed_values::display;
use style::context::SharedStyleContext;
use style::data::ElementData;
use style::dom::{LayoutIterator, NodeInfo, OpaqueNode};
use style::dom::{PresentationalHintsSynthesizer, TElement, TNode, UnsafeNode};
use style::dom::{PresentationalHintsSynthesizer, TElement, TNode};
use style::element_state::*;
use style::font_metrics::ServoMetricsProvider;
use style::properties::{ComputedValues, PropertyDeclarationBlock};
@ -162,17 +161,6 @@ impl<'ln> TNode for ServoLayoutNode<'ln> {
type ConcreteElement = ServoLayoutElement<'ln>;
type ConcreteChildrenIterator = ServoChildrenIterator<'ln>;
fn to_unsafe(&self) -> UnsafeNode {
unsafe {
(self.node.unsafe_get() as usize, 0)
}
}
unsafe fn from_unsafe(n: &UnsafeNode) -> Self {
let (node, _) = *n;
transmute(node)
}
fn parent_node(&self) -> Option<Self> {
unsafe {
self.node.parent_node_ref().map(|node| self.new_with_this_lifetime(&node))