Skip to content

Commit

Permalink
auto merge of #4893 : servo/servo/rustup_2015-01-31, r=Ms2ger
Browse files Browse the repository at this point in the history
Ready for review.

Final link step on android fails, but we know how to fix it and will add it to this branch soon.
  • Loading branch information
bors-servo committed Feb 11, 2015
2 parents bc6882b + d5dd1d6 commit 5b29827
Show file tree
Hide file tree
Showing 136 changed files with 1,091 additions and 878 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,6 +2,7 @@
/Cargo.lock
/target
/components/servo/target
/ports/gonk/target
/ports/cef/target
/ports/android/bin
/ports/android/libs
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Expand Up @@ -3,4 +3,4 @@
url = https://github.com/servo/web-platform-tests.git
[submodule "support/android-rs-glue"]
path = support/android-rs-glue
url = https://github.com/servo/android-rs-glue
url = https://github.com/tomaka/android-rs-glue
2 changes: 1 addition & 1 deletion cargo-nightly-build
@@ -1 +1 @@
2015-01-09
2015-02-07
4 changes: 2 additions & 2 deletions components/compositing/compositor.rs
Expand Up @@ -42,7 +42,7 @@ use util::time::{TimeProfilerCategory, profile, TimeProfilerChan};
use util::{memory, time};
use std::collections::HashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::path::Path;
use std::old_path::Path;
use std::num::Float;
use std::rc::Rc;
use std::slice::bytes::copy_memory;
Expand Down Expand Up @@ -142,7 +142,7 @@ enum CompositionRequest {
CompositeNow,
}

#[derive(Copy, PartialEq, Show)]
#[derive(Copy, PartialEq, Debug)]
enum ShutdownState {
NotShuttingDown,
ShuttingDown,
Expand Down
4 changes: 2 additions & 2 deletions components/compositing/compositor_task.rs
Expand Up @@ -27,7 +27,7 @@ use util::geometry::PagePx;
use util::memory::MemoryProfilerChan;
use util::time::TimeProfilerChan;
use std::sync::mpsc::{channel, Sender, Receiver};
use std::fmt::{Error, Formatter, Show};
use std::fmt::{Error, Formatter, Debug};
use std::rc::Rc;

/// Sends messages to the compositor. This is a trait supplied by the port because the method used
Expand Down Expand Up @@ -223,7 +223,7 @@ pub enum Msg {
PaintTaskExited(PipelineId),
}

impl Show for Msg {
impl Debug for Msg {
fn fmt(&self, f: &mut Formatter) -> Result<(),Error> {
match *self {
Msg::Exit(..) => write!(f, "Exit"),
Expand Down
2 changes: 1 addition & 1 deletion components/compositing/constellation.rs
Expand Up @@ -36,7 +36,7 @@ use util::time::TimeProfilerChan;
use std::borrow::ToOwned;
use std::cell::{Cell, RefCell};
use std::collections::{HashMap, HashSet};
use std::io;
use std::old_io as io;
use std::mem::replace;
use std::rc::Rc;
use std::sync::mpsc::{Receiver, channel};
Expand Down
3 changes: 1 addition & 2 deletions components/compositing/lib.rs
Expand Up @@ -3,10 +3,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#![feature(box_syntax, plugin)]
#![feature(int_uint)]
#![feature(int_uint, core, libc, std_misc)]

#![allow(missing_copy_implementations)]
#![allow(unstable)]

#[macro_use]
extern crate log;
Expand Down
2 changes: 1 addition & 1 deletion components/compositing/scrolling.rs
Expand Up @@ -6,7 +6,7 @@

use compositor_task::{CompositorProxy, Msg};

use std::io::timer;
use std::old_io::timer;
use std::sync::mpsc::{Receiver, Sender, channel};
use std::thread::Builder;
use std::time::duration::Duration;
Expand Down
4 changes: 2 additions & 2 deletions components/compositing/windowing.rs
Expand Up @@ -15,7 +15,7 @@ use msg::compositor_msg::{PaintState, ReadyState};
use msg::constellation_msg::{Key, KeyState, KeyModifiers, LoadData};
use util::cursor::Cursor;
use util::geometry::ScreenPx;
use std::fmt::{Error, Formatter, Show};
use std::fmt::{Error, Formatter, Debug};
use std::rc::Rc;

#[derive(Clone)]
Expand Down Expand Up @@ -70,7 +70,7 @@ pub enum WindowEvent {
KeyEvent(Key, KeyState, KeyModifiers),
}

impl Show for WindowEvent {
impl Debug for WindowEvent {
fn fmt(&self, f: &mut Formatter) -> Result<(),Error> {
match *self {
WindowEvent::Idle => write!(f, "Idle"),
Expand Down
5 changes: 2 additions & 3 deletions components/devtools/actor.rs
Expand Up @@ -4,11 +4,10 @@

/// General actor system infrastructure.

use std::any::Any;
use std::any::{Any, TypeId};
use std::collections::HashMap;
use std::cell::{Cell, RefCell};
use std::intrinsics::TypeId;
use std::io::TcpStream;
use std::old_io::TcpStream;
use std::mem::{replace, transmute};
use std::raw::TraitObject;
use serialize::json;
Expand Down
2 changes: 1 addition & 1 deletion components/devtools/actors/console.rs
Expand Up @@ -16,7 +16,7 @@ use msg::constellation_msg::PipelineId;
use collections::BTreeMap;
use core::cell::RefCell;
use serialize::json::{self, Json, ToJson};
use std::io::TcpStream;
use std::old_io::TcpStream;
use std::num::Float;
use std::sync::mpsc::{channel, Sender};

Expand Down
2 changes: 1 addition & 1 deletion components/devtools/actors/inspector.rs
Expand Up @@ -14,7 +14,7 @@ use collections::BTreeMap;
use msg::constellation_msg::PipelineId;
use serialize::json::{self, Json, ToJson};
use std::cell::RefCell;
use std::io::TcpStream;
use std::old_io::TcpStream;
use std::sync::mpsc::{channel, Sender};
use std::num::Float;

Expand Down
2 changes: 1 addition & 1 deletion components/devtools/actors/root.rs
Expand Up @@ -11,7 +11,7 @@ use actors::tab::{TabActor, TabActorMsg};
use protocol::JsonPacketStream;

use serialize::json;
use std::io::TcpStream;
use std::old_io::TcpStream;

#[derive(RustcEncodable)]
struct ActorTraits {
Expand Down
2 changes: 1 addition & 1 deletion components/devtools/actors/tab.rs
Expand Up @@ -12,7 +12,7 @@ use devtools_traits::WantsLiveNotifications;
use protocol::JsonPacketStream;

use serialize::json;
use std::io::TcpStream;
use std::old_io::TcpStream;

#[derive(RustcEncodable)]
struct TabTraits;
Expand Down
8 changes: 4 additions & 4 deletions components/devtools/lib.rs
Expand Up @@ -10,11 +10,11 @@
#![crate_name = "devtools"]
#![crate_type = "rlib"]

#![feature(int_uint, box_syntax)]
#![feature(int_uint, box_syntax, io, core, rustc_private)]
#![feature(collections, std_misc)]

#![allow(non_snake_case)]
#![allow(missing_copy_implementations)]
#![allow(unstable)]

#[macro_use]
extern crate log;
Expand Down Expand Up @@ -45,8 +45,8 @@ use std::cell::RefCell;
use std::collections::HashMap;
use std::sync::mpsc::{channel, Receiver, Sender};
use std::sync::mpsc::TryRecvError::{Disconnected, Empty};
use std::io::{TcpListener, TcpStream};
use std::io::{Acceptor, Listener, TimedOut};
use std::old_io::{TcpListener, TcpStream};
use std::old_io::{Acceptor, Listener, TimedOut};
use std::sync::{Arc, Mutex};
use time::precise_time_ns;

Expand Down
4 changes: 2 additions & 2 deletions components/devtools/protocol.rs
Expand Up @@ -8,7 +8,7 @@

use serialize::{json, Encodable};
use serialize::json::Json;
use std::io::{IoError, OtherIoError, EndOfFile, TcpStream, IoResult};
use std::old_io::{IoError, OtherIoError, EndOfFile, TcpStream, IoResult};
use std::num;

pub trait JsonPacketStream {
Expand All @@ -18,7 +18,7 @@ pub trait JsonPacketStream {

impl JsonPacketStream for TcpStream {
fn write_json_packet<'a, T: Encodable>(&mut self, obj: &T) {
let s = json::encode(obj).replace("__type__", "type");
let s = json::encode(obj).unwrap().replace("__type__", "type");
println!("<- {}", s);
self.write_str(s.len().to_string().as_slice()).unwrap();
self.write_u8(':' as u8).unwrap();
Expand Down
3 changes: 3 additions & 0 deletions components/devtools_traits/Cargo.toml
Expand Up @@ -12,3 +12,6 @@ path = "../msg"

[dependencies.util]
path = "../util"

[dependencies]
url = "0.2.16"
1 change: 1 addition & 0 deletions components/gfx/Cargo.toml
Expand Up @@ -66,3 +66,4 @@ path = "../script_traits"
[dependencies]
url = "0.2.16"
time = "0.1.12"
bitflags = "*"
8 changes: 4 additions & 4 deletions components/gfx/display_list/mod.rs
Expand Up @@ -512,7 +512,7 @@ impl BaseDisplayItem {
/// A clipping region for a display item. Currently, this can describe rectangles, rounded
/// rectangles (for `border-radius`), or arbitrary intersections of the two. Arbitrary transforms
/// are not supported because those are handled by the higher-level `StackingContext` abstraction.
#[derive(Clone, PartialEq, Show)]
#[derive(Clone, PartialEq, Debug)]
pub struct ClippingRegion {
/// The main rectangular region. This does not include any corners.
pub main: Rect<Au>,
Expand All @@ -526,7 +526,7 @@ pub struct ClippingRegion {
/// A complex clipping region. These don't as easily admit arbitrary intersection operations, so
/// they're stored in a list over to the side. Currently a complex clipping region is just a
/// rounded rectangle, but the CSS WGs will probably make us throw more stuff in here eventually.
#[derive(Clone, PartialEq, Show)]
#[derive(Clone, PartialEq, Debug)]
pub struct ComplexClippingRegion {
/// The boundaries of the rectangle.
pub rect: Rect<Au>,
Expand Down Expand Up @@ -750,7 +750,7 @@ pub struct BorderDisplayItem {
/// Information about the border radii.
///
/// TODO(pcwalton): Elliptical radii.
#[derive(Clone, Default, PartialEq, Show, Copy)]
#[derive(Clone, Default, PartialEq, Debug, Copy)]
pub struct BorderRadii<T> {
pub top_left: T,
pub top_right: T,
Expand Down Expand Up @@ -931,7 +931,7 @@ impl DisplayItem {
}
}

impl fmt::Show for DisplayItem {
impl fmt::Debug for DisplayItem {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{} @ {:?} ({:x})",
match *self {
Expand Down
3 changes: 1 addition & 2 deletions components/gfx/font.rs
Expand Up @@ -14,7 +14,6 @@ use style::computed_values::{font_stretch, font_variant, font_weight};
use style::properties::style_structs::Font as FontStyle;
use std::sync::Arc;

use std::hash::Hash;
use platform::font_context::FontContextHandle;
use platform::font::{FontHandle, FontTable};
use util::geometry::Au;
Expand Down Expand Up @@ -70,7 +69,7 @@ pub trait FontTableMethods {
fn with_buffer<F>(&self, F) where F: FnOnce(*const u8, uint);
}

#[derive(Clone, Show)]
#[derive(Clone, Debug)]
pub struct FontMetrics {
pub underline_size: Au,
pub underline_offset: Au,
Expand Down
4 changes: 2 additions & 2 deletions components/gfx/font_cache_task.rs
Expand Up @@ -149,7 +149,7 @@ impl FontCache {
}
Source::Local(ref local_family_name) => {
let family = &mut self.web_families[family_name];
get_variations_for_family(local_family_name.as_slice(), |&mut:path| {
get_variations_for_family(local_family_name.as_slice(), |path| {
family.add_template(path.as_slice(), None);
});
}
Expand Down Expand Up @@ -191,7 +191,7 @@ impl FontCache {
let s = &mut self.local_families[*family_name];

if s.templates.len() == 0 {
get_variations_for_family(family_name.as_slice(), |&mut:path| {
get_variations_for_family(family_name.as_slice(), |path| {
s.add_template(path.as_slice(), None);
});
}
Expand Down
1 change: 1 addition & 0 deletions components/gfx/lib.rs
Expand Up @@ -11,6 +11,7 @@
extern crate log;

extern crate azure;
#[macro_use] extern crate bitflags;
extern crate collections;
extern crate geom;
extern crate layers;
Expand Down
10 changes: 5 additions & 5 deletions components/gfx/paint_task.rs
Expand Up @@ -144,7 +144,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send {
time_profiler_chan: TimeProfilerChan,
shutdown_chan: Sender<()>) {
let ConstellationChan(c) = constellation_chan.clone();
spawn_named_with_send_on_failure("PaintTask", task_state::PAINT, move |:| {
spawn_named_with_send_on_failure("PaintTask", task_state::PAINT, move || {
{
// Ensures that the paint task and graphics context are destroyed before the
// shutdown message.
Expand Down Expand Up @@ -336,7 +336,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send {
mut tiles: Vec<BufferRequest>,
scale: f32,
layer_id: LayerId) {
profile(TimeProfilerCategory::Painting, None, self.time_profiler_chan.clone(), |:| {
profile(TimeProfilerCategory::Painting, None, self.time_profiler_chan.clone(), || {
// Bail out if there is no appropriate stacking context.
let stacking_context = if let Some(ref stacking_context) = self.root_stacking_context {
match display_list::find_stacking_context_with_layer_id(stacking_context,
Expand All @@ -360,7 +360,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send {
stacking_context.clone(),
scale);
}
let new_buffers = (0..tile_count).map(|&mut :i| {
let new_buffers = (0..tile_count).map(|i| {
let thread_id = i % self.worker_threads.len();
self.worker_threads[thread_id].get_painted_tile_buffer()
}).collect();
Expand Down Expand Up @@ -425,7 +425,7 @@ impl WorkerThreadProxy {
} else {
opts::get().layout_threads
};
(0..thread_count).map(|&:_| {
(0..thread_count).map(|_| {
let (from_worker_sender, from_worker_receiver) = channel();
let (to_worker_sender, to_worker_receiver) = channel();
let native_graphics_metadata = native_graphics_metadata.clone();
Expand Down Expand Up @@ -582,7 +582,7 @@ impl WorkerThread {
// GPU painting mode, so that it doesn't have to recreate it.
if !opts::get().gpu_painting {
let mut buffer = layer_buffer.unwrap();
draw_target.snapshot().get_data_surface().with_data(|&mut:data| {
draw_target.snapshot().get_data_surface().with_data(|data| {
buffer.native_surface.upload(native_graphics_context!(self), data);
debug!("painting worker thread uploading to native surface {}",
buffer.native_surface.get_id());
Expand Down
4 changes: 2 additions & 2 deletions components/gfx/platform/freetype/font_template.rs
Expand Up @@ -3,8 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

use std::borrow::ToOwned;
use std::io;
use std::io::File;
use std::old_io as io;
use std::old_io::File;

/// Platform specific font representation for Linux.
/// The identifier is an absolute path, and the bytes
Expand Down
10 changes: 5 additions & 5 deletions components/gfx/text/glyph.rs
Expand Up @@ -22,7 +22,7 @@ use util::vec::*;
/// In the uncommon case (multiple glyphs per unicode character, large glyph index/advance, or
/// glyph offsets), we pack the glyph count into GlyphEntry, and store the other glyph information
/// in DetailedGlyphStore.
#[derive(Clone, Show, Copy)]
#[derive(Clone, Debug, Copy)]
struct GlyphEntry {
value: u32,
}
Expand Down Expand Up @@ -251,7 +251,7 @@ impl GlyphEntry {

// Stores data for a detailed glyph, in the case that several glyphs
// correspond to one character, or the glyph's data couldn't be packed.
#[derive(Clone, Show, Copy)]
#[derive(Clone, Debug, Copy)]
struct DetailedGlyph {
id: GlyphId,
// glyph's advance, in the text's direction (LTR or RTL)
Expand All @@ -270,7 +270,7 @@ impl DetailedGlyph {
}
}

#[derive(PartialEq, Clone, Eq, Show, Copy)]
#[derive(PartialEq, Clone, Eq, Debug, Copy)]
struct DetailedGlyphRecord {
// source string offset/GlyphEntry offset in the TextRun
entry_offset: CharIndex,
Expand Down Expand Up @@ -594,7 +594,7 @@ impl<'a> GlyphStore {
let entry = match first_glyph_data.is_missing {
true => GlyphEntry::missing(glyph_count),
false => {
let glyphs_vec: Vec<DetailedGlyph> = (0..glyph_count as uint).map(|&:i| {
let glyphs_vec: Vec<DetailedGlyph> = (0..glyph_count as uint).map(|i| {
DetailedGlyph::new(data_for_glyphs[i].id,
data_for_glyphs[i].advance,
data_for_glyphs[i].offset)
Expand Down Expand Up @@ -786,7 +786,7 @@ impl<'a> Iterator for GlyphIterator<'a> {
self.next_glyph_range()
} else {
// No glyph range. Look at next character.
self.char_range.next().and_then(|:i| {
self.char_range.next().and_then(|i| {
self.char_index = i;
assert!(i < self.store.char_len());
let entry = self.store.entry_buffer[i.to_uint()];
Expand Down

0 comments on commit 5b29827

Please sign in to comment.