mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Update for nocopy changes
This commit is contained in:
parent
8b013462d5
commit
9bb970d385
9 changed files with 14 additions and 14 deletions
|
@ -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,
|
||||
|
@ -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");
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
@ -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) }
|
||||
|
|
|
@ -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 }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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:");
|
||||
|
||||
|
@ -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="
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -24,7 +24,7 @@ class glyph {
|
|||
|
||||
new(codepoint: uint, pos: glyph_pos) {
|
||||
self.codepoint = codepoint;
|
||||
self.pos = pos;
|
||||
self.pos = copy pos;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue