Use string-cache's Namespace type

This commit is contained in:
Keegan McAllister 2014-09-29 18:30:01 -07:00
parent 6429750b33
commit d50114c41d
27 changed files with 126 additions and 183 deletions

View file

@ -48,8 +48,6 @@ use script::dom::node::{LayoutNodeHelpers, RawLayoutNodeHelpers, SharedLayoutDat
use script::dom::text::Text;
use script::layout_interface::LayoutChan;
use servo_msg::constellation_msg::{PipelineId, SubpageId};
use servo_util::namespace::Namespace;
use servo_util::namespace;
use servo_util::str::is_whitespace;
use std::cell::{RefCell, Ref, RefMut};
use std::kinds::marker::ContravariantLifetime;
@ -58,7 +56,7 @@ use style::computed_values::{content, display, white_space};
use style::{AnyNamespace, AttrSelector, PropertyDeclarationBlock, SpecificNamespace, TElement};
use style::{TNode};
use url::Url;
use string_cache::Atom;
use string_cache::{Atom, Namespace};
/// Allows some convenience methods on generic layout nodes.
pub trait TLayoutNode {
@ -413,7 +411,7 @@ impl<'le> TElement<'le> for LayoutElement<'le> {
ElementNodeTypeId(HTMLAnchorElementTypeId) |
ElementNodeTypeId(HTMLAreaElementTypeId) |
ElementNodeTypeId(HTMLLinkElementTypeId) => {
unsafe { self.element.get_attr_val_for_layout(&namespace::Null, "href") }
unsafe { self.element.get_attr_val_for_layout(&ns!(""), "href") }
}
_ => None,
}
@ -427,7 +425,7 @@ impl<'le> TElement<'le> for LayoutElement<'le> {
#[inline]
fn get_id(&self) -> Option<Atom> {
unsafe { self.element.get_attr_atom_for_layout(&namespace::Null, "id") }
unsafe { self.element.get_attr_atom_for_layout(&ns!(""), "id") }
}
fn get_disabled_state(&self) -> bool {