diff options
Diffstat (limited to 'components/script/layout_wrapper.rs')
-rw-r--r-- | components/script/layout_wrapper.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs index a7f0a5019f3..911810880e2 100644 --- a/components/script/layout_wrapper.rs +++ b/components/script/layout_wrapper.rs @@ -51,7 +51,7 @@ use selectors::matching::ElementFlags; use selectors::parser::{AttrSelector, NamespaceConstraint}; use std::fmt; use std::marker::PhantomData; -use std::mem::{transmute, transmute_copy}; +use std::mem::transmute; use std::sync::Arc; use string_cache::{Atom, Namespace}; use style::attr::AttrValue; @@ -63,7 +63,7 @@ use style::element_state::*; use style::properties::{ComputedValues, PropertyDeclarationBlock}; use style::refcell::{Ref, RefCell, RefMut}; use style::selector_impl::{ElementSnapshot, NonTSPseudoClass, PseudoElement, ServoSelectorImpl}; -use style::selector_matching::DeclarationBlock; +use style::selector_matching::ApplicableDeclarationBlock; use style::sink::Push; use style::str::is_whitespace; use url::Url; @@ -119,8 +119,7 @@ impl<'ln> TNode for ServoLayoutNode<'ln> { fn to_unsafe(&self) -> UnsafeNode { unsafe { - let ptr: usize = transmute_copy(self); - (ptr, 0) + (self.node.unsafe_get() as usize, 0) } } @@ -443,7 +442,7 @@ impl<'le> fmt::Debug for ServoLayoutElement<'le> { impl<'le> PresentationalHintsSynthetizer for ServoLayoutElement<'le> { fn synthesize_presentational_hints_for_legacy_attributes<V>(&self, hints: &mut V) - where V: Push<DeclarationBlock> + where V: Push<ApplicableDeclarationBlock> { unsafe { self.element.synthesize_presentational_hints_for_legacy_attributes(hints); @@ -1095,5 +1094,5 @@ impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> { impl<'le> PresentationalHintsSynthetizer for ServoThreadSafeLayoutElement<'le> { fn synthesize_presentational_hints_for_legacy_attributes<V>(&self, _hints: &mut V) - where V: Push<DeclarationBlock> {} + where V: Push<ApplicableDeclarationBlock> {} } |