mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +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,
|
fn draw_solid_color(draw_target: AzDrawTargetRef, item: dl::display_item,
|
||||||
r: u8, g: u8, b: u8) {
|
r: u8, g: u8, b: u8) {
|
||||||
let bounds = (*item).bounds;
|
let bounds = copy (*item).bounds;
|
||||||
|
|
||||||
let red_color = {
|
let red_color = {
|
||||||
r: r.to_float() as AzFloat,
|
r: r.to_float() as AzFloat,
|
||||||
|
@ -83,7 +83,7 @@ fn draw_image(draw_target: AzDrawTargetRef, item: dl::display_item,
|
||||||
-image: ~image) {
|
-image: ~image) {
|
||||||
// FIXME: This is hideously inefficient.
|
// FIXME: This is hideously inefficient.
|
||||||
|
|
||||||
let bounds = (*item).bounds;
|
let bounds = copy (*item).bounds;
|
||||||
|
|
||||||
if (image.depth < 3u) {
|
if (image.depth < 3u) {
|
||||||
#debug("TODO: can't draw images with depth less than 3 yet");
|
#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 {
|
fn image_surface(size: geom::size<int>, format: format) -> image_surface {
|
||||||
{
|
{
|
||||||
size: size,
|
size: copy size,
|
||||||
format: format,
|
format: format,
|
||||||
buffer: vec::from_elem((size.area() as uint) * format.bpp(), 0u8)
|
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."]
|
#[doc="The trivial reflow routine for instrinsically-sized frames."]
|
||||||
fn reflow_intrinsic(size: geom::size<au>) {
|
fn reflow_intrinsic(size: geom::size<au>) {
|
||||||
self.bounds.size = size;
|
self.bounds.size = copy size;
|
||||||
|
|
||||||
#debug["reflow_intrinsic size=%?", self.bounds];
|
#debug["reflow_intrinsic size=%?", self.bounds];
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ impl node_methods_priv for node {
|
||||||
s += " ";
|
s += " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
s += #fmt("%?", self.rd({ |n| n.kind }));
|
s += #fmt("%?", self.rd({ |n| copy n.kind }));
|
||||||
#debug["%s", s];
|
#debug["%s", s];
|
||||||
|
|
||||||
for ntree.each_child(self) { |kid| kid.dump_indent(indent + 1u) }
|
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.
|
computes the intrinsic size.
|
||||||
"]
|
"]
|
||||||
fn determine_box_kind() -> box_kind {
|
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_text(string) { bk_text(@text_box(string)) }
|
||||||
~nk_element(element) {
|
~nk_element(element) {
|
||||||
alt *element.subclass {
|
alt *element.subclass {
|
||||||
es_div { bk_block }
|
es_div { bk_block }
|
||||||
es_img(size) { bk_intrinsic(@size) }
|
es_img(size) { bk_intrinsic(@copy size) }
|
||||||
es_unknown { bk_inline }
|
es_unknown { bk_inline }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ fn box_to_display_item(box: @base::box) -> dl::display_item {
|
||||||
some(image) {
|
some(image) {
|
||||||
item = dl::display_item({
|
item = dl::display_item({
|
||||||
item_type: dl::display_item_image(~copy *image),
|
item_type: dl::display_item_image(~copy *image),
|
||||||
bounds: box.bounds
|
bounds: copy box.bounds
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
none {
|
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,
|
item_type: dl::display_item_solid_color(r.next() as u8,
|
||||||
r.next() as u8,
|
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() {
|
fn recompute_style() {
|
||||||
let default_style: computed_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:");
|
#debug("recomputing style; parent node:");
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ impl style_methods for node {
|
||||||
if !self.has_aux() {
|
if !self.has_aux() {
|
||||||
fail "get_computed_style() called on a node without a style!";
|
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="
|
#[doc="
|
||||||
|
|
|
@ -23,7 +23,7 @@ impl text_layout_methods for @box {
|
||||||
};
|
};
|
||||||
|
|
||||||
let run = text_run(subbox.text);
|
let run = text_run(subbox.text);
|
||||||
subbox.run = some(run);
|
subbox.run = some(copy run);
|
||||||
run.shape();
|
run.shape();
|
||||||
|
|
||||||
self.bounds.size = {
|
self.bounds.size = {
|
||||||
|
|
|
@ -198,7 +198,7 @@ fn destroy_surface(surface: surface) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc = "A function for spawning into the platform's main thread"]
|
#[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 builder = task::builder();
|
||||||
let opts = {
|
let opts = {
|
||||||
sched: some({
|
sched: some({
|
||||||
|
|
|
@ -24,7 +24,7 @@ class glyph {
|
||||||
|
|
||||||
new(codepoint: uint, pos: glyph_pos) {
|
new(codepoint: uint, pos: glyph_pos) {
|
||||||
self.codepoint = codepoint;
|
self.codepoint = codepoint;
|
||||||
self.pos = pos;
|
self.pos = copy pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue