mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove unused code from script* crates
This commit is contained in:
parent
8dc7a25893
commit
8b6ed3d182
13 changed files with 2 additions and 133 deletions
|
@ -252,10 +252,8 @@ impl Attr {
|
|||
pub trait AttrHelpersForLayout {
|
||||
unsafe fn value_forever(&self) -> &'static AttrValue;
|
||||
unsafe fn value_ref_forever(&self) -> &'static str;
|
||||
unsafe fn value_atom_forever(&self) -> Option<Atom>;
|
||||
unsafe fn value_tokens_forever(&self) -> Option<&'static [Atom]>;
|
||||
unsafe fn local_name_atom_forever(&self) -> LocalName;
|
||||
unsafe fn value_for_layout(&self) -> &AttrValue;
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
@ -271,15 +269,6 @@ impl AttrHelpersForLayout for LayoutDom<Attr> {
|
|||
&**self.value_forever()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
unsafe fn value_atom_forever(&self) -> Option<Atom> {
|
||||
let value = (*self.unsafe_get()).value.borrow_for_layout();
|
||||
match *value {
|
||||
AttrValue::Atom(ref val) => Some(val.clone()),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
unsafe fn value_tokens_forever(&self) -> Option<&'static [Atom]> {
|
||||
// This transmute is used to cheat the lifetime restriction.
|
||||
|
@ -293,9 +282,4 @@ impl AttrHelpersForLayout for LayoutDom<Attr> {
|
|||
unsafe fn local_name_atom_forever(&self) -> LocalName {
|
||||
(*self.unsafe_get()).identifier.local_name.clone()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
unsafe fn value_for_layout(&self) -> &AttrValue {
|
||||
(*self.unsafe_get()).value.borrow_for_layout()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue