Skip to content

Commit

Permalink
Update for nocopy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed May 26, 2012
1 parent 8b01346 commit 9bb970d
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/servo/gfx/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl to_float for u8 {

fn draw_solid_color(draw_target: AzDrawTargetRef, item: dl::display_item,
r: u8, g: u8, b: u8) {
let bounds = (*item).bounds;
let bounds = copy (*item).bounds;

let red_color = {
r: r.to_float() as AzFloat,
Expand Down Expand Up @@ -83,7 +83,7 @@ fn draw_image(draw_target: AzDrawTargetRef, item: dl::display_item,
-image: ~image) {
// FIXME: This is hideously inefficient.

let bounds = (*item).bounds;
let bounds = copy (*item).bounds;

if (image.depth < 3u) {
#debug("TODO: can't draw images with depth less than 3 yet");
Expand Down
2 changes: 1 addition & 1 deletion src/servo/gfx/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl format for format {

fn image_surface(size: geom::size<int>, format: format) -> image_surface {
{
size: size,
size: copy size,
format: format,
buffer: vec::from_elem((size.area() as uint) * format.bpp(), 0u8)
}
Expand Down
4 changes: 2 additions & 2 deletions src/servo/layout/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl layout_methods for @box {

#[doc="The trivial reflow routine for instrinsically-sized frames."]
fn reflow_intrinsic(size: geom::size<au>) {
self.bounds.size = size;
self.bounds.size = copy size;

#debug["reflow_intrinsic size=%?", self.bounds];
}
Expand All @@ -123,7 +123,7 @@ impl node_methods_priv for node {
s += " ";
}

s += #fmt("%?", self.rd({ |n| n.kind }));
s += #fmt("%?", self.rd({ |n| copy n.kind }));
#debug["%s", s];

for ntree.each_child(self) { |kid| kid.dump_indent(indent + 1u) }
Expand Down
4 changes: 2 additions & 2 deletions src/servo/layout/box_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ impl box_builder_priv for node {
computes the intrinsic size.
"]
fn determine_box_kind() -> box_kind {
alt self.rd({ |n| n.kind }) {
alt self.rd({ |n| copy n.kind }) {
~nk_text(string) { bk_text(@text_box(string)) }
~nk_element(element) {
alt *element.subclass {
es_div { bk_block }
es_img(size) { bk_intrinsic(@size) }
es_img(size) { bk_intrinsic(@copy size) }
es_unknown { bk_inline }
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/servo/layout/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fn box_to_display_item(box: @base::box) -> dl::display_item {
some(image) {
item = dl::display_item({
item_type: dl::display_item_image(~copy *image),
bounds: box.bounds
bounds: copy box.bounds
});
}
none {
Expand All @@ -75,7 +75,7 @@ fn box_to_display_item(box: @base::box) -> dl::display_item {
item_type: dl::display_item_solid_color(r.next() as u8,
r.next() as u8,
r.next() as u8),
bounds: box.bounds
bounds: copy box.bounds
});
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/servo/layout/style/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl style_priv for node {
"]
fn recompute_style() {
let default_style: computed_style =
default_style_for_node_kind(self.rd { |n| *n.kind });
default_style_for_node_kind(self.rd { |n| copy *n.kind });

#debug("recomputing style; parent node:");

Expand All @@ -69,7 +69,7 @@ impl style_methods for node {
if !self.has_aux() {
fail "get_computed_style() called on a node without a style!";
}
ret self.aux({ |x| x }).computed_style;
ret copy self.aux({ |x| copy x }).computed_style;
}

#[doc="
Expand Down
2 changes: 1 addition & 1 deletion src/servo/layout/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl text_layout_methods for @box {
};

let run = text_run(subbox.text);
subbox.run = some(run);
subbox.run = some(copy run);
run.shape();

self.bounds.size = {
Expand Down
2 changes: 1 addition & 1 deletion src/servo/platform/osmain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ fn destroy_surface(surface: surface) {
}

#[doc = "A function for spawning into the platform's main thread"]
fn on_osmain<T: send>(f: fn~(comm::port<T>)) -> comm::chan<T> {
fn on_osmain<T: send>(+f: fn~(comm::port<T>)) -> comm::chan<T> {
let builder = task::builder();
let opts = {
sched: some({
Expand Down
2 changes: 1 addition & 1 deletion src/servo/text/glyph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class glyph {

new(codepoint: uint, pos: glyph_pos) {
self.codepoint = codepoint;
self.pos = pos;
self.pos = copy pos;
}
}

0 comments on commit 9bb970d

Please sign in to comment.