Auto merge of #6377 - servo:rustup_20140614, r=SimonSapin

See #6376

r? @Ms2ger

Snaps don't exist yet, putting up the @larsbergstrom signal. The snap need not exactly match this commit, anything in the vicinity, or just master, should work really. (yay stability)


There's no particular reason behind this rustup except that I want to keep Servo running on almost-master as much as possible.


<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6377)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-06-15 10:33:14 -06:00
commit 67b121c0b8
12 changed files with 278 additions and 249 deletions

View file

@ -627,13 +627,14 @@ impl<'a> ElementHelpers<'a> for JSRef<'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 {
declarations.normal.make_unique().remove(index);
unsafe { declarations.normal.make_unique().remove(index); }
return;
}
@ -641,19 +642,20 @@ impl<'a> ElementHelpers<'a> for JSRef<'a, Element> {
.iter()
.position(|decl| decl.name() == property);
if let Some(index) = index {
declarations.important.make_unique().remove(index);
unsafe { declarations.important.make_unique().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 {
declarations.important.make_unique()
unsafe { declarations.important.make_unique() }
} else {
declarations.normal.make_unique()
unsafe { declarations.normal.make_unique() }
};
for declaration in existing_declarations.iter_mut() {