mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
For loops and misc changes
This commit is contained in:
parent
1bdaff0fad
commit
307f1074d3
42 changed files with 220 additions and 243 deletions
|
@ -166,7 +166,7 @@ fn css_link_listener(to_parent: SharedChan<HtmlDiscoveryMessage>,
|
|||
|
||||
// Send the sheets back in order
|
||||
// FIXME: Shouldn't wait until after we've recieved CSSTaskExit to start sending these
|
||||
for result_vec.iter().advance |port| {
|
||||
for port in result_vec.iter() {
|
||||
to_parent.send(HtmlDiscoveredStyle(port.recv()));
|
||||
}
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ pub fn parse_html(cx: *JSContext,
|
|||
|
||||
debug!("-- attach attrs");
|
||||
do node.as_mut_element |element| {
|
||||
for tag.attributes.iter().advance |attr| {
|
||||
for attr in tag.attributes.iter() {
|
||||
element.set_attr(&str(attr.name.clone()), &str(attr.value.clone()));
|
||||
}
|
||||
}
|
||||
|
@ -375,7 +375,7 @@ pub fn parse_html(cx: *JSContext,
|
|||
let iframe_chan = iframe_chan.take();
|
||||
let elem = &mut iframe_element.parent.parent;
|
||||
let src_opt = elem.get_attr("src").map(|x| x.to_str());
|
||||
for src_opt.iter().advance |src| {
|
||||
for src in src_opt.iter() {
|
||||
let iframe_url = make_url(src.clone(), Some(url2.clone()));
|
||||
iframe_element.frame = Some(iframe_url.clone());
|
||||
|
||||
|
@ -502,7 +502,7 @@ pub fn parse_html(cx: *JSContext,
|
|||
|
||||
let mut data = ~[];
|
||||
debug!("iterating over children %?", style.first_child());
|
||||
for style.children().advance |child| {
|
||||
for child in style.children() {
|
||||
debug!("child = %?", child);
|
||||
do child.with_imm_text() |text| {
|
||||
data.push(text.parent.data.to_str()); // FIXME: Bad copy.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue