aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/main')
-rw-r--r--src/components/main/constellation.rs10
-rw-r--r--src/components/main/layout/box.rs2
-rw-r--r--src/components/main/layout/box_builder.rs2
-rw-r--r--src/components/main/layout/float_context.rs2
-rw-r--r--src/components/main/layout/layout_task.rs2
-rw-r--r--src/components/main/layout/text.rs2
-rw-r--r--src/components/main/layout/util.rs2
-rw-r--r--src/components/main/pipeline.rs8
8 files changed, 16 insertions, 14 deletions
diff --git a/src/components/main/constellation.rs b/src/components/main/constellation.rs
index d1ae44f7bfe..af036a5f0aa 100644
--- a/src/components/main/constellation.rs
+++ b/src/components/main/constellation.rs
@@ -227,7 +227,7 @@ impl Constellation {
profiler_chan: ProfilerChan)
-> ConstellationChan {
- let opts = Cell::new(copy *opts);
+ let opts = Cell::new((*opts).clone());
let (constellation_port, constellation_chan) = special_stream!(ConstellationChan);
let constellation_port = Cell::new(constellation_port);
@@ -304,7 +304,7 @@ impl Constellation {
self.image_cache_task.clone(),
self.resource_task.clone(),
self.profiler_chan.clone(),
- copy self.opts,
+ self.opts.clone(),
{
let size = self.compositor_chan.get_size();
from_value(Size2D(size.width as uint, size.height as uint))
@@ -370,7 +370,7 @@ impl Constellation {
self.compositor_chan.clone(),
self.image_cache_task.clone(),
self.profiler_chan.clone(),
- copy self.opts,
+ self.opts.clone(),
source_pipeline,
size_future)
} else {
@@ -382,7 +382,7 @@ impl Constellation {
self.image_cache_task.clone(),
self.resource_task.clone(),
self.profiler_chan.clone(),
- copy self.opts,
+ self.opts.clone(),
size_future)
};
@@ -438,7 +438,7 @@ impl Constellation {
self.image_cache_task.clone(),
self.resource_task.clone(),
self.profiler_chan.clone(),
- copy self.opts,
+ self.opts.clone(),
size_future);
if url.path.ends_with(".js") {
diff --git a/src/components/main/layout/box.rs b/src/components/main/layout/box.rs
index f9b63ed65ed..38f422a1dff 100644
--- a/src/components/main/layout/box.rs
+++ b/src/components/main/layout/box.rs
@@ -782,7 +782,7 @@ impl RenderBox {
// FIXME: Too much allocation here.
let font_families = do my_style.font_family().map |family| {
match *family {
- CSSFontFamilyFamilyName(ref family_str) => copy *family_str,
+ CSSFontFamilyFamilyName(ref family_str) => (*family_str).clone(),
CSSFontFamilyGenericFamily(Serif) => ~"serif",
CSSFontFamilyGenericFamily(SansSerif) => ~"sans-serif",
CSSFontFamilyGenericFamily(Cursive) => ~"cursive",
diff --git a/src/components/main/layout/box_builder.rs b/src/components/main/layout/box_builder.rs
index 643a7b80b5d..cd11e948ed0 100644
--- a/src/components/main/layout/box_builder.rs
+++ b/src/components/main/layout/box_builder.rs
@@ -269,7 +269,7 @@ impl BoxGenerator {
do node.with_imm_image_element |image_element| {
if image_element.image.is_some() {
// FIXME(pcwalton): Don't copy URLs.
- let url = copy *image_element.image.get_ref();
+ let url = (*image_element.image.get_ref()).clone();
ImageRenderBoxClass(@mut ImageRenderBox::new(base, url, layout_ctx.image_cache))
} else {
info!("Tried to make image box, but couldn't find image. Made generic box \
diff --git a/src/components/main/layout/float_context.rs b/src/components/main/layout/float_context.rs
index 5528d5ae8f7..60bb9595615 100644
--- a/src/components/main/layout/float_context.rs
+++ b/src/components/main/layout/float_context.rs
@@ -10,6 +10,7 @@ use std::util::replace;
use std::vec;
use std::i32::max_value;
+#[deriving(Clone)]
pub enum FloatType{
FloatLeft,
FloatRight
@@ -28,6 +29,7 @@ struct FloatContextBase{
offset: Point2D<Au>
}
+#[deriving(Clone)]
struct FloatData{
bounds: Rect<Au>,
f_type: FloatType
diff --git a/src/components/main/layout/layout_task.rs b/src/components/main/layout/layout_task.rs
index 5170d6f5f88..48c9b347e71 100644
--- a/src/components/main/layout/layout_task.rs
+++ b/src/components/main/layout/layout_task.rs
@@ -181,7 +181,7 @@ impl LayoutTask {
};
// FIXME: Bad copy!
- let doc_url = copy data.url;
+ let doc_url = data.url.clone();
let script_chan = data.script_chan.clone();
debug!("layout: received layout request for: %s", doc_url.to_str());
diff --git a/src/components/main/layout/text.rs b/src/components/main/layout/text.rs
index cf9d8f49bcc..525e6239320 100644
--- a/src/components/main/layout/text.rs
+++ b/src/components/main/layout/text.rs
@@ -50,7 +50,7 @@ pub trait UnscannedMethods {
impl UnscannedMethods for RenderBox {
fn raw_text(&self) -> ~str {
match *self {
- UnscannedTextRenderBoxClass(text_box) => copy text_box.text,
+ UnscannedTextRenderBoxClass(text_box) => text_box.text.clone(),
_ => fail!(~"unsupported operation: box.raw_text() on non-unscanned text box."),
}
}
diff --git a/src/components/main/layout/util.rs b/src/components/main/layout/util.rs
index 00d4dae218c..e851cbb41b8 100644
--- a/src/components/main/layout/util.rs
+++ b/src/components/main/layout/util.rs
@@ -13,7 +13,7 @@ pub struct NodeRange {
impl NodeRange {
pub fn new(node: AbstractNode<LayoutView>, range: &Range) -> NodeRange {
- NodeRange { node: node, range: copy *range }
+ NodeRange { node: node, range: (*range).clone() }
}
}
diff --git a/src/components/main/pipeline.rs b/src/components/main/pipeline.rs
index 1ea7965b02a..ef33125efeb 100644
--- a/src/components/main/pipeline.rs
+++ b/src/components/main/pipeline.rs
@@ -52,7 +52,7 @@ impl Pipeline {
RenderTask::create(id,
render_port,
compositor_chan.clone(),
- copy opts,
+ opts.clone(),
profiler_chan.clone());
LayoutTask::create(id,
@@ -61,7 +61,7 @@ impl Pipeline {
script_pipeline.script_chan.clone(),
render_chan.clone(),
image_cache_task.clone(),
- copy opts,
+ opts.clone(),
profiler_chan);
let new_layout_info = NewLayoutInfo {
@@ -109,7 +109,7 @@ impl Pipeline {
RenderTask::create(id,
render_port,
compositor_chan.clone(),
- copy opts,
+ opts.clone(),
profiler_chan.clone());
LayoutTask::create(id,
@@ -118,7 +118,7 @@ impl Pipeline {
script_chan.clone(),
render_chan.clone(),
image_cache_task,
- copy opts,
+ opts.clone(),
profiler_chan);
Pipeline::new(id,
subpage_id,