Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.

This commit is contained in:
Ms2ger 2015-03-11 11:08:57 +01:00 committed by Josh Matthews
parent 65d4b12bf2
commit 5f15eb5fbf
140 changed files with 1420 additions and 1222 deletions

View file

@ -365,10 +365,13 @@ impl<'a> DocumentHelpers<'a> for JSRef<'a, Document> {
/// https://html.spec.whatwg.org/multipage/#the-indicated-part-of-the-document
fn find_fragment_node(self, fragid: DOMString) -> Option<Temporary<Element>> {
self.GetElementById(fragid.clone()).or_else(|| {
let check_anchor = |&:&node: &JSRef<HTMLAnchorElement>| {
let check_anchor = |&node: &JSRef<HTMLAnchorElement>| {
let elem: JSRef<Element> = ElementCast::from_ref(node);
elem.get_attribute(ns!(""), &atom!("name")).root().map_or(false, |attr| {
attr.r().value().as_slice() == fragid.as_slice()
// FIXME(https://github.com/rust-lang/rust/issues/23338)
let attr = attr.r();
let value = attr.value();
value.as_slice() == fragid.as_slice()
})
};
let doc_node: JSRef<Node> = NodeCast::from_ref(self);
@ -461,7 +464,10 @@ impl<'a> DocumentHelpers<'a> for JSRef<'a, Document> {
/// Sends this document's title to the compositor.
fn send_title_to_compositor(self) {
let window = self.window().root();
window.r().compositor().set_title(window.r().pipeline(), Some(self.Title()));
// FIXME(https://github.com/rust-lang/rust/issues/23338)
let window = window.r();
let mut compositor = window.compositor();
compositor.set_title(window.pipeline(), Some(self.Title()));
}
fn dirty_all_nodes(self) {
@ -843,12 +849,16 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
// http://dom.spec.whatwg.org/#dom-document-characterset
fn CharacterSet(self) -> DOMString {
self.encoding_name.borrow().clone()
// FIXME(https://github.com/rust-lang/rust/issues/23338)
let encoding_name = self.encoding_name.borrow();
encoding_name.clone()
}
// http://dom.spec.whatwg.org/#dom-document-inputencoding
fn InputEncoding(self) -> DOMString {
self.encoding_name.borrow().clone()
// FIXME(https://github.com/rust-lang/rust/issues/23338)
let encoding_name = self.encoding_name.borrow();
encoding_name.clone()
}
// http://dom.spec.whatwg.org/#dom-document-content_type
@ -893,7 +903,9 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
// http://dom.spec.whatwg.org/#dom-nonelementparentnode-getelementbyid
fn GetElementById(self, id: DOMString) -> Option<Temporary<Element>> {
let id = Atom::from_slice(id.as_slice());
match self.idmap.borrow().get(&id) {
// FIXME(https://github.com/rust-lang/rust/issues/23338)
let idmap = self.idmap.borrow();
match idmap.get(&id) {
None => None,
Some(ref elements) => Some(Temporary::new((*elements)[0].clone())),
}
@ -1218,7 +1230,10 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
None => return false,
};
element.get_attribute(ns!(""), &atom!("name")).root().map_or(false, |attr| {
attr.r().value().as_slice() == name.as_slice()
// FIXME(https://github.com/rust-lang/rust/issues/23338)
let attr = attr.r();
let value = attr.value();
value.as_slice() == name.as_slice()
})
})
}