mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Upgrade to rustc 1.3.0-dev (f3b97a74a 2015-07-03)
This commit is contained in:
parent
02d84a1347
commit
75e3e787f6
15 changed files with 96 additions and 116 deletions
|
@ -619,14 +619,13 @@ impl<'a> ElementHelpers<'a> for &'a Element {
|
|||
}
|
||||
|
||||
fn remove_inline_style_property(self, property: DOMString) {
|
||||
#![allow(unsafe_code)] // #6376
|
||||
let mut inline_declarations = self.style_attribute.borrow_mut();
|
||||
if let &mut Some(ref mut declarations) = &mut *inline_declarations {
|
||||
let index = declarations.normal
|
||||
.iter()
|
||||
.position(|decl| decl.name() == property);
|
||||
if let Some(index) = index {
|
||||
unsafe { declarations.normal.make_unique().remove(index); }
|
||||
Arc::make_unique(&mut declarations.normal).remove(index);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -634,20 +633,19 @@ impl<'a> ElementHelpers<'a> for &'a Element {
|
|||
.iter()
|
||||
.position(|decl| decl.name() == property);
|
||||
if let Some(index) = index {
|
||||
unsafe { declarations.important.make_unique().remove(index); }
|
||||
Arc::make_unique(&mut declarations.important).remove(index);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn update_inline_style(self, property_decl: PropertyDeclaration, style_priority: StylePriority) {
|
||||
#![allow(unsafe_code)] // #6376
|
||||
let mut inline_declarations = self.style_attribute().borrow_mut();
|
||||
if let &mut Some(ref mut declarations) = &mut *inline_declarations {
|
||||
let existing_declarations = if style_priority == StylePriority::Important {
|
||||
unsafe { declarations.important.make_unique() }
|
||||
Arc::make_unique(&mut declarations.important)
|
||||
} else {
|
||||
unsafe { declarations.normal.make_unique() }
|
||||
Arc::make_unique(&mut declarations.normal)
|
||||
};
|
||||
|
||||
for declaration in existing_declarations.iter_mut() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue