mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 22:37:50 +00:00
servo: Merge #4893 - Upgrade to rustc ba2f13ef0 2015-02-04 (from servo:rustup_2015-01-31); r=Ms2ger,glennw
Ready for review. Final link step on android fails, but we know how to fix it and will add it to this branch soon. Source-Repo: https://github.com/servo/servo Source-Revision: 2cc08f289ab909de44fa09a07b2c43b70ce379b9 --HG-- rename : servo/ports/gonk/build.rs => servo/support/rust-task_info/build.rs
This commit is contained in:
parent
9a7b554da0
commit
da87abc762
1
servo/.gitignore
vendored
1
servo/.gitignore
vendored
@ -2,6 +2,7 @@
|
||||
/Cargo.lock
|
||||
/target
|
||||
/components/servo/target
|
||||
/ports/gonk/target
|
||||
/ports/cef/target
|
||||
/ports/android/bin
|
||||
/ports/android/libs
|
||||
|
@ -1 +1 @@
|
||||
2015-01-09
|
||||
2015-02-07
|
||||
|
@ -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;
|
||||
@ -142,7 +142,7 @@ enum CompositionRequest {
|
||||
CompositeNow,
|
||||
}
|
||||
|
||||
#[derive(Copy, PartialEq, Show)]
|
||||
#[derive(Copy, PartialEq, Debug)]
|
||||
enum ShutdownState {
|
||||
NotShuttingDown,
|
||||
ShuttingDown,
|
||||
|
@ -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
|
||||
@ -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"),
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)]
|
||||
@ -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"),
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
@ -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;
|
||||
|
||||
|
@ -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 {
|
||||
@ -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();
|
||||
|
@ -12,3 +12,6 @@ path = "../msg"
|
||||
|
||||
[dependencies.util]
|
||||
path = "../util"
|
||||
|
||||
[dependencies]
|
||||
url = "0.2.16"
|
||||
|
@ -66,3 +66,4 @@ path = "../script_traits"
|
||||
[dependencies]
|
||||
url = "0.2.16"
|
||||
time = "0.1.12"
|
||||
bitflags = "*"
|
||||
|
@ -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>,
|
||||
@ -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>,
|
||||
@ -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,
|
||||
@ -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 {
|
||||
|
@ -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;
|
||||
@ -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,
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
@ -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);
|
||||
});
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
extern crate log;
|
||||
|
||||
extern crate azure;
|
||||
#[macro_use] extern crate bitflags;
|
||||
extern crate collections;
|
||||
extern crate geom;
|
||||
extern crate layers;
|
||||
|
@ -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.
|
||||
@ -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,
|
||||
@ -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();
|
||||
@ -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();
|
||||
@ -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());
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
}
|
||||
@ -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)
|
||||
@ -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,
|
||||
@ -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)
|
||||
@ -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()];
|
||||
|
@ -13,6 +13,9 @@ path = "../canvas"
|
||||
[dependencies.gfx]
|
||||
path = "../gfx"
|
||||
|
||||
[dependencies.msg]
|
||||
path = "../msg"
|
||||
|
||||
[dependencies.script]
|
||||
path = "../script"
|
||||
|
||||
@ -46,6 +49,10 @@ git = "https://github.com/servo/string-cache"
|
||||
[dependencies.string_cache_macros]
|
||||
git = "https://github.com/servo/string-cache"
|
||||
|
||||
[dependencies.png]
|
||||
git = "https://github.com/servo/rust-png"
|
||||
|
||||
[dependencies]
|
||||
encoding = "0.2"
|
||||
url = "0.2.16"
|
||||
url = "0.2.16"
|
||||
bitflags = "*"
|
||||
|
@ -1902,7 +1902,7 @@ impl Flow for BlockFlow {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for BlockFlow {
|
||||
impl fmt::Debug for BlockFlow {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f,
|
||||
"{:?} - {:x}: frag={:?} ({:?})",
|
||||
@ -1914,7 +1914,7 @@ impl fmt::Show for BlockFlow {
|
||||
}
|
||||
|
||||
/// The inputs for the inline-sizes-and-margins constraint equation.
|
||||
#[derive(Show, Copy)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct ISizeConstraintInput {
|
||||
pub computed_inline_size: MaybeAuto,
|
||||
pub inline_start_margin: MaybeAuto,
|
||||
@ -1947,7 +1947,7 @@ impl ISizeConstraintInput {
|
||||
}
|
||||
|
||||
/// The solutions for the inline-size-and-margins constraint equation.
|
||||
#[derive(Copy, Show)]
|
||||
#[derive(Copy, Debug)]
|
||||
pub struct ISizeConstraintSolution {
|
||||
pub inline_start: Au,
|
||||
pub inline_end: Au,
|
||||
|
@ -182,12 +182,12 @@ impl InlineFragmentsAccumulator {
|
||||
}
|
||||
}
|
||||
|
||||
fn push_all(&mut self, fragments: DList<Fragment>) {
|
||||
fn push_all(&mut self, mut fragments: DList<Fragment>) {
|
||||
if fragments.len() == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
self.fragments.append(fragments)
|
||||
self.fragments.append(&mut fragments)
|
||||
}
|
||||
|
||||
fn to_dlist(self) -> DList<Fragment> {
|
||||
|
@ -1333,7 +1333,7 @@ fn position_to_offset(position: LengthOrPercentage, Au(total_length): Au) -> f32
|
||||
}
|
||||
|
||||
/// "Steps" as defined by CSS 2.1 § E.2.
|
||||
#[derive(Clone, PartialEq, Show, Copy)]
|
||||
#[derive(Clone, PartialEq, Debug, Copy)]
|
||||
pub enum StackingLevel {
|
||||
/// The border and backgrounds for the root of this stacking context: steps 1 and 2.
|
||||
BackgroundAndBorders,
|
||||
|
@ -12,7 +12,7 @@ use std::fmt;
|
||||
use style::computed_values::float;
|
||||
|
||||
/// The kind of float: left or right.
|
||||
#[derive(Clone, RustcEncodable, Show, Copy)]
|
||||
#[derive(Clone, RustcEncodable, Debug, Copy)]
|
||||
pub enum FloatKind {
|
||||
Left,
|
||||
Right
|
||||
@ -45,7 +45,7 @@ struct Float {
|
||||
kind: FloatKind,
|
||||
}
|
||||
|
||||
impl fmt::Show for Float {
|
||||
impl fmt::Debug for Float {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "bounds={:?} kind={:?}", self.bounds, self.kind)
|
||||
}
|
||||
@ -75,7 +75,7 @@ impl FloatList {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for FloatList {
|
||||
impl fmt::Debug for FloatList {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "max_block_start={:?} floats={}", self.max_block_start, self.floats.len())
|
||||
}
|
||||
@ -93,7 +93,7 @@ pub struct PlacementInfo {
|
||||
pub kind: FloatKind
|
||||
}
|
||||
|
||||
impl fmt::Show for PlacementInfo {
|
||||
impl fmt::Debug for PlacementInfo {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f,
|
||||
"size={:?} ceiling={:?} max_inline_size={:?} kind={:?}",
|
||||
@ -120,7 +120,7 @@ pub struct Floats {
|
||||
pub writing_mode: WritingMode,
|
||||
}
|
||||
|
||||
impl fmt::Show for Floats {
|
||||
impl fmt::Debug for Floats {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
if !self.list.is_present() {
|
||||
write!(f, "[empty]")
|
||||
|
@ -67,7 +67,7 @@ use std::sync::Arc;
|
||||
///
|
||||
/// Note that virtual methods have a cost; we should not overuse them in Servo. Consider adding
|
||||
/// methods to `ImmutableFlowUtils` or `MutableFlowUtils` before adding more methods here.
|
||||
pub trait Flow: fmt::Show + Sync {
|
||||
pub trait Flow: fmt::Debug + Sync {
|
||||
// RTTI
|
||||
//
|
||||
// TODO(pcwalton): Use Rust's RTTI, once that works.
|
||||
@ -428,7 +428,7 @@ pub trait MutableOwnedFlowUtils {
|
||||
fn set_absolute_descendants(&mut self, abs_descendants: AbsDescendants);
|
||||
}
|
||||
|
||||
#[derive(RustcEncodable, PartialEq, Show)]
|
||||
#[derive(RustcEncodable, PartialEq, Debug)]
|
||||
pub enum FlowClass {
|
||||
Block,
|
||||
Inline,
|
||||
@ -784,7 +784,7 @@ pub struct BaseFlow {
|
||||
unsafe impl Send for BaseFlow {}
|
||||
unsafe impl Sync for BaseFlow {}
|
||||
|
||||
impl fmt::Show for BaseFlow {
|
||||
impl fmt::Debug for BaseFlow {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f,
|
||||
"@ {:?}, CC {}, ADC {}",
|
||||
|
@ -290,7 +290,7 @@ impl ImageFragmentInfo {
|
||||
fn convert_length(node: &ThreadSafeLayoutNode, name: &Atom) -> Option<Au> {
|
||||
let element = node.as_element();
|
||||
element.get_attr(&ns!(""), name).and_then(|string| {
|
||||
let n: Option<int> = FromStr::from_str(string);
|
||||
let n: Option<int> = FromStr::from_str(string).ok();
|
||||
n
|
||||
}).and_then(|pixels| Some(Au::from_px(pixels)))
|
||||
}
|
||||
@ -589,7 +589,7 @@ impl ScannedTextFragmentInfo {
|
||||
|
||||
/// Describes how to split a fragment. This is used during line breaking as part of the return
|
||||
/// value of `find_split_info_for_inline_size()`.
|
||||
#[derive(Show, Clone)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SplitInfo {
|
||||
// TODO(bjz): this should only need to be a single character index, but both values are
|
||||
// currently needed for splitting in the `inline::try_append_*` functions.
|
||||
@ -667,7 +667,7 @@ impl TableColumnFragmentInfo {
|
||||
let span = {
|
||||
let element = node.as_element();
|
||||
element.get_attr(&ns!(""), &atom!("span")).and_then(|string| {
|
||||
let n: Option<int> = FromStr::from_str(string);
|
||||
let n: Option<int> = FromStr::from_str(string).ok();
|
||||
n
|
||||
}).unwrap_or(0)
|
||||
};
|
||||
@ -2016,7 +2016,7 @@ impl Fragment {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for Fragment {
|
||||
impl fmt::Debug for Fragment {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
try!(write!(f, "({} {} ", self.debug_id(), self.specific.get_type()));
|
||||
try!(write!(f, "bp {:?}", self.border_padding));
|
||||
@ -2059,7 +2059,7 @@ pub trait FragmentBorderBoxIterator {
|
||||
|
||||
/// The coordinate system used in `stacking_relative_border_box()`. See the documentation of that
|
||||
/// method for details.
|
||||
#[derive(Clone, PartialEq, Show)]
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub enum CoordinateSystem {
|
||||
/// The border box returned is relative to the fragment's parent stacking context.
|
||||
Parent,
|
||||
|
@ -86,7 +86,7 @@ impl RestyleDamage {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for RestyleDamage {
|
||||
impl fmt::Debug for RestyleDamage {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
let mut first_elem = true;
|
||||
|
||||
|
@ -68,7 +68,7 @@ static FONT_SUPERSCRIPT_OFFSET_RATIO: f64 = 0.34;
|
||||
/// with a float or a horizontal wall of the containing block. The block-start
|
||||
/// inline-start corner of the green zone is the same as that of the line, but
|
||||
/// the green zone can be taller and wider than the line itself.
|
||||
#[derive(RustcEncodable, Show, Copy)]
|
||||
#[derive(RustcEncodable, Debug, Copy)]
|
||||
pub struct Line {
|
||||
/// A range of line indices that describe line breaks.
|
||||
///
|
||||
@ -712,7 +712,7 @@ pub struct InlineFragments {
|
||||
pub fragments: Vec<Fragment>,
|
||||
}
|
||||
|
||||
impl fmt::Show for InlineFragments {
|
||||
impl fmt::Debug for InlineFragments {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{:?}", self.fragments)
|
||||
}
|
||||
@ -1392,7 +1392,7 @@ impl Flow for InlineFlow {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for InlineFlow {
|
||||
impl fmt::Debug for InlineFlow {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{:?} - {:x} - {:?}", self.class(), self.base.debug_id(), self.fragments)
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ use serialize::json;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::RefCell;
|
||||
use std::io::File;
|
||||
use std::old_io::File;
|
||||
use std::sync::atomic::{AtomicUint, Ordering, ATOMIC_UINT_INIT};
|
||||
|
||||
thread_local!(static STATE_KEY: RefCell<Option<State>> = RefCell::new(None));
|
||||
@ -64,7 +64,7 @@ impl Scope {
|
||||
STATE_KEY.with(|ref r| {
|
||||
match &mut *r.borrow_mut() {
|
||||
&mut Some(ref mut state) => {
|
||||
let flow_trace = json::encode(&flow::base(&*state.flow_root));
|
||||
let flow_trace = json::encode(&flow::base(&*state.flow_root)).unwrap();
|
||||
let data = box ScopeData::new(name.clone(), flow_trace);
|
||||
state.scope_stack.push(data);
|
||||
}
|
||||
@ -82,7 +82,7 @@ impl Drop for Scope {
|
||||
match &mut *r.borrow_mut() {
|
||||
&mut Some(ref mut state) => {
|
||||
let mut current_scope = state.scope_stack.pop().unwrap();
|
||||
current_scope.post = json::encode(&flow::base(&*state.flow_root));
|
||||
current_scope.post = json::encode(&flow::base(&*state.flow_root)).unwrap();
|
||||
let previous_scope = state.scope_stack.last_mut().unwrap();
|
||||
previous_scope.children.push(current_scope);
|
||||
}
|
||||
@ -106,7 +106,7 @@ pub fn begin_trace(flow_root: FlowRef) {
|
||||
assert!(STATE_KEY.with(|ref r| r.borrow().is_none()));
|
||||
|
||||
STATE_KEY.with(|ref r| {
|
||||
let flow_trace = json::encode(&flow::base(&*flow_root));
|
||||
let flow_trace = json::encode(&flow::base(&*flow_root)).unwrap();
|
||||
let state = State {
|
||||
scope_stack: vec![box ScopeData::new("root".to_owned(), flow_trace)],
|
||||
flow_root: flow_root.clone(),
|
||||
@ -122,9 +122,9 @@ pub fn end_trace() {
|
||||
let mut task_state = STATE_KEY.with(|ref r| r.borrow_mut().take().unwrap());
|
||||
assert!(task_state.scope_stack.len() == 1);
|
||||
let mut root_scope = task_state.scope_stack.pop().unwrap();
|
||||
root_scope.post = json::encode(&flow::base(&*task_state.flow_root));
|
||||
root_scope.post = json::encode(&flow::base(&*task_state.flow_root)).unwrap();
|
||||
|
||||
let result = json::encode(&root_scope);
|
||||
let result = json::encode(&root_scope).unwrap();
|
||||
let path = Path::new("layout_trace.json");
|
||||
let mut file = File::create(&path).unwrap();
|
||||
file.write_str(result.as_slice()).unwrap();
|
||||
|
@ -12,6 +12,7 @@
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
#[macro_use] extern crate bitflags;
|
||||
extern crate cssparser;
|
||||
extern crate canvas;
|
||||
extern crate geom;
|
||||
|
@ -26,7 +26,7 @@ use style::computed_values::list_style_type;
|
||||
use std::sync::Arc;
|
||||
|
||||
/// A block with the CSS `display` property equal to `list-item`.
|
||||
#[derive(Show)]
|
||||
#[derive(Debug)]
|
||||
pub struct ListItemFlow {
|
||||
/// Data common to all block flows.
|
||||
pub block_flow: BlockFlow,
|
||||
|
@ -253,7 +253,7 @@ pub struct IntrinsicISizes {
|
||||
pub preferred_inline_size: Au,
|
||||
}
|
||||
|
||||
impl fmt::Show for IntrinsicISizes {
|
||||
impl fmt::Debug for IntrinsicISizes {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "min={:?}, pref={:?}", self.minimum_inline_size, self.preferred_inline_size)
|
||||
}
|
||||
@ -324,7 +324,7 @@ impl IntrinsicISizesContribution {
|
||||
}
|
||||
|
||||
/// Useful helper data type when computing values for blocks and positioned elements.
|
||||
#[derive(Copy, PartialEq, Show)]
|
||||
#[derive(Copy, PartialEq, Debug)]
|
||||
pub enum MaybeAuto {
|
||||
Auto,
|
||||
Specified(Au),
|
||||
|
@ -398,7 +398,7 @@ impl Flow for TableFlow {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for TableFlow {
|
||||
impl fmt::Debug for TableFlow {
|
||||
/// Outputs a debugging string describing this table flow.
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "TableFlow: {:?}", self.block_flow)
|
||||
@ -443,7 +443,7 @@ impl ISizeAndMarginsComputer for InternalTable {
|
||||
/// maximum of 100 pixels and 20% of the table), the preceding constraint means that we must
|
||||
/// potentially store both a specified width *and* a specified percentage, so that the inline-size
|
||||
/// assignment phase of layout will know which one to pick.
|
||||
#[derive(Clone, RustcEncodable, Show, Copy)]
|
||||
#[derive(Clone, RustcEncodable, Debug, Copy)]
|
||||
pub struct ColumnIntrinsicInlineSize {
|
||||
/// The preferred intrinsic inline size.
|
||||
pub preferred: Au,
|
||||
|
@ -98,7 +98,7 @@ impl Flow for TableCaptionFlow {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for TableCaptionFlow {
|
||||
impl fmt::Debug for TableCaptionFlow {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "TableCaptionFlow: {:?}", self.block_flow)
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ impl Flow for TableCellFlow {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for TableCellFlow {
|
||||
impl fmt::Debug for TableCellFlow {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "TableCellFlow: {:?}", self.block_flow)
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ impl Flow for TableColGroupFlow {
|
||||
_: &Point2D<Au>) {}
|
||||
}
|
||||
|
||||
impl fmt::Show for TableColGroupFlow {
|
||||
impl fmt::Debug for TableColGroupFlow {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self.fragment {
|
||||
Some(ref rb) => write!(f, "TableColGroupFlow: {:?}", rb),
|
||||
|
@ -332,7 +332,7 @@ impl Flow for TableRowFlow {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for TableRowFlow {
|
||||
impl fmt::Debug for TableRowFlow {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "TableRowFlow: {:?}", self.block_flow.fragment)
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ impl Flow for TableRowGroupFlow {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for TableRowGroupFlow {
|
||||
impl fmt::Debug for TableRowGroupFlow {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "TableRowGroupFlow: {:?}", self.block_flow.fragment)
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ use style::values::CSSFloat;
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Copy, RustcEncodable, Show)]
|
||||
#[derive(Copy, RustcEncodable, Debug)]
|
||||
pub enum TableLayout {
|
||||
Fixed,
|
||||
Auto
|
||||
@ -147,7 +147,7 @@ impl TableWrapperFlow {
|
||||
// Compute all the guesses for the column sizes, and sum them.
|
||||
let mut total_guess = AutoLayoutCandidateGuess::new();
|
||||
let guesses: Vec<AutoLayoutCandidateGuess> =
|
||||
self.column_intrinsic_inline_sizes.iter().map(|&mut:column_intrinsic_inline_size| {
|
||||
self.column_intrinsic_inline_sizes.iter().map(|column_intrinsic_inline_size| {
|
||||
let guess = AutoLayoutCandidateGuess::from_column_intrinsic_inline_size(
|
||||
column_intrinsic_inline_size,
|
||||
available_inline_size);
|
||||
@ -383,7 +383,7 @@ impl Flow for TableWrapperFlow {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for TableWrapperFlow {
|
||||
impl fmt::Debug for TableWrapperFlow {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
if self.block_flow.base.flags.is_float() {
|
||||
write!(f, "TableWrapperFlow(Float): {:?}", self.block_flow.fragment)
|
||||
@ -501,7 +501,7 @@ impl<'a> Add for &'a AutoLayoutCandidateGuess {
|
||||
|
||||
/// The `CSSFloat` member specifies the weight of the smaller of the two guesses, on a scale from
|
||||
/// 0.0 to 1.0.
|
||||
#[derive(Copy, PartialEq, Show)]
|
||||
#[derive(Copy, PartialEq, Debug)]
|
||||
enum SelectedAutoLayoutCandidateGuess {
|
||||
UseMinimumGuess,
|
||||
InterpolateBetweenMinimumGuessAndMinimumPercentageGuess(CSSFloat),
|
||||
|
@ -50,13 +50,13 @@ impl TextRunScanner {
|
||||
let mut last_whitespace = true;
|
||||
while !fragments.is_empty() {
|
||||
// Create a clump.
|
||||
self.clump.append(dlist::split(&mut fragments));
|
||||
self.clump.append(&mut dlist::split(&mut fragments));
|
||||
while !fragments.is_empty() && self.clump
|
||||
.back()
|
||||
.unwrap()
|
||||
.can_merge_with_fragment(fragments.front()
|
||||
.unwrap()) {
|
||||
self.clump.append(dlist::split(&mut fragments));
|
||||
self.clump.append(&mut dlist::split(&mut fragments));
|
||||
}
|
||||
|
||||
// Flush that clump to the list of fragments we're building up.
|
||||
|
@ -22,7 +22,7 @@ git = "https://github.com/servo/rust-geom"
|
||||
|
||||
[dependencies.hyper]
|
||||
git = "https://github.com/servo/hyper"
|
||||
branch = "old_servo_new_cookies"
|
||||
branch = "servo"
|
||||
|
||||
[dependencies.layers]
|
||||
git = "https://github.com/servo/rust-layers"
|
||||
@ -35,3 +35,4 @@ git = "https://github.com/servo/rust-io-surface"
|
||||
|
||||
[dependencies]
|
||||
url = "0.2.16"
|
||||
bitflags = "*"
|
||||
|
@ -8,6 +8,7 @@
|
||||
#![allow(unstable)]
|
||||
|
||||
extern crate azure;
|
||||
#[macro_use] extern crate bitflags;
|
||||
extern crate geom;
|
||||
extern crate hyper;
|
||||
extern crate layers;
|
||||
|
@ -15,11 +15,7 @@ git = "https://github.com/servo/rust-geom"
|
||||
|
||||
[dependencies.hyper]
|
||||
git = "https://github.com/servo/hyper"
|
||||
branch = "old_servo_new_cookies"
|
||||
|
||||
[dependencies.cookie]
|
||||
git = "https://github.com/servo/cookie-rs"
|
||||
branch = "lenientparse_backport"
|
||||
branch = "servo"
|
||||
|
||||
[dependencies.png]
|
||||
git = "https://github.com/servo/rust-png"
|
||||
@ -30,4 +26,6 @@ git = "https://github.com/servo/rust-stb-image"
|
||||
[dependencies]
|
||||
url = "0.2.16"
|
||||
time = "0.1.12"
|
||||
openssl="0.2.15"
|
||||
openssl="0.3.1"
|
||||
rustc-serialize = "0.2"
|
||||
cookie="*"
|
||||
|
@ -10,8 +10,8 @@ use url::Url;
|
||||
use hyper::http::RawStatus;
|
||||
use util::resource_files::resources_dir_path;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::io::fs::PathExtensions;
|
||||
use std::borrow::IntoCow;
|
||||
use std::old_io::fs::PathExtensions;
|
||||
use std::sync::mpsc::Sender;
|
||||
|
||||
pub fn factory(mut load_data: LoadData, start_chan: Sender<TargetedLoadResponse>) {
|
||||
@ -26,7 +26,7 @@ pub fn factory(mut load_data: LoadData, start_chan: Sender<TargetedLoadResponse>
|
||||
content_type: Some(("text".to_string(), "html".to_string())),
|
||||
charset: Some("utf-8".to_string()),
|
||||
headers: None,
|
||||
status: Some(RawStatus(200, "OK".to_owned())),
|
||||
status: Some(RawStatus(200, "OK".into_cow())),
|
||||
});
|
||||
chan.send(Done(Ok(()))).unwrap();
|
||||
return
|
||||
|
@ -13,13 +13,13 @@ use time::{Tm, now, at, Timespec};
|
||||
use url::Url;
|
||||
use std::borrow::ToOwned;
|
||||
use std::i64;
|
||||
use std::io::net::ip::IpAddr;
|
||||
use std::old_io::net::ip::IpAddr;
|
||||
use std::time::Duration;
|
||||
|
||||
/// A stored cookie that wraps the definition in cookie-rs. This is used to implement
|
||||
/// various behaviours defined in the spec that rely on an associated request URL,
|
||||
/// which cookie-rs and hyper's header parsing do not support.
|
||||
#[derive(Clone, Show)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Cookie {
|
||||
pub cookie: cookie_rs::Cookie,
|
||||
pub host_only: bool,
|
||||
@ -121,7 +121,7 @@ impl Cookie {
|
||||
}
|
||||
if string.ends_with(domain_string)
|
||||
&& string.char_at(string.len()-domain_string.len()-1) == '.'
|
||||
&& string.parse::<IpAddr>().is_none() {
|
||||
&& string.parse::<IpAddr>().is_err() {
|
||||
return true;
|
||||
}
|
||||
false
|
||||
|
@ -5,7 +5,7 @@
|
||||
use resource_task::{Metadata, LoadData, TargetedLoadResponse, start_sending, ResponseSenders};
|
||||
use resource_task::ProgressMsg::{Payload, Done};
|
||||
|
||||
use rustc_serialize::base64::FromBase64;
|
||||
use serialize::base64::FromBase64;
|
||||
|
||||
use hyper::mime::Mime;
|
||||
use url::{percent_decode, SchemeData};
|
||||
@ -60,7 +60,7 @@ fn load(load_data: LoadData, start_chan: Sender<TargetedLoadResponse>) {
|
||||
|
||||
// Parse the content type using rust-http.
|
||||
// FIXME: this can go into an infinite loop! (rust-http #25)
|
||||
let content_type: Option<Mime> = ct_str.parse();
|
||||
let content_type: Option<Mime> = ct_str.parse().ok();
|
||||
metadata.set_content_type(content_type.as_ref());
|
||||
|
||||
let progress_chan = start_sending(senders, metadata);
|
||||
|
@ -6,7 +6,7 @@ use url::Url;
|
||||
use hyper::method::Method;
|
||||
use hyper::mime::{Mime, TopLevel, SubLevel, Attr, Value};
|
||||
use hyper::header::Headers;
|
||||
use hyper::header::common::ContentType;
|
||||
use hyper::header::ContentType;
|
||||
use fetch::cors_cache::CORSCache;
|
||||
use fetch::response::Response;
|
||||
|
||||
|
@ -6,8 +6,8 @@ use resource_task::{ProgressMsg, Metadata, LoadData, start_sending, TargetedLoad
|
||||
use resource_task::ProgressMsg::{Payload, Done};
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::io;
|
||||
use std::io::File;
|
||||
use std::old_io as io;
|
||||
use std::old_io::File;
|
||||
use std::sync::mpsc::Sender;
|
||||
use util::task::spawn_named;
|
||||
|
||||
|
@ -11,14 +11,14 @@ use log;
|
||||
use std::collections::HashSet;
|
||||
use file_loader;
|
||||
use hyper::client::Request;
|
||||
use hyper::header::common::{ContentLength, ContentType, Host, Location};
|
||||
use hyper::header::{ContentLength, ContentType, Host, Location};
|
||||
use hyper::HttpError;
|
||||
use hyper::method::Method;
|
||||
use hyper::net::HttpConnector;
|
||||
use hyper::status::{StatusCode, StatusClass};
|
||||
use std::error::Error;
|
||||
use openssl::ssl::{SslContext, SslVerifyMode};
|
||||
use std::io::{IoError, IoErrorKind, Reader};
|
||||
use std::old_io::{IoError, IoErrorKind, Reader};
|
||||
use std::sync::mpsc::{Sender, channel};
|
||||
use std::thunk::Invoke;
|
||||
use util::task::spawn_named;
|
||||
@ -29,7 +29,7 @@ use std::borrow::ToOwned;
|
||||
|
||||
pub fn factory(cookies_chan: Sender<ControlMsg>)
|
||||
-> Box<Invoke<(LoadData, Sender<TargetedLoadResponse>)> + Send> {
|
||||
box move |:(load_data, start_chan)| {
|
||||
box move |(load_data, start_chan)| {
|
||||
spawn_named("http_loader".to_owned(), move || load(load_data, start_chan, cookies_chan))
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ extern crate png;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate openssl;
|
||||
extern crate "rustc-serialize" as rustc_serialize;
|
||||
extern crate "rustc-serialize" as serialize;
|
||||
extern crate util;
|
||||
extern crate stb_image;
|
||||
extern crate time;
|
||||
|
@ -15,25 +15,25 @@ use cookie;
|
||||
|
||||
use util::task::spawn_named;
|
||||
|
||||
use hyper::header::common::UserAgent;
|
||||
use hyper::header::UserAgent;
|
||||
use hyper::header::{Headers, Header, SetCookie};
|
||||
use hyper::http::RawStatus;
|
||||
use hyper::method::Method;
|
||||
use hyper::mime::{Mime, Attr};
|
||||
use url::Url;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::borrow::{ToOwned, IntoCow};
|
||||
use std::sync::mpsc::{channel, Receiver, Sender};
|
||||
use std::thunk::Invoke;
|
||||
use std::collections::HashMap;
|
||||
use std::io::{BufferedReader, File};
|
||||
use std::old_io::{BufferedReader, File};
|
||||
use std::mem;
|
||||
use std::os;
|
||||
|
||||
#[cfg(test)]
|
||||
use std::io::{Listener, Acceptor, TimedOut};
|
||||
use std::old_io::{Listener, Acceptor, TimedOut};
|
||||
#[cfg(test)]
|
||||
use std::io::net::tcp::TcpListener;
|
||||
use std::old_io::net::tcp::TcpListener;
|
||||
|
||||
static mut HOST_TABLE: Option<*mut HashMap<String, String>> = None;
|
||||
|
||||
@ -97,7 +97,7 @@ pub struct ResourceCORSData {
|
||||
}
|
||||
|
||||
/// Metadata about a loaded resource, such as is obtained from HTTP headers.
|
||||
#[deriving(Clone)]
|
||||
#[derive(Clone)]
|
||||
pub struct Metadata {
|
||||
/// Final URL after redirects.
|
||||
pub final_url: Url,
|
||||
@ -124,7 +124,7 @@ impl Metadata {
|
||||
charset: None,
|
||||
headers: None,
|
||||
// http://fetch.spec.whatwg.org/#concept-response-status-message
|
||||
status: Some(RawStatus(200, "OK".to_owned())),
|
||||
status: Some(RawStatus(200, "OK".into_cow())),
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ pub struct ResponseSenders {
|
||||
}
|
||||
|
||||
/// Messages sent in response to a `Load` message
|
||||
#[derive(PartialEq,Show)]
|
||||
#[derive(PartialEq,Debug)]
|
||||
pub enum ProgressMsg {
|
||||
/// Binary data - there may be multiple of these
|
||||
Payload(Vec<u8>),
|
||||
|
@ -47,7 +47,7 @@ fn expand_cased<'cx, T>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree],
|
||||
};
|
||||
match (res, it.count()) {
|
||||
(Some((s, span)), 0) => {
|
||||
let new_s = s.get().chars().map(transform).collect::<String>();
|
||||
let new_s = s.chars().map(transform).collect::<String>();
|
||||
base::MacExpr::new(cx.expr_str(span, token::intern_and_get_ident(new_s.as_slice())))
|
||||
}
|
||||
(_, rest) => {
|
||||
|
@ -15,7 +15,7 @@ use syntax::parse::token::InternedString;
|
||||
pub fn expand_dom_struct(_: &mut ExtCtxt, _: Span, _: &MetaItem, item: P<Item>) -> P<Item> {
|
||||
let mut item2 = (*item).clone();
|
||||
{
|
||||
let mut add_attr = |&mut :s| {
|
||||
let mut add_attr = |s| {
|
||||
item2.attrs.push(attr::mk_attr_outer(attr::mk_attr_id(), attr::mk_word_item(InternedString::new(s))));
|
||||
};
|
||||
add_attr("must_root");
|
||||
@ -41,7 +41,7 @@ pub fn expand_jstraceable(cx: &mut ExtCtxt, span: Span, mitem: &MetaItem, item:
|
||||
path: ty::Path::new(vec!("dom","bindings","trace","JSTraceable")),
|
||||
additional_bounds: Vec::new(),
|
||||
generics: ty::LifetimeBounds::empty(),
|
||||
methods: vec!(
|
||||
methods: vec![
|
||||
MethodDef {
|
||||
name: "trace",
|
||||
generics: ty::LifetimeBounds::empty(),
|
||||
@ -53,9 +53,10 @@ pub fn expand_jstraceable(cx: &mut ExtCtxt, span: Span, mitem: &MetaItem, item:
|
||||
InternedString::new("always")))),
|
||||
combine_substructure: combine_substructure(box jstraceable_substructure)
|
||||
}
|
||||
)
|
||||
],
|
||||
associated_types: vec![],
|
||||
};
|
||||
trait_def.expand(cx, mitem, item, |:a| push(a))
|
||||
trait_def.expand(cx, mitem, item, |a| push(a))
|
||||
}
|
||||
|
||||
// Mostly copied from syntax::ext::deriving::hash
|
||||
@ -66,7 +67,7 @@ fn jstraceable_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substru
|
||||
_ => cx.span_bug(trait_span, "incorrect number of arguments in `jstraceable`")
|
||||
};
|
||||
let trace_ident = substr.method_ident;
|
||||
let call_trace = |&:span, thing_expr| {
|
||||
let call_trace = |span, thing_expr| {
|
||||
let expr = cx.expr_method_call(span, thing_expr, trace_ident, vec!(state_expr.clone()));
|
||||
cx.stmt_expr(expr)
|
||||
};
|
||||
|
@ -12,10 +12,9 @@
|
||||
//! - `#[dom_struct]` : Implies `#[privatize]`,`#[jstraceable]`, and `#[must_root]`.
|
||||
//! Use this for structs that correspond to a DOM type
|
||||
|
||||
#![feature(plugin_registrar, quote, plugin, box_syntax)]
|
||||
#![feature(plugin_registrar, quote, plugin, box_syntax, rustc_private, core)]
|
||||
|
||||
#![allow(missing_copy_implementations)]
|
||||
#![allow(unstable)]
|
||||
|
||||
#[plugin]
|
||||
#[macro_use]
|
||||
|
@ -42,21 +42,19 @@ pub fn match_lang_ty(cx: &Context, ty: &Ty, value: &str) -> bool {
|
||||
if let TyPath(_, ty_id) = ty.node {
|
||||
if let Some(def::DefTy(def_id, _)) = cx.tcx.def_map.borrow().get(&ty_id).cloned() {
|
||||
// Iterating through attributes is hard because of cross-crate defs
|
||||
ty::each_attr(cx.tcx, def_id, |attr| {
|
||||
for attr in ty::get_attrs(cx.tcx, def_id).iter() {
|
||||
if let ast::MetaNameValue(ref name, ref val) = attr.node.value.node {
|
||||
if name.get() == "servo_lang" {
|
||||
if &**name == "servo_lang" {
|
||||
if let ast::LitStr(ref v, _) = val.node {
|
||||
if v.get() == value {
|
||||
if &**v == value {
|
||||
mark_used(attr);
|
||||
found = true;
|
||||
// We're done with the loop
|
||||
return false;
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
true
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
found
|
||||
|
@ -3,7 +3,7 @@ name = "script"
|
||||
version = "0.0.1"
|
||||
authors = ["The Servo Project Developers"]
|
||||
|
||||
build = "make -f makefile.cargo"
|
||||
build = "build.rs"
|
||||
|
||||
[lib]
|
||||
name = "script"
|
||||
@ -50,7 +50,7 @@ git = "https://github.com/servo/html5ever"
|
||||
|
||||
[dependencies.hyper]
|
||||
git = "https://github.com/servo/hyper"
|
||||
branch = "old_servo_new_cookies"
|
||||
branch = "servo"
|
||||
|
||||
[dependencies.js]
|
||||
git = "https://github.com/servo/rust-mozjs"
|
||||
@ -68,3 +68,5 @@ git = "https://github.com/servo/string-cache"
|
||||
encoding = "0.2"
|
||||
url = "0.2.16"
|
||||
time = "0.1.12"
|
||||
bitflags = "*"
|
||||
rustc-serialize = "*"
|
||||
|
18
servo/components/script/build.rs
Normal file
18
servo/components/script/build.rs
Normal file
@ -0,0 +1,18 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![feature(io)]
|
||||
|
||||
use std::old_io::process::{Command, ProcessExit, StdioContainer};
|
||||
|
||||
|
||||
fn main() {
|
||||
let result = Command::new("make")
|
||||
.args(&["-f", "makefile.cargo"])
|
||||
.stdout(StdioContainer::InheritFd(1))
|
||||
.stderr(StdioContainer::InheritFd(2))
|
||||
.status()
|
||||
.unwrap();
|
||||
assert_eq!(result, ProcessExit::ExitStatus(0));
|
||||
}
|
@ -10,16 +10,16 @@
|
||||
//! with CORSRequest being expanded into FetchRequest (etc)
|
||||
|
||||
use std::ascii::AsciiExt;
|
||||
use std::fmt::{self, Show};
|
||||
use std::fmt::{self, Display};
|
||||
use std::str::from_utf8;
|
||||
use time;
|
||||
use time::{now, Timespec};
|
||||
|
||||
use hyper::header::{Headers, Header, HeaderFormat, HeaderView};
|
||||
use hyper::header::shared::util as header_util;
|
||||
use hyper::header::parsing as header_parsing;
|
||||
use hyper::client::Request;
|
||||
use hyper::mime::{Mime, TopLevel, SubLevel};
|
||||
use hyper::header::common::{ContentType, Host};
|
||||
use hyper::header::{ContentType, Host};
|
||||
use hyper::method::Method;
|
||||
use hyper::status::StatusClass::Success;
|
||||
|
||||
@ -160,6 +160,7 @@ impl CORSRequest {
|
||||
}
|
||||
cors_response.headers = response.headers.clone();
|
||||
// Substeps 1-3 (parsing rules: http://fetch.spec.whatwg.org/#http-new-header-syntax)
|
||||
let methods_substep4 = [self.method.clone()];
|
||||
let mut methods = match response.headers.get() {
|
||||
Some(&AccessControlAllowMethods(ref v)) => v.as_slice(),
|
||||
_ => return error
|
||||
@ -169,7 +170,6 @@ impl CORSRequest {
|
||||
_ => return error
|
||||
};
|
||||
// Substep 4
|
||||
let methods_substep4 = [self.method.clone()];
|
||||
if methods.len() == 0 || preflight.mode == RequestMode::ForcedPreflight {
|
||||
methods = methods_substep4.as_slice();
|
||||
}
|
||||
@ -388,19 +388,19 @@ struct AccessControlRequestMethod(pub Method);
|
||||
|
||||
impl Header for AccessControlRequestMethod {
|
||||
#[inline]
|
||||
fn header_name(_: Option<AccessControlRequestMethod>) -> &'static str {
|
||||
fn header_name() -> &'static str {
|
||||
"Access-Control-Request-Method"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<AccessControlRequestMethod> {
|
||||
header_util::from_one_raw_str(raw).map(AccessControlRequestMethod)
|
||||
header_parsing::from_one_raw_str(raw).map(AccessControlRequestMethod)
|
||||
}
|
||||
}
|
||||
|
||||
impl HeaderFormat for AccessControlRequestMethod {
|
||||
fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let AccessControlRequestMethod(ref method) = *self;
|
||||
method.fmt(f)
|
||||
<_ as Display>::fmt(method, f)
|
||||
}
|
||||
}
|
||||
|
||||
@ -409,19 +409,19 @@ struct AccessControlRequestHeaders(pub Vec<String>);
|
||||
|
||||
impl Header for AccessControlRequestHeaders {
|
||||
#[inline]
|
||||
fn header_name(_: Option<AccessControlRequestHeaders>) -> &'static str {
|
||||
fn header_name() -> &'static str {
|
||||
"Access-Control-Request-Headers"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<AccessControlRequestHeaders> {
|
||||
header_util::from_comma_delimited(raw).map(AccessControlRequestHeaders)
|
||||
header_parsing::from_comma_delimited(raw).map(AccessControlRequestHeaders)
|
||||
}
|
||||
}
|
||||
|
||||
impl HeaderFormat for AccessControlRequestHeaders {
|
||||
fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let AccessControlRequestHeaders(ref parts) = *self;
|
||||
header_util::fmt_comma_delimited(f, parts.as_slice())
|
||||
header_parsing::fmt_comma_delimited(f, parts.as_slice())
|
||||
}
|
||||
}
|
||||
|
||||
@ -430,19 +430,19 @@ struct AccessControlAllowMethods(pub Vec<Method>);
|
||||
|
||||
impl Header for AccessControlAllowMethods {
|
||||
#[inline]
|
||||
fn header_name(_: Option<AccessControlAllowMethods>) -> &'static str {
|
||||
fn header_name() -> &'static str {
|
||||
"Access-Control-Allow-Methods"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<AccessControlAllowMethods> {
|
||||
header_util::from_comma_delimited(raw).map(AccessControlAllowMethods)
|
||||
header_parsing::from_comma_delimited(raw).map(AccessControlAllowMethods)
|
||||
}
|
||||
}
|
||||
|
||||
impl HeaderFormat for AccessControlAllowMethods {
|
||||
fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let AccessControlAllowMethods(ref parts) = *self;
|
||||
header_util::fmt_comma_delimited(f, parts.as_slice())
|
||||
header_parsing::fmt_comma_delimited(f, parts.as_slice())
|
||||
}
|
||||
}
|
||||
|
||||
@ -451,19 +451,19 @@ struct AccessControlAllowHeaders(pub Vec<String>);
|
||||
|
||||
impl Header for AccessControlAllowHeaders {
|
||||
#[inline]
|
||||
fn header_name(_: Option<AccessControlAllowHeaders>) -> &'static str {
|
||||
fn header_name() -> &'static str {
|
||||
"Access-Control-Allow-Headers"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<AccessControlAllowHeaders> {
|
||||
header_util::from_comma_delimited(raw).map(AccessControlAllowHeaders)
|
||||
header_parsing::from_comma_delimited(raw).map(AccessControlAllowHeaders)
|
||||
}
|
||||
}
|
||||
|
||||
impl HeaderFormat for AccessControlAllowHeaders {
|
||||
fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let AccessControlAllowHeaders(ref parts) = *self;
|
||||
header_util::fmt_comma_delimited(f, parts.as_slice())
|
||||
header_parsing::fmt_comma_delimited(f, parts.as_slice())
|
||||
}
|
||||
}
|
||||
|
||||
@ -476,7 +476,7 @@ enum AccessControlAllowOrigin {
|
||||
|
||||
impl Header for AccessControlAllowOrigin {
|
||||
#[inline]
|
||||
fn header_name(_: Option<AccessControlAllowOrigin>) -> &'static str {
|
||||
fn header_name() -> &'static str {
|
||||
"Access-Control-Allow-Origin"
|
||||
}
|
||||
|
||||
@ -498,8 +498,8 @@ impl Header for AccessControlAllowOrigin {
|
||||
impl HeaderFormat for AccessControlAllowOrigin {
|
||||
fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
AccessControlAllowOrigin::AllowStar => "*".fmt(f),
|
||||
AccessControlAllowOrigin::AllowOrigin(ref url) => url.fmt(f)
|
||||
AccessControlAllowOrigin::AllowStar => <_ as Display>::fmt("*", f),
|
||||
AccessControlAllowOrigin::AllowOrigin(ref url) => <_ as Display>::fmt(url, f)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -509,19 +509,19 @@ struct AccessControlMaxAge(pub u32);
|
||||
|
||||
impl Header for AccessControlMaxAge {
|
||||
#[inline]
|
||||
fn header_name(_: Option<AccessControlMaxAge>) -> &'static str {
|
||||
fn header_name() -> &'static str {
|
||||
"Access-Control-Max-Age"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<AccessControlMaxAge> {
|
||||
header_util::from_one_raw_str(raw).map(AccessControlMaxAge)
|
||||
header_parsing::from_one_raw_str(raw).map(AccessControlMaxAge)
|
||||
}
|
||||
}
|
||||
|
||||
impl HeaderFormat for AccessControlMaxAge {
|
||||
fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let AccessControlMaxAge(ref num) = *self;
|
||||
num.fmt(f)
|
||||
<_ as Display>::fmt(num, f)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ use std::ffi::CString;
|
||||
use std::ptr;
|
||||
|
||||
/// DOM exceptions that can be thrown by a native DOM method.
|
||||
#[derive(Show, Clone)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Error {
|
||||
/// IndexSizeError
|
||||
IndexSize,
|
||||
|
@ -152,7 +152,8 @@ impl Hash<SipHasher> for ByteString {
|
||||
}
|
||||
|
||||
impl FromStr for ByteString {
|
||||
fn from_str(s: &str) -> Option<ByteString> {
|
||||
Some(ByteString::new(s.to_owned().into_bytes()))
|
||||
type Err = ();
|
||||
fn from_str(s: &str) -> Result<ByteString, ()> {
|
||||
Ok(ByteString::new(s.to_owned().into_bytes()))
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ use std::collections::HashMap;
|
||||
use std::collections::hash_state::HashState;
|
||||
use std::ffi::CString;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::io::timer::Timer;
|
||||
use std::old_io::timer::Timer;
|
||||
use std::rc::Rc;
|
||||
use std::sync::mpsc::{Receiver, Sender};
|
||||
use string_cache::{Atom, Namespace};
|
||||
|
@ -14,7 +14,7 @@ use util::str::DOMString;
|
||||
use std::borrow::ToOwned;
|
||||
|
||||
#[repr(uint)]
|
||||
#[derive(Copy, Show)]
|
||||
#[derive(Copy, Debug)]
|
||||
#[jstraceable]
|
||||
pub enum DOMErrorName {
|
||||
IndexSizeError = DOMExceptionConstants::INDEX_SIZE_ERR as uint,
|
||||
|
@ -92,7 +92,7 @@ impl ElementDerived for EventTarget {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, PartialEq, Show)]
|
||||
#[derive(Copy, PartialEq, Debug)]
|
||||
#[jstraceable]
|
||||
pub enum ElementTypeId {
|
||||
HTMLElement(HTMLElementTypeId),
|
||||
@ -1404,8 +1404,8 @@ impl<'a> style::node::TElement<'a> for JSRef<'a, Element> {
|
||||
|
||||
has_class(self, name)
|
||||
}
|
||||
fn each_class<F>(self, callback: F)
|
||||
where F: Fn(&Atom)
|
||||
fn each_class<F>(self, mut callback: F)
|
||||
where F: FnMut(&Atom)
|
||||
{
|
||||
match self.get_attribute(ns!(""), &atom!("class")).root() {
|
||||
None => {}
|
||||
|
@ -165,9 +165,7 @@ impl HTMLCollection {
|
||||
}
|
||||
|
||||
fn traverse<'a>(root: JSRef<'a, Node>)
|
||||
-> FilterMap<JSRef<'a, Node>,
|
||||
JSRef<'a, Element>,
|
||||
Skip<TreeIterator<'a>>,
|
||||
-> FilterMap<Skip<TreeIterator<'a>>,
|
||||
fn(JSRef<Node>) -> Option<JSRef<Element>>> {
|
||||
root.traverse_preorder()
|
||||
.skip(1)
|
||||
|
@ -206,7 +206,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLElement> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, PartialEq, Show)]
|
||||
#[derive(Copy, PartialEq, Debug)]
|
||||
#[jstraceable]
|
||||
pub enum HTMLElementTypeId {
|
||||
HTMLElement,
|
||||
|
@ -23,7 +23,7 @@ use dom::htmlbuttonelement::{HTMLButtonElement};
|
||||
use dom::htmltextareaelement::{HTMLTextAreaElement, HTMLTextAreaElementHelpers};
|
||||
use dom::node::{Node, NodeHelpers, NodeTypeId, document_from_node, window_from_node};
|
||||
use hyper::method::Method;
|
||||
use hyper::header::common::ContentType;
|
||||
use hyper::header::ContentType;
|
||||
use hyper::mime;
|
||||
use msg::constellation_msg::LoadData;
|
||||
use util::str::DOMString;
|
||||
|
@ -38,7 +38,7 @@ impl HTMLMediaElement {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, PartialEq, Show)]
|
||||
#[derive(Copy, PartialEq, Debug)]
|
||||
#[jstraceable]
|
||||
pub enum HTMLMediaElementTypeId {
|
||||
HTMLAudioElement,
|
||||
|
@ -22,7 +22,7 @@ pub fn serialize(iterator: &mut NodeIterator) -> String {
|
||||
let mut html = String::new();
|
||||
let mut open_elements: Vec<String> = vec!();
|
||||
let depth = iterator.depth;
|
||||
for node in *iterator {
|
||||
for node in iterator {
|
||||
while open_elements.len() > depth {
|
||||
html.push_str("</");
|
||||
html.push_str(open_elements.pop().unwrap().as_slice());
|
||||
|
@ -16,7 +16,7 @@ use cssparser::RGBA;
|
||||
use util::str::{self, DOMString, LengthOrPercentageOrAuto};
|
||||
use std::cell::Cell;
|
||||
|
||||
#[derive(Copy, PartialEq, Show)]
|
||||
#[derive(Copy, PartialEq, Debug)]
|
||||
#[jstraceable]
|
||||
pub enum HTMLTableCellElementTypeId {
|
||||
HTMLTableDataCellElement,
|
||||
|
@ -261,7 +261,7 @@ impl LayoutDataRef {
|
||||
unsafe impl Send for LayoutDataRef {}
|
||||
|
||||
/// The different types of nodes.
|
||||
#[derive(Copy, PartialEq, Show)]
|
||||
#[derive(Copy, PartialEq, Debug)]
|
||||
#[jstraceable]
|
||||
pub enum NodeTypeId {
|
||||
DocumentType,
|
||||
@ -1020,10 +1020,7 @@ impl RawLayoutNodeHelpers for Node {
|
||||
//
|
||||
|
||||
pub type ChildElementIterator<'a> =
|
||||
Peekable<JSRef<'a, Element>,
|
||||
FilterMap<JSRef<'a, Node>,
|
||||
JSRef<'a, Element>,
|
||||
NodeChildrenIterator<'a>,
|
||||
Peekable<FilterMap<NodeChildrenIterator<'a>,
|
||||
fn(JSRef<Node>) -> Option<JSRef<Element>>>>;
|
||||
|
||||
pub struct NodeChildrenIterator<'a> {
|
||||
|
@ -92,7 +92,8 @@ struct Tracer {
|
||||
trc: *mut JSTracer,
|
||||
}
|
||||
|
||||
impl tree_builder::Tracer<JS<Node>> for Tracer {
|
||||
impl tree_builder::Tracer for Tracer {
|
||||
type Handle = JS<Node>;
|
||||
#[allow(unrooted_must_root)]
|
||||
fn trace_handle(&self, node: JS<Node>) {
|
||||
node.trace(self.trc);
|
||||
@ -107,7 +108,7 @@ impl JSTraceable for ServoHTMLParser {
|
||||
let tracer = Tracer {
|
||||
trc: trc,
|
||||
};
|
||||
let tracer = &tracer as &tree_builder::Tracer<JS<Node>>;
|
||||
let tracer = &tracer as &tree_builder::Tracer<Handle=JS<Node>>;
|
||||
|
||||
unsafe {
|
||||
// Assertion: If the parser is mutably borrowed, we're in the
|
||||
|
@ -47,7 +47,7 @@ use js::rust::with_compartment;
|
||||
use url::{Url, UrlParser};
|
||||
|
||||
use libc;
|
||||
use rustc_serialize::base64::{FromBase64, ToBase64, STANDARD};
|
||||
use serialize::base64::{FromBase64, ToBase64, STANDARD};
|
||||
use std::cell::{Ref, RefMut};
|
||||
use std::default::Default;
|
||||
use std::ffi::CString;
|
||||
@ -140,7 +140,7 @@ pub fn base64_btoa(btoa: DOMString) -> Fallible<DOMString> {
|
||||
// http://www.whatwg.org/html/#atob
|
||||
pub fn base64_atob(atob: DOMString) -> Fallible<DOMString> {
|
||||
// "Let input be the string being parsed."
|
||||
let mut input = atob.as_slice();
|
||||
let input = atob.as_slice();
|
||||
|
||||
// "Remove all space characters from input."
|
||||
// serialize::base64::from_base64 ignores \r and \n,
|
||||
@ -152,7 +152,7 @@ pub fn base64_atob(atob: DOMString) -> Fallible<DOMString> {
|
||||
let without_spaces = input.chars()
|
||||
.filter(|&c| ! is_html_space(c))
|
||||
.collect::<String>();
|
||||
input = without_spaces.as_slice();
|
||||
let mut input = without_spaces.as_slice();
|
||||
|
||||
// "If the length of input divides by 4 leaving no remainder, then:
|
||||
// if input ends with one or two U+003D EQUALS SIGN (=) characters,
|
||||
|
@ -33,8 +33,7 @@ use encoding::label::encoding_from_whatwg_label;
|
||||
use encoding::types::{DecoderTrap, Encoding, EncodingRef, EncoderTrap};
|
||||
|
||||
use hyper::header::Headers;
|
||||
use hyper::header::common::{Accept, ContentLength, ContentType};
|
||||
use hyper::header::quality_item::QualityItem;
|
||||
use hyper::header::{Accept, ContentLength, ContentType, QualityItem};
|
||||
use hyper::http::RawStatus;
|
||||
use hyper::mime::{self, Mime};
|
||||
use hyper::method::Method;
|
||||
@ -55,7 +54,7 @@ use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
use std::sync::mpsc::{Sender, Receiver, channel};
|
||||
use std::default::Default;
|
||||
use std::io::Timer;
|
||||
use std::old_io::Timer;
|
||||
use std::str::FromStr;
|
||||
use std::time::duration::Duration;
|
||||
use time;
|
||||
@ -361,8 +360,8 @@ impl<'a> XMLHttpRequestMethods for JSRef<'a, XMLHttpRequest> {
|
||||
match upper.as_slice() {
|
||||
"DELETE" | "GET" | "HEAD" | "OPTIONS" |
|
||||
"POST" | "PUT" | "CONNECT" | "TRACE" |
|
||||
"TRACK" => upper.parse(),
|
||||
_ => s.parse()
|
||||
"TRACK" => upper.parse().ok(),
|
||||
_ => s.parse().ok()
|
||||
}
|
||||
});
|
||||
// Step 2
|
||||
@ -830,7 +829,7 @@ impl<'a> PrivateXMLHttpRequestHelpers for JSRef<'a, XMLHttpRequest> {
|
||||
// Substep 2
|
||||
status.map(|RawStatus(code, reason)| {
|
||||
self.status.set(code);
|
||||
*self.status_text.borrow_mut() = ByteString::new(reason.into_bytes());
|
||||
*self.status_text.borrow_mut() = ByteString::new(reason.into_owned().into_bytes());
|
||||
});
|
||||
headers.as_ref().map(|h| *self.response_headers.borrow_mut() = h.clone());
|
||||
|
||||
@ -990,13 +989,13 @@ impl<'a> PrivateXMLHttpRequestHelpers for JSRef<'a, XMLHttpRequest> {
|
||||
// http://fetch.spec.whatwg.org/#concept-response-header-list
|
||||
use std::fmt;
|
||||
use hyper::header::{Header, HeaderFormat};
|
||||
use hyper::header::common::SetCookie;
|
||||
use hyper::header::SetCookie;
|
||||
|
||||
// a dummy header so we can use headers.remove::<SetCookie2>()
|
||||
#[derive(Clone)]
|
||||
struct SetCookie2;
|
||||
impl Header for SetCookie2 {
|
||||
fn header_name(_: Option<SetCookie2>) -> &'static str {
|
||||
fn header_name() -> &'static str {
|
||||
"set-cookie2"
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ pub struct HitTestResponse(pub UntrustedNodeAddress);
|
||||
pub struct MouseOverResponse(pub Vec<UntrustedNodeAddress>);
|
||||
|
||||
/// Why we're doing reflow.
|
||||
#[derive(PartialEq, Show)]
|
||||
#[derive(PartialEq, Debug)]
|
||||
pub enum ReflowGoal {
|
||||
/// We're reflowing in order to send a display list to the screen.
|
||||
ForDisplay,
|
||||
|
@ -2,7 +2,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![feature(unsafe_destructor, plugin, box_syntax, int_uint)]
|
||||
#![feature(unsafe_destructor, plugin, box_syntax, int_uint, core)]
|
||||
|
||||
#![deny(unsafe_blocks)]
|
||||
#![allow(non_snake_case)]
|
||||
@ -14,6 +14,7 @@
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
#[macro_use] extern crate bitflags;
|
||||
extern crate core;
|
||||
extern crate devtools_traits;
|
||||
extern crate cssparser;
|
||||
@ -26,7 +27,7 @@ extern crate js;
|
||||
extern crate libc;
|
||||
extern crate msg;
|
||||
extern crate net;
|
||||
extern crate "rustc-serialize" as rustc_serialize;
|
||||
extern crate "rustc-serialize" as serialize;
|
||||
extern crate time;
|
||||
extern crate canvas;
|
||||
extern crate script_traits;
|
||||
|
@ -55,7 +55,8 @@ impl SinkHelpers for servohtmlparser::Sink {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> TreeSink<JS<Node>> for servohtmlparser::Sink {
|
||||
impl<'a> TreeSink for servohtmlparser::Sink {
|
||||
type Handle = JS<Node>;
|
||||
fn get_document(&mut self) -> JS<Node> {
|
||||
let doc = self.document.root();
|
||||
let node: JSRef<Node> = NodeCast::from_ref(doc.r());
|
||||
@ -162,6 +163,10 @@ impl<'a> TreeSink<JS<Node>> for servohtmlparser::Sink {
|
||||
let script: Option<JSRef<HTMLScriptElement>> = HTMLScriptElementCast::to_ref(node.r());
|
||||
script.map(|script| script.prepare());
|
||||
}
|
||||
|
||||
fn reparent_children(&mut self, _node: JS<Node>, _new_parent: JS<Node>) {
|
||||
panic!("unimplemented")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn parse_html(document: JSRef<Document>,
|
||||
|
@ -71,7 +71,7 @@ use util::task_state;
|
||||
|
||||
use geom::point::Point2D;
|
||||
use hyper::header::{Header, Headers, HeaderFormat};
|
||||
use hyper::header::shared::util as header_util;
|
||||
use hyper::header::parsing as header_parsing;
|
||||
use js::jsapi::{JS_SetWrapObjectCallbacks, JS_SetGCZeal, JS_DEFAULT_ZEAL_FREQ, JS_GC};
|
||||
use js::jsapi::{JSContext, JSRuntime, JSObject};
|
||||
use js::jsapi::{JS_SetGCParameter, JSGC_MAX_BYTES};
|
||||
@ -84,7 +84,7 @@ use libc;
|
||||
use std::any::Any;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
use std::fmt::{self, Show};
|
||||
use std::fmt::{self, Display};
|
||||
use std::mem::replace;
|
||||
use std::num::ToPrimitive;
|
||||
use std::rc::Rc;
|
||||
@ -1363,13 +1363,13 @@ struct LastModified(pub Tm);
|
||||
|
||||
impl Header for LastModified {
|
||||
#[inline]
|
||||
fn header_name(_: Option<LastModified>) -> &'static str {
|
||||
fn header_name() -> &'static str {
|
||||
"Last-Modified"
|
||||
}
|
||||
|
||||
// Parses an RFC 2616 compliant date/time string,
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<LastModified> {
|
||||
header_util::from_one_raw_str(raw).and_then(|s: String| {
|
||||
header_parsing::from_one_raw_str(raw).and_then(|s: String| {
|
||||
let s = s.as_slice();
|
||||
strptime(s, "%a, %d %b %Y %T %Z").or_else(|_| {
|
||||
strptime(s, "%A, %d-%b-%y %T %Z")
|
||||
@ -1386,8 +1386,8 @@ impl HeaderFormat for LastModified {
|
||||
fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let LastModified(ref tm) = *self;
|
||||
match tm.tm_utcoff {
|
||||
0 => tm.rfc822().fmt(f),
|
||||
_ => tm.to_utc().rfc822().fmt(f)
|
||||
0 => <_ as Display>::fmt(&tm.rfc822(), f),
|
||||
_ => <_ as Display>::fmt(&tm.to_utc().rfc822(), f)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ use std::collections::HashMap;
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
use std::sync::mpsc::Select;
|
||||
use std::hash::{Hash, Hasher, Writer};
|
||||
use std::io::timer::Timer;
|
||||
use std::old_io::timer::Timer;
|
||||
use std::time::duration::Duration;
|
||||
|
||||
#[derive(PartialEq, Eq)]
|
||||
|
393
servo/components/servo/Cargo.lock
generated
393
servo/components/servo/Cargo.lock
generated
@ -3,6 +3,7 @@ name = "servo"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"android_glue 0.0.1",
|
||||
"bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"compositing 0.0.1",
|
||||
"devtools 0.0.1",
|
||||
"gfx 0.0.1",
|
||||
@ -12,8 +13,8 @@ dependencies = [
|
||||
"net 0.0.1",
|
||||
"png 0.1.0 (git+https://github.com/servo/rust-png)",
|
||||
"script 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
@ -21,21 +22,21 @@ dependencies = [
|
||||
name = "android_glue"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"compile_msg 0.1.1 (git+https://github.com/huonw/compile_msg)",
|
||||
"compile_msg 0.1.5 (git+https://github.com/huonw/compile_msg)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "android_glue"
|
||||
version = "0.0.1"
|
||||
source = "git+https://github.com/tomaka/android-rs-glue#8fc770e4c1412293e459bc12ca4fcf57780e2186"
|
||||
source = "git+https://github.com/tomaka/android-rs-glue#f9da46ed02736508d75333008d54506eec87a33b"
|
||||
dependencies = [
|
||||
"compile_msg 0.1.1 (git+https://github.com/huonw/compile_msg)",
|
||||
"compile_msg 0.1.5 (git+https://github.com/huonw/compile_msg)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "azure"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/rust-azure#779233af589e797f07e9e2f3f45017fb55c33c68"
|
||||
source = "git+https://github.com/servo/rust-azure#9ae7938c56e8c59d09a3ce682dd4cf5fcbb2ac57"
|
||||
dependencies = [
|
||||
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)",
|
||||
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics)",
|
||||
@ -47,6 +48,11 @@ dependencies = [
|
||||
"xlib 0.1.0 (git+https://github.com/servo/rust-xlib)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "canvas"
|
||||
version = "0.0.1"
|
||||
@ -68,12 +74,15 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "cocoa"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/servo/rust-cocoa#84a405ba9ff2a79d507dc6ee1ea3cf9bf48706d1"
|
||||
source = "git+https://github.com/servo/rust-cocoa#7f976d95666fec0fd1382e305d534a5e73586a3d"
|
||||
dependencies = [
|
||||
"bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "compile_msg"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/huonw/compile_msg#32a98df61c600ca5487487d2b5e8c55f4bc7a91a"
|
||||
version = "0.1.5"
|
||||
source = "git+https://github.com/huonw/compile_msg#9b01f38964c227a012b4c8196407db63d415ac89"
|
||||
|
||||
[[package]]
|
||||
name = "compositing"
|
||||
@ -92,26 +101,26 @@ dependencies = [
|
||||
"net 0.0.1",
|
||||
"png 0.1.0 (git+https://github.com/servo/rust-png)",
|
||||
"script_traits 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cookie"
|
||||
version = "0.1.8"
|
||||
source = "git+https://github.com/servo/cookie-rs?branch=lenientparse_backport#47ffa4d3c6f85d28f222d6e1d54635fff5622ea3"
|
||||
version = "0.1.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"openssl 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core_foundation"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/rust-core-foundation#ce3d852765827b64a0d5fb2aadd77da39665b0b0"
|
||||
source = "git+https://github.com/servo/rust-core-foundation#da9a52655fce4727dcf261d6ed9a49eeddc7b131"
|
||||
|
||||
[[package]]
|
||||
name = "core_graphics"
|
||||
@ -124,7 +133,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "core_text"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/rust-core-text#b5cb33905350e99b2a19f5a22f7b1efea7ad48c2"
|
||||
source = "git+https://github.com/servo/rust-core-text#e769be9cb3366f9d403ddbee040e031ce03d32bb"
|
||||
dependencies = [
|
||||
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)",
|
||||
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics)",
|
||||
@ -133,9 +142,9 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "cssparser"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/servo/rust-cssparser#d7d50ae2a7da4aca1b2c4d248139510c8e9a25c6"
|
||||
source = "git+https://github.com/servo/rust-cssparser#cf59a4cf55b6386db255d6205b9804d8d74efd35"
|
||||
dependencies = [
|
||||
"encoding 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"text_writer 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -146,7 +155,7 @@ version = "0.0.1"
|
||||
dependencies = [
|
||||
"devtools_traits 0.0.1",
|
||||
"msg 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
@ -155,29 +164,30 @@ name = "devtools_traits"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"msg 0.0.1",
|
||||
"url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "egl"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/rust-egl#cd74c82a8537090edb6c16478e2261db2a8c0b4f"
|
||||
source = "git+https://github.com/servo/rust-egl#328e79b6256dea346f1821ccc4215e95fd1d58bc"
|
||||
|
||||
[[package]]
|
||||
name = "encoding"
|
||||
version = "0.2.18"
|
||||
version = "0.2.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding-index-japanese 1.20141219.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding-index-korean 1.20141219.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding-index-simpchinese 1.20141219.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding-index-singlebyte 1.20141219.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding-index-tradchinese 1.20141219.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding-index-japanese 1.20141219.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding-index-korean 1.20141219.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding-index-simpchinese 1.20141219.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding-index-singlebyte 1.20141219.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding-index-tradchinese 1.20141219.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "encoding-index-japanese"
|
||||
version = "1.20141219.0"
|
||||
version = "1.20141219.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding_index_tests 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -185,7 +195,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "encoding-index-korean"
|
||||
version = "1.20141219.0"
|
||||
version = "1.20141219.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding_index_tests 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -193,7 +203,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "encoding-index-simpchinese"
|
||||
version = "1.20141219.0"
|
||||
version = "1.20141219.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding_index_tests 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -201,7 +211,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "encoding-index-singlebyte"
|
||||
version = "1.20141219.0"
|
||||
version = "1.20141219.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding_index_tests 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -209,7 +219,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "encoding-index-tradchinese"
|
||||
version = "1.20141219.0"
|
||||
version = "1.20141219.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding_index_tests 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -223,12 +233,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
[[package]]
|
||||
name = "expat-sys"
|
||||
version = "2.1.0"
|
||||
source = "git+https://github.com/servo/libexpat#da2ddaf78cbef836b8790807bb76b357c58df3a1"
|
||||
source = "git+https://github.com/servo/libexpat#fe8c3222efdd486b95ef198ef4eee0506e37a809"
|
||||
|
||||
[[package]]
|
||||
name = "fontconfig"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/rust-fontconfig#f42ff5cbd0404fe4d2cd64e8d9bb6307bad8fd7c"
|
||||
source = "git+https://github.com/servo/rust-fontconfig#91195bd29daa9280680bb28ba556821d504a17c6"
|
||||
dependencies = [
|
||||
"fontconfig-sys 2.11.1 (git+https://github.com/servo/libfontconfig)",
|
||||
]
|
||||
@ -236,7 +246,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "fontconfig-sys"
|
||||
version = "2.11.1"
|
||||
source = "git+https://github.com/servo/libfontconfig#fcc324d2c8175d2e8e8c0aab032c03a404809f6d"
|
||||
source = "git+https://github.com/servo/libfontconfig#adc60cacbca697123f4535ce2ff07619ec013cec"
|
||||
dependencies = [
|
||||
"expat-sys 2.1.0 (git+https://github.com/servo/libexpat)",
|
||||
"freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)",
|
||||
@ -245,33 +255,42 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "freetype"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/rust-freetype#ec0231343a3ad360d86846c12895a0a0cbb19f79"
|
||||
source = "git+https://github.com/servo/rust-freetype#f65e8d82550b5d5b06a7785a13a008e125c30b7a"
|
||||
|
||||
[[package]]
|
||||
name = "freetype-sys"
|
||||
version = "2.4.11"
|
||||
source = "git+https://github.com/servo/libfreetype2#f5c49c0da1d5bc6b206c4176344012ac37524243"
|
||||
source = "git+https://github.com/servo/libfreetype2#7b9d112c0a93574b4bf518922d16b8879c7aadae"
|
||||
|
||||
[[package]]
|
||||
name = "gcc"
|
||||
version = "0.1.4"
|
||||
source = "git+https://github.com/alexcrichton/gcc-rs#f5c52d956e0742a66e40c8301e634e136c3ae287"
|
||||
version = "0.1.7"
|
||||
source = "git+https://github.com/alexcrichton/gcc-rs#016cc1597bbe52c26e41cf687476ba93f27fec41"
|
||||
|
||||
[[package]]
|
||||
name = "gcc"
|
||||
version = "0.1.4"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "gdi32-sys"
|
||||
version = "0.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "geom"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/rust-geom#a4a4a03aa024412bf3f4e093c0198b433c6ad63f"
|
||||
source = "git+https://github.com/servo/rust-geom#e9d7ad3ce613dc152ec06a0cecaee6b628f903a1"
|
||||
|
||||
[[package]]
|
||||
name = "gfx"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
|
||||
"bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)",
|
||||
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics)",
|
||||
"core_text 0.1.0 (git+https://github.com/servo/rust-core-text)",
|
||||
@ -288,16 +307,11 @@ dependencies = [
|
||||
"skia 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)",
|
||||
"stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image)",
|
||||
"style 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gl_common"
|
||||
version = "0.0.3"
|
||||
source = "git+https://github.com/bjz/gl-rs.git#230e6c9ed611cddfcb6682dee9686471d54863d0"
|
||||
|
||||
[[package]]
|
||||
name = "gl_common"
|
||||
version = "0.0.3"
|
||||
@ -305,54 +319,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "gl_generator"
|
||||
version = "0.0.12"
|
||||
source = "git+https://github.com/bjz/gl-rs.git#230e6c9ed611cddfcb6682dee9686471d54863d0"
|
||||
dependencies = [
|
||||
"gl_common 0.0.3 (git+https://github.com/bjz/gl-rs.git)",
|
||||
"khronos_api 0.0.5 (git+https://github.com/bjz/gl-rs.git)",
|
||||
"log 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xml-rs 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gl_generator"
|
||||
version = "0.0.12"
|
||||
version = "0.0.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gl_common 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"khronos_api 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xml-rs 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"khronos_api 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xml-rs 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gleam"
|
||||
version = "0.0.1"
|
||||
source = "git+https://github.com/servo/gleam#375779e0e8e1eaa8ff1a732c81fa91808a7f6c63"
|
||||
source = "git+https://github.com/servo/gleam#7e063390e52df54e6f90884535c072b99b69de1b"
|
||||
dependencies = [
|
||||
"gl_common 0.0.3 (git+https://github.com/bjz/gl-rs.git)",
|
||||
"gl_generator 0.0.12 (git+https://github.com/bjz/gl-rs.git)",
|
||||
"gl_common 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl_generator 0.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"khronos_api 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glutin"
|
||||
version = "0.0.4-pre"
|
||||
source = "git+https://github.com/servo/glutin?branch=servo#3814e0cadc85f558b7a417c9d4b97337382aeb36"
|
||||
source = "git+https://github.com/servo/glutin?branch=servo#7d602af694bdb400944990846f91d1043e2a2bc8"
|
||||
dependencies = [
|
||||
"android_glue 0.0.1 (git+https://github.com/tomaka/android-rs-glue)",
|
||||
"cocoa 0.1.1 (git+https://github.com/servo/rust-cocoa)",
|
||||
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)",
|
||||
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics)",
|
||||
"gdi32-sys 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl_common 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl_generator 0.0.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"khronos_api 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl_generator 0.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"khronos_api 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"user32-sys 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glutin_app"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cgl 0.0.1 (git+https://github.com/servo/rust-cgl)",
|
||||
"compositing 0.0.1",
|
||||
"egl 0.1.0 (git+https://github.com/servo/rust-egl)",
|
||||
@ -361,57 +368,59 @@ dependencies = [
|
||||
"glutin 0.0.4-pre (git+https://github.com/servo/glutin?branch=servo)",
|
||||
"layers 0.1.0 (git+https://github.com/servo/rust-layers)",
|
||||
"msg 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glx"
|
||||
version = "0.0.1"
|
||||
source = "git+https://github.com/servo/rust-glx#f056a8998987f6f081f9ad7fa396beb1b2988c02"
|
||||
source = "git+https://github.com/servo/rust-glx#d8a3329d1f68dc4cf72509daca7ef837b8ce94d6"
|
||||
dependencies = [
|
||||
"gl_common 0.0.3 (git+https://github.com/bjz/gl-rs.git)",
|
||||
"gl_generator 0.0.12 (git+https://github.com/bjz/gl-rs.git)",
|
||||
"gl_common 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl_generator 0.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"khronos_api 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "harfbuzz"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/rust-harfbuzz#59b5b18087418404d661784934c3d864386024b5"
|
||||
source = "git+https://github.com/servo/rust-harfbuzz#d5833511875673aa994ca194922acb3b1ea3ec61"
|
||||
|
||||
[[package]]
|
||||
name = "html5ever"
|
||||
version = "0.0.0"
|
||||
source = "git+https://github.com/servo/html5ever#d35dfaaf0d85007057a299afc370d07e92538944"
|
||||
source = "git+https://github.com/servo/html5ever#1c8c09934657fa8edb8ac94070a9061bc040621d"
|
||||
dependencies = [
|
||||
"html5ever_macros 0.0.0 (git+https://github.com/servo/html5ever)",
|
||||
"phf 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_mac 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_macros 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "html5ever_macros"
|
||||
version = "0.0.0"
|
||||
source = "git+https://github.com/servo/html5ever#d35dfaaf0d85007057a299afc370d07e92538944"
|
||||
source = "git+https://github.com/servo/html5ever#1c8c09934657fa8edb8ac94070a9061bc040621d"
|
||||
|
||||
[[package]]
|
||||
name = "hyper"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/servo/hyper?branch=old_servo_new_cookies#7a346f481d683705709526594aa5f13b5c923bc1"
|
||||
version = "0.1.10"
|
||||
source = "git+https://github.com/servo/hyper?branch=servo#1f5547c4b7fd29781426f82dd857a96f1478b01c"
|
||||
dependencies = [
|
||||
"cookie 0.1.8 (git+https://github.com/servo/cookie-rs?branch=lenientparse_backport)",
|
||||
"log 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mime 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mucell 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicase 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unsafe-any 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cookie 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mime 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mucell 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicase 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unsafe-any 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -428,25 +437,28 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "js"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/rust-mozjs#6cabb12f858f27d23fc3d2d9f0c334b80eb56573"
|
||||
source = "git+https://github.com/servo/rust-mozjs#f01d85186415afdaded8179ba7455534931778ca"
|
||||
dependencies = [
|
||||
"mozjs-sys 0.0.0 (git+https://github.com/servo/mozjs)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "khronos_api"
|
||||
version = "0.0.4"
|
||||
name = "kernel32-sys"
|
||||
version = "0.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "khronos_api"
|
||||
version = "0.0.5"
|
||||
source = "git+https://github.com/bjz/gl-rs.git#230e6c9ed611cddfcb6682dee9686471d54863d0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "layers"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/rust-layers#8eec5bd428b57391329dbdb3656241a065b261d9"
|
||||
source = "git+https://github.com/servo/rust-layers#1ef45363e38cb4257d99a4de6a43bf99c1a6f807"
|
||||
dependencies = [
|
||||
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
|
||||
"cgl 0.0.1 (git+https://github.com/servo/rust-cgl)",
|
||||
@ -464,20 +476,23 @@ dependencies = [
|
||||
name = "layout"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"canvas 0.0.1",
|
||||
"cssparser 0.2.0 (git+https://github.com/servo/rust-cssparser)",
|
||||
"encoding 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",
|
||||
"gfx 0.0.1",
|
||||
"layout_traits 0.0.1",
|
||||
"msg 0.0.1",
|
||||
"net 0.0.1",
|
||||
"plugins 0.0.1",
|
||||
"png 0.1.0 (git+https://github.com/servo/rust-png)",
|
||||
"script 0.0.1",
|
||||
"script_traits 0.0.1",
|
||||
"string_cache 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"style 0.0.1",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
@ -494,24 +509,26 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "0.1.6"
|
||||
source = "git+https://github.com/Kimundi/lazy-static.rs#31a7aa0176ecd70b4aab274a40d1e2cd78c1fbf8"
|
||||
version = "0.1.7"
|
||||
source = "git+https://github.com/Kimundi/lazy-static.rs#b48b0c551087af9d598a0452f4e3973d98d4419b"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "libressl-pnacl-sys"
|
||||
version = "2.1.0"
|
||||
version = "2.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"pnacl-build-helper 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pnacl-build-helper 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.1.9"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"regex 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "matches"
|
||||
@ -520,98 +537,102 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "mime"
|
||||
version = "0.0.6"
|
||||
version = "0.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"log 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mod_path"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "mozjs-sys"
|
||||
version = "0.0.0"
|
||||
source = "git+https://github.com/servo/mozjs#58ee8869c7e589244ab2eb3a3ad15e2b64498428"
|
||||
source = "git+https://github.com/servo/mozjs#2267d10685f101438e4f9e8bdfeb9964214dbeeb"
|
||||
|
||||
[[package]]
|
||||
name = "msg"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"azure 0.1.0 (git+https://github.com/servo/rust-azure)",
|
||||
"bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)",
|
||||
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",
|
||||
"hyper 0.1.1 (git+https://github.com/servo/hyper?branch=old_servo_new_cookies)",
|
||||
"hyper 0.1.10 (git+https://github.com/servo/hyper?branch=servo)",
|
||||
"io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface)",
|
||||
"layers 0.1.0 (git+https://github.com/servo/rust-layers)",
|
||||
"style 0.0.1",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mucell"
|
||||
version = "0.1.10"
|
||||
version = "0.1.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "net"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"cookie 0.1.8 (git+https://github.com/servo/cookie-rs?branch=lenientparse_backport)",
|
||||
"cookie 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",
|
||||
"hyper 0.1.1 (git+https://github.com/servo/hyper?branch=old_servo_new_cookies)",
|
||||
"openssl 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.1.10 (git+https://github.com/servo/hyper?branch=servo)",
|
||||
"openssl 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"png 0.1.0 (git+https://github.com/servo/rust-png)",
|
||||
"rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openssl"
|
||||
version = "0.2.15"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"openssl-sys 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openssl-sys"
|
||||
version = "0.2.16"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libressl-pnacl-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libressl-pnacl-sys 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf"
|
||||
version = "0.4.9"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"phf_shared 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_shared 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_mac"
|
||||
version = "0.4.9"
|
||||
name = "phf_macros"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"phf_shared 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_shared 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_shared"
|
||||
version = "0.4.9"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.1.1"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@ -620,57 +641,63 @@ version = "0.0.1"
|
||||
|
||||
[[package]]
|
||||
name = "pnacl-build-helper"
|
||||
version = "1.0.0"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "png"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/rust-png#ade2143c96641abdaedd8bc556f45935d18c35df"
|
||||
source = "git+https://github.com/servo/rust-png#687f103498654815682d2a750f26bbefc46d9da4"
|
||||
dependencies = [
|
||||
"gcc 0.1.4 (git+https://github.com/alexcrichton/gcc-rs)",
|
||||
"gcc 0.1.7 (git+https://github.com/alexcrichton/gcc-rs)",
|
||||
"png-sys 1.6.16 (git+https://github.com/servo/rust-png)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "png-sys"
|
||||
version = "1.6.16"
|
||||
source = "git+https://github.com/servo/rust-png#ade2143c96641abdaedd8bc556f45935d18c35df"
|
||||
source = "git+https://github.com/servo/rust-png#687f103498654815682d2a750f26bbefc46d9da4"
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "0.1.10"
|
||||
name = "rand"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-serialize"
|
||||
version = "0.2.7"
|
||||
version = "0.2.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "script"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"canvas 0.0.1",
|
||||
"cssparser 0.2.0 (git+https://github.com/servo/rust-cssparser)",
|
||||
"devtools_traits 0.0.1",
|
||||
"encoding 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",
|
||||
"gfx 0.0.1",
|
||||
"html5ever 0.0.0 (git+https://github.com/servo/html5ever)",
|
||||
"hyper 0.1.1 (git+https://github.com/servo/hyper?branch=old_servo_new_cookies)",
|
||||
"hyper 0.1.10 (git+https://github.com/servo/hyper?branch=servo)",
|
||||
"js 0.1.0 (git+https://github.com/servo/rust-mozjs)",
|
||||
"msg 0.0.1",
|
||||
"net 0.0.1",
|
||||
"plugins 0.0.1",
|
||||
"rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"script_traits 0.0.1",
|
||||
"string_cache 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"style 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"uuid 0.1.7 (git+https://github.com/rust-lang/uuid)",
|
||||
"uuid 0.1.9 (git+https://github.com/rust-lang/uuid)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -681,14 +708,14 @@ dependencies = [
|
||||
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",
|
||||
"msg 0.0.1",
|
||||
"net 0.0.1",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "skia"
|
||||
version = "0.0.20130412"
|
||||
source = "git+https://github.com/servo/skia?branch=upstream-2014-06-16#387777643df6df6ce8fb61ce069c7c60b32ab38c"
|
||||
source = "git+https://github.com/servo/skia?branch=upstream-2014-06-16#76b626df0d6cfb32eb1ee5ba3c7b52aadd5a42e3"
|
||||
dependencies = [
|
||||
"expat-sys 2.1.0 (git+https://github.com/servo/libexpat)",
|
||||
"freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)",
|
||||
@ -697,16 +724,16 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "stb_image"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/rust-stb-image#2ba03a447b9ef101c25e07bb7f8876416e5fcd71"
|
||||
source = "git+https://github.com/servo/rust-stb-image#8fb5031333ea142802724719ce20bfa132bc4802"
|
||||
|
||||
[[package]]
|
||||
name = "string_cache"
|
||||
version = "0.0.0"
|
||||
source = "git+https://github.com/servo/string-cache#43a1e5d0d0f2a45e2b96160c8fbe6e1d9602cfa9"
|
||||
source = "git+https://github.com/servo/string-cache#12b84faff894d358a546bf064b0daf5f04f2a96b"
|
||||
dependencies = [
|
||||
"lazy_static 0.1.6 (git+https://github.com/Kimundi/lazy-static.rs)",
|
||||
"phf 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_mac 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.1.7 (git+https://github.com/Kimundi/lazy-static.rs)",
|
||||
"phf 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_macros 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"xxhash 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -714,26 +741,27 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "string_cache_macros"
|
||||
version = "0.0.0"
|
||||
source = "git+https://github.com/servo/string-cache#43a1e5d0d0f2a45e2b96160c8fbe6e1d9602cfa9"
|
||||
source = "git+https://github.com/servo/string-cache#12b84faff894d358a546bf064b0daf5f04f2a96b"
|
||||
dependencies = [
|
||||
"lazy_static 0.1.6 (git+https://github.com/Kimundi/lazy-static.rs)",
|
||||
"lazy_static 0.1.7 (git+https://github.com/Kimundi/lazy-static.rs)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "style"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cssparser 0.2.0 (git+https://github.com/servo/rust-cssparser)",
|
||||
"encoding 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",
|
||||
"lazy_static 0.1.6 (git+https://github.com/Kimundi/lazy-static.rs)",
|
||||
"lazy_static 0.1.7 (git+https://github.com/Kimundi/lazy-static.rs)",
|
||||
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mod_path 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mod_path 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"plugins 0.0.1",
|
||||
"string_cache 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"text_writer 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
@ -748,69 +776,88 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.1.12"
|
||||
version = "0.1.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicase"
|
||||
version = "0.0.2"
|
||||
version = "0.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "unsafe-any"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "url"
|
||||
version = "0.2.16"
|
||||
version = "0.2.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "user32-sys"
|
||||
version = "0.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "util"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cssparser 0.2.0 (git+https://github.com/servo/rust-cssparser)",
|
||||
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",
|
||||
"layers 0.1.0 (git+https://github.com/servo/rust-layers)",
|
||||
"lazy_static 0.1.7 (git+https://github.com/Kimundi/lazy-static.rs)",
|
||||
"plugins 0.0.1",
|
||||
"rand 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"task_info 0.0.1",
|
||||
"text_writer 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "0.1.7"
|
||||
source = "git+https://github.com/rust-lang/uuid#3ea51ffa0682c820e8c8b505de078e3bc93e2cb3"
|
||||
version = "0.1.9"
|
||||
source = "git+https://github.com/rust-lang/uuid#3128649cde7c4ba390b31298093d6c181a23eb61"
|
||||
dependencies = [
|
||||
"rustc-serialize 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.0.5"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "xlib"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/rust-xlib#138b0e281b9fd64f7d2e17080fa9a2d4a8554313"
|
||||
source = "git+https://github.com/servo/rust-xlib#7558b1b41304292955b3c081dba23d291458fde9"
|
||||
dependencies = [
|
||||
"bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xml-rs"
|
||||
version = "0.1.12"
|
||||
version = "0.1.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xxhash"
|
||||
|
@ -69,3 +69,4 @@ optional = true
|
||||
[dependencies]
|
||||
url = "0.2.16"
|
||||
time = "0.1.12"
|
||||
bitflags = "*"
|
||||
|
@ -36,3 +36,4 @@ encoding = "0.2"
|
||||
matches = "0.1"
|
||||
url = "0.2.16"
|
||||
mod_path = "0.1"
|
||||
bitflags = "*"
|
||||
|
@ -2,10 +2,12 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::os;
|
||||
use std::path::Path;
|
||||
use std::io::process::{Command, ProcessExit, StdioContainer};
|
||||
use std::io::File;
|
||||
#![feature(path, io, env)]
|
||||
|
||||
use std::env;
|
||||
use std::old_path::Path;
|
||||
use std::old_io::process::{Command, ProcessExit, StdioContainer};
|
||||
use std::old_io::File;
|
||||
|
||||
|
||||
fn main() {
|
||||
@ -26,6 +28,6 @@ fn main() {
|
||||
.output()
|
||||
.unwrap();
|
||||
assert_eq!(result.status, ProcessExit::ExitStatus(0));
|
||||
let out = Path::new(os::getenv("OUT_DIR").unwrap());
|
||||
File::create(&out.join("properties.rs")).unwrap().write(&*result.output).unwrap();
|
||||
let out = Path::new(env::var_string("OUT_DIR").unwrap());
|
||||
File::create(&out.join("properties.rs")).unwrap().write_all(&*result.output).unwrap();
|
||||
}
|
||||
|
@ -31,19 +31,19 @@ pub fn iter_font_face_rules_inner<F>(rules: &[CSSRule], device: &Device,
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Show, PartialEq, Eq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum Source {
|
||||
Url(UrlSource),
|
||||
Local(String),
|
||||
}
|
||||
|
||||
#[derive(Clone, Show, PartialEq, Eq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct UrlSource {
|
||||
pub url: Url,
|
||||
pub format_hints: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Show, PartialEq, Eq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct FontFaceRule {
|
||||
pub family: String,
|
||||
pub sources: Vec<Source>,
|
||||
@ -58,9 +58,10 @@ pub fn parse_font_face_block(context: &ParserContext, input: &mut Parser)
|
||||
while let Some(declaration) = iter.next() {
|
||||
match declaration {
|
||||
Err(range) => {
|
||||
let pos = range.start;
|
||||
let message = format!("Unsupported @font-face descriptor declaration: '{}'",
|
||||
iter.input.slice(range));
|
||||
log_css_error(iter.input, range.start, &*message);
|
||||
log_css_error(iter.input, pos, &*message);
|
||||
}
|
||||
Ok(FontFaceDescriptorDeclaration::Family(value)) => {
|
||||
family = Some(value);
|
||||
|
@ -10,6 +10,7 @@
|
||||
#![allow(unstable)]
|
||||
|
||||
#[macro_use] extern crate log;
|
||||
#[macro_use] extern crate bitflags;
|
||||
#[no_link] #[macro_use] #[plugin] extern crate string_cache_macros;
|
||||
|
||||
extern crate collections;
|
||||
|
@ -11,12 +11,12 @@ use util::geometry::{Au, ViewportPx};
|
||||
use values::{computed, specified};
|
||||
|
||||
|
||||
#[derive(Show, PartialEq)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct MediaQueryList {
|
||||
media_queries: Vec<MediaQuery>
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Copy, Show)]
|
||||
#[derive(PartialEq, Eq, Copy, Debug)]
|
||||
pub enum Range<T> {
|
||||
Min(T),
|
||||
Max(T),
|
||||
@ -33,18 +33,18 @@ impl<T: Ord> Range<T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Copy, Show)]
|
||||
#[derive(PartialEq, Eq, Copy, Debug)]
|
||||
pub enum Expression {
|
||||
Width(Range<Au>),
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Copy, Show)]
|
||||
#[derive(PartialEq, Eq, Copy, Debug)]
|
||||
pub enum Qualifier {
|
||||
Only,
|
||||
Not,
|
||||
}
|
||||
|
||||
#[derive(Show, PartialEq)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct MediaQuery {
|
||||
qualifier: Option<Qualifier>,
|
||||
media_type: MediaQueryType,
|
||||
@ -62,13 +62,13 @@ impl MediaQuery {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Copy, Show)]
|
||||
#[derive(PartialEq, Eq, Copy, Debug)]
|
||||
pub enum MediaQueryType {
|
||||
All, // Always true
|
||||
MediaType(MediaType),
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Copy, Show)]
|
||||
#[derive(PartialEq, Eq, Copy, Debug)]
|
||||
pub enum MediaType {
|
||||
Screen,
|
||||
Print,
|
||||
@ -76,7 +76,7 @@ pub enum MediaType {
|
||||
}
|
||||
|
||||
#[allow(missing_copy_implementations)]
|
||||
#[derive(Show)]
|
||||
#[derive(Debug)]
|
||||
pub struct Device {
|
||||
pub media_type: MediaType,
|
||||
pub viewport_size: TypedSize2D<ViewportPx, f32>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::fmt;
|
||||
use std::fmt::Show;
|
||||
use std::fmt::Debug;
|
||||
use std::sync::Arc;
|
||||
|
||||
use util::logical_geometry::{WritingMode, LogicalMargin};
|
||||
@ -506,7 +506,7 @@ pub mod longhands {
|
||||
Length(Au),
|
||||
Number(CSSFloat),
|
||||
}
|
||||
impl fmt::Show for T {
|
||||
impl fmt::Debug for T {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
&T::Normal => write!(f, "normal"),
|
||||
@ -594,7 +594,7 @@ pub mod longhands {
|
||||
Length(Au),
|
||||
Percentage(CSSFloat),
|
||||
}
|
||||
impl fmt::Show for T {
|
||||
impl fmt::Debug for T {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
% for keyword in vertical_align_keywords:
|
||||
@ -1107,7 +1107,7 @@ pub mod longhands {
|
||||
Weight${weight},
|
||||
% endfor
|
||||
}
|
||||
impl fmt::Show for T {
|
||||
impl fmt::Debug for T {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
% for weight in range(100, 901, 100):
|
||||
@ -1529,7 +1529,7 @@ pub mod longhands {
|
||||
use text_writer::{self, TextWriter};
|
||||
use util::cursor::Cursor;
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Show)]
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Debug)]
|
||||
pub enum T {
|
||||
AutoCursor,
|
||||
SpecifiedCursor(Cursor),
|
||||
@ -1667,7 +1667,7 @@ pub mod longhands {
|
||||
pub inset: bool,
|
||||
}
|
||||
|
||||
impl fmt::Show for BoxShadow {
|
||||
impl fmt::Debug for BoxShadow {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
if self.inset {
|
||||
let _ = write!(f, "inset ");
|
||||
@ -1781,7 +1781,7 @@ pub mod longhands {
|
||||
pub mod computed_value {
|
||||
use util::geometry::Au;
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Show)]
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Debug)]
|
||||
pub struct ClipRect {
|
||||
pub top: Au,
|
||||
pub right: Option<Au>,
|
||||
@ -1792,7 +1792,7 @@ pub mod longhands {
|
||||
pub type T = Option<ClipRect>;
|
||||
}
|
||||
|
||||
#[derive(Clone, Show, PartialEq, Copy)]
|
||||
#[derive(Clone, Debug, PartialEq, Copy)]
|
||||
pub struct SpecifiedClipRect {
|
||||
pub top: specified::Length,
|
||||
pub right: Option<specified::Length>,
|
||||
@ -1901,7 +1901,7 @@ pub mod longhands {
|
||||
use text_writer::{self, TextWriter};
|
||||
|
||||
// TODO(pcwalton): `blur`, `drop-shadow`
|
||||
#[derive(Clone, PartialEq, Show)]
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub enum Filter {
|
||||
Brightness(CSSFloat),
|
||||
Contrast(CSSFloat),
|
||||
@ -1933,7 +1933,7 @@ pub mod longhands {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Show)]
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub struct T {
|
||||
pub filters: Vec<Filter>,
|
||||
}
|
||||
@ -2548,7 +2548,7 @@ mod property_bit_field {
|
||||
|
||||
/// Declarations are stored in reverse order.
|
||||
/// Overridden declarations are skipped.
|
||||
#[derive(Show, PartialEq)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct PropertyDeclarationBlock {
|
||||
pub important: Arc<Vec<PropertyDeclaration>>,
|
||||
pub normal: Arc<Vec<PropertyDeclaration>>,
|
||||
@ -2606,9 +2606,10 @@ pub fn parse_property_declaration_list(context: &ParserContext, input: &mut Pars
|
||||
}
|
||||
}
|
||||
Err(range) => {
|
||||
let pos = range.start;
|
||||
let message = format!("Unsupported property declaration: '{}'",
|
||||
iter.input.slice(range));
|
||||
log_css_error(iter.input, range.start, &*message);
|
||||
log_css_error(iter.input, pos, &*message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2646,7 +2647,7 @@ fn deduplicate_property_declarations(declarations: Vec<PropertyDeclaration>)
|
||||
}
|
||||
|
||||
|
||||
#[derive(Copy, PartialEq, Eq, Show)]
|
||||
#[derive(Copy, PartialEq, Eq, Debug)]
|
||||
pub enum CSSWideKeyword {
|
||||
InitialKeyword,
|
||||
InheritKeyword,
|
||||
@ -2665,7 +2666,7 @@ impl CSSWideKeyword {
|
||||
}
|
||||
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Show)]
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Debug)]
|
||||
pub enum DeclaredValue<T> {
|
||||
SpecifiedValue(T),
|
||||
Initial,
|
||||
@ -2813,7 +2814,7 @@ impl PropertyDeclaration {
|
||||
}
|
||||
}
|
||||
|
||||
impl Show for PropertyDeclaration {
|
||||
impl Debug for PropertyDeclaration {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}: {}", self.name(), self.value())
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
use std::ascii::AsciiExt;
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::HashMap;
|
||||
use std::hash::Hash;
|
||||
use std::sync::Arc;
|
||||
|
||||
use url::Url;
|
||||
@ -523,7 +522,7 @@ struct Rule {
|
||||
|
||||
/// A property declaration together with its precedence among rules of equal specificity so that
|
||||
/// we can sort them.
|
||||
#[derive(Clone, Show)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct DeclarationBlock {
|
||||
pub declarations: Arc<Vec<PropertyDeclaration>>,
|
||||
source_order: uint,
|
||||
|
@ -15,14 +15,14 @@ use parser::ParserContext;
|
||||
use stylesheets::Origin;
|
||||
|
||||
|
||||
#[derive(PartialEq, Clone, Show)]
|
||||
#[derive(PartialEq, Clone, Debug)]
|
||||
pub struct Selector {
|
||||
pub compound_selectors: Arc<CompoundSelector>,
|
||||
pub pseudo_element: Option<PseudoElement>,
|
||||
pub specificity: u32,
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Hash, Copy, Show)]
|
||||
#[derive(Eq, PartialEq, Clone, Hash, Copy, Debug)]
|
||||
pub enum PseudoElement {
|
||||
Before,
|
||||
After,
|
||||
@ -30,13 +30,13 @@ pub enum PseudoElement {
|
||||
}
|
||||
|
||||
|
||||
#[derive(PartialEq, Clone, Show)]
|
||||
#[derive(PartialEq, Clone, Debug)]
|
||||
pub struct CompoundSelector {
|
||||
pub simple_selectors: Vec<SimpleSelector>,
|
||||
pub next: Option<(Box<CompoundSelector>, Combinator)>, // c.next is left of c
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Clone, Copy, Show)]
|
||||
#[derive(PartialEq, Clone, Copy, Debug)]
|
||||
pub enum Combinator {
|
||||
Child, // >
|
||||
Descendant, // space
|
||||
@ -44,7 +44,7 @@ pub enum Combinator {
|
||||
LaterSibling, // ~
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Hash, Show)]
|
||||
#[derive(Eq, PartialEq, Clone, Hash, Debug)]
|
||||
pub enum SimpleSelector {
|
||||
ID(Atom),
|
||||
Class(Atom),
|
||||
@ -84,27 +84,27 @@ pub enum SimpleSelector {
|
||||
}
|
||||
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Hash, Copy, Show)]
|
||||
#[derive(Eq, PartialEq, Clone, Hash, Copy, Debug)]
|
||||
pub enum CaseSensitivity {
|
||||
CaseSensitive, // Selectors spec says language-defined, but HTML says sensitive.
|
||||
CaseInsensitive,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Hash, Show)]
|
||||
#[derive(Eq, PartialEq, Clone, Hash, Debug)]
|
||||
pub struct LocalName {
|
||||
pub name: Atom,
|
||||
pub lower_name: Atom,
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Hash, Show)]
|
||||
#[derive(Eq, PartialEq, Clone, Hash, Debug)]
|
||||
pub struct AttrSelector {
|
||||
pub name: Atom,
|
||||
pub lower_name: Atom,
|
||||
pub namespace: NamespaceConstraint,
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Hash, Show)]
|
||||
#[derive(Eq, PartialEq, Clone, Hash, Debug)]
|
||||
pub enum NamespaceConstraint {
|
||||
Any,
|
||||
Specific(Namespace),
|
||||
@ -282,7 +282,7 @@ fn parse_type_selector(context: &ParserContext, input: &mut Parser)
|
||||
}
|
||||
|
||||
|
||||
#[derive(Show)]
|
||||
#[derive(Debug)]
|
||||
enum SimpleSelectorParseResult {
|
||||
SimpleSelector(SimpleSelector),
|
||||
PseudoElement(PseudoElement),
|
||||
@ -296,7 +296,7 @@ fn parse_qualified_name<'i, 't>
|
||||
(context: &ParserContext, input: &mut Parser<'i, 't>,
|
||||
in_attr_selector: bool)
|
||||
-> Result<Option<(NamespaceConstraint, Option<CowString<'i>>)>, ()> {
|
||||
let default_namespace = |:local_name| {
|
||||
let default_namespace = |local_name| {
|
||||
let namespace = match context.namespaces.default {
|
||||
Some(ref ns) => NamespaceConstraint::Specific(ns.clone()),
|
||||
None => NamespaceConstraint::Any,
|
||||
@ -304,7 +304,7 @@ fn parse_qualified_name<'i, 't>
|
||||
Ok(Some((namespace, local_name)))
|
||||
};
|
||||
|
||||
let explicit_namespace = |&: input: &mut Parser<'i, 't>, namespace| {
|
||||
let explicit_namespace = |input: &mut Parser<'i, 't>, namespace| {
|
||||
match input.next_including_whitespace() {
|
||||
Ok(Token::Delim('*')) if !in_attr_selector => {
|
||||
Ok(Some((namespace, None)))
|
||||
|
@ -19,7 +19,7 @@ use media_queries::{self, Device, MediaQueryList, parse_media_query_list};
|
||||
use font_face::{FontFaceRule, Source, parse_font_face_block, iter_font_face_rules_inner};
|
||||
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Show)]
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Debug)]
|
||||
pub enum Origin {
|
||||
UserAgent,
|
||||
Author,
|
||||
@ -27,7 +27,7 @@ pub enum Origin {
|
||||
}
|
||||
|
||||
|
||||
#[derive(Show, PartialEq)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct Stylesheet {
|
||||
/// List of rules in the order they were found (important for
|
||||
/// cascading order)
|
||||
@ -36,7 +36,7 @@ pub struct Stylesheet {
|
||||
}
|
||||
|
||||
|
||||
#[derive(Show, PartialEq)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum CSSRule {
|
||||
Charset(String),
|
||||
Namespace(Option<String>, Namespace),
|
||||
@ -45,14 +45,14 @@ pub enum CSSRule {
|
||||
FontFace(FontFaceRule),
|
||||
}
|
||||
|
||||
#[derive(Show, PartialEq)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct MediaRule {
|
||||
pub media_queries: MediaQueryList,
|
||||
pub rules: Vec<CSSRule>,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Show, PartialEq)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct StyleRule {
|
||||
pub selectors: Vec<Selector>,
|
||||
pub declarations: PropertyDeclarationBlock,
|
||||
@ -106,8 +106,9 @@ impl Stylesheet {
|
||||
rules.push(rule);
|
||||
}
|
||||
Err(range) => {
|
||||
let pos = range.start;
|
||||
let message = format!("Invalid rule: '{}'", iter.input.slice(range));
|
||||
log_css_error(iter.input, range.start, &*message);
|
||||
log_css_error(iter.input, pos, &*message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -126,8 +127,9 @@ fn parse_nested_rules(context: &ParserContext, input: &mut Parser) -> Vec<CSSRul
|
||||
match result {
|
||||
Ok(rule) => rules.push(rule),
|
||||
Err(range) => {
|
||||
let pos = range.start;
|
||||
let message = format!("Unsupported rule: '{}'", iter.input.slice(range));
|
||||
log_css_error(iter.input, range.start, &*message);
|
||||
log_css_error(iter.input, pos, &*message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ macro_rules! define_css_keyword_enum {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Show for $name {
|
||||
impl ::std::fmt::Debug for $name {
|
||||
#[inline]
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
use cssparser::ToCss;
|
||||
@ -53,7 +53,7 @@ pub mod specified {
|
||||
use std::ascii::AsciiExt;
|
||||
use std::f64::consts::PI;
|
||||
use std::fmt;
|
||||
use std::fmt::{Formatter, Show};
|
||||
use std::fmt::{Formatter, Debug};
|
||||
use url::Url;
|
||||
use cssparser::{self, Token, Parser, ToCss, CssStringWriter};
|
||||
use parser::ParserContext;
|
||||
@ -82,7 +82,7 @@ pub mod specified {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for CSSColor {
|
||||
impl fmt::Debug for CSSColor {
|
||||
#[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.fmt_to_css(f) }
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ pub mod specified {
|
||||
pub parsed: cssparser::RGBA,
|
||||
pub authored: Option<String>,
|
||||
}
|
||||
impl fmt::Show for CSSRGBA {
|
||||
impl fmt::Debug for CSSRGBA {
|
||||
#[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.fmt_to_css(f) }
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ pub mod specified {
|
||||
#[derive(Clone, PartialEq)]
|
||||
pub struct CSSImage(pub Option<Image>);
|
||||
|
||||
impl fmt::Show for CSSImage {
|
||||
impl fmt::Debug for CSSImage {
|
||||
#[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.fmt_to_css(f) }
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ pub mod specified {
|
||||
ServoCharacterWidth(i32),
|
||||
}
|
||||
|
||||
impl fmt::Show for Length {
|
||||
impl fmt::Debug for Length {
|
||||
#[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.fmt_to_css(f) }
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ pub mod specified {
|
||||
Percentage(CSSFloat), // [0 .. 100%] maps to [0.0 .. 1.0]
|
||||
}
|
||||
|
||||
impl fmt::Show for LengthOrPercentage {
|
||||
impl fmt::Debug for LengthOrPercentage {
|
||||
#[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.fmt_to_css(f) }
|
||||
}
|
||||
|
||||
@ -259,7 +259,7 @@ pub mod specified {
|
||||
Auto,
|
||||
}
|
||||
|
||||
impl fmt::Show for LengthOrPercentageOrAuto {
|
||||
impl fmt::Debug for LengthOrPercentageOrAuto {
|
||||
#[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.fmt_to_css(f) }
|
||||
}
|
||||
|
||||
@ -310,7 +310,7 @@ pub mod specified {
|
||||
None,
|
||||
}
|
||||
|
||||
impl fmt::Show for LengthOrPercentageOrNone {
|
||||
impl fmt::Debug for LengthOrPercentageOrNone {
|
||||
#[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.fmt_to_css(f) }
|
||||
}
|
||||
|
||||
@ -409,7 +409,7 @@ pub mod specified {
|
||||
#[derive(Clone, PartialEq, PartialOrd, Copy)]
|
||||
pub struct Angle(pub CSSFloat);
|
||||
|
||||
impl fmt::Show for Angle {
|
||||
impl fmt::Debug for Angle {
|
||||
#[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.fmt_to_css(f) }
|
||||
}
|
||||
|
||||
@ -457,7 +457,7 @@ pub mod specified {
|
||||
LinearGradient(LinearGradient),
|
||||
}
|
||||
|
||||
impl fmt::Show for Image {
|
||||
impl fmt::Debug for Image {
|
||||
#[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.fmt_to_css(f) }
|
||||
}
|
||||
|
||||
@ -515,7 +515,7 @@ pub mod specified {
|
||||
pub stops: Vec<ColorStop>,
|
||||
}
|
||||
|
||||
impl fmt::Show for LinearGradient {
|
||||
impl fmt::Debug for LinearGradient {
|
||||
#[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.fmt_to_css(f) }
|
||||
}
|
||||
|
||||
@ -539,7 +539,7 @@ pub mod specified {
|
||||
Corner(HorizontalDirection, VerticalDirection),
|
||||
}
|
||||
|
||||
impl fmt::Show for AngleOrCorner {
|
||||
impl fmt::Debug for AngleOrCorner {
|
||||
#[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.fmt_to_css(f) }
|
||||
}
|
||||
|
||||
@ -569,7 +569,7 @@ pub mod specified {
|
||||
pub position: Option<LengthOrPercentage>,
|
||||
}
|
||||
|
||||
impl fmt::Show for ColorStop {
|
||||
impl fmt::Debug for ColorStop {
|
||||
#[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.fmt_to_css(f) }
|
||||
}
|
||||
|
||||
@ -748,7 +748,7 @@ pub mod computed {
|
||||
Length(Au),
|
||||
Percentage(CSSFloat),
|
||||
}
|
||||
impl fmt::Show for LengthOrPercentage {
|
||||
impl fmt::Debug for LengthOrPercentage {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
&LengthOrPercentage::Length(length) => write!(f, "{:?}", length),
|
||||
@ -774,7 +774,7 @@ pub mod computed {
|
||||
Percentage(CSSFloat),
|
||||
Auto,
|
||||
}
|
||||
impl fmt::Show for LengthOrPercentageOrAuto {
|
||||
impl fmt::Debug for LengthOrPercentageOrAuto {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
&LengthOrPercentageOrAuto::Length(length) => write!(f, "{:?}", length),
|
||||
@ -802,7 +802,7 @@ pub mod computed {
|
||||
Percentage(CSSFloat),
|
||||
None,
|
||||
}
|
||||
impl fmt::Show for LengthOrPercentageOrNone {
|
||||
impl fmt::Debug for LengthOrPercentageOrNone {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
&LengthOrPercentageOrNone::Length(length) => write!(f, "{:?}", length),
|
||||
@ -831,7 +831,7 @@ pub mod computed {
|
||||
LinearGradient(LinearGradient),
|
||||
}
|
||||
|
||||
impl fmt::Show for Image {
|
||||
impl fmt::Debug for Image {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
&Image::Url(ref url) => write!(f, "url(\"{}\")", url),
|
||||
@ -850,7 +850,7 @@ pub mod computed {
|
||||
pub stops: Vec<ColorStop>,
|
||||
}
|
||||
|
||||
impl fmt::Show for LinearGradient {
|
||||
impl fmt::Debug for LinearGradient {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let _ = write!(f, "{:?}", self.angle_or_corner);
|
||||
for stop in self.stops.iter() {
|
||||
@ -871,7 +871,7 @@ pub mod computed {
|
||||
pub position: Option<LengthOrPercentage>,
|
||||
}
|
||||
|
||||
impl fmt::Show for ColorStop {
|
||||
impl fmt::Debug for ColorStop {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let _ = write!(f, "{:?}", self.color);
|
||||
self.position.map(|pos| {
|
||||
|
@ -36,7 +36,12 @@ git = "https://github.com/servo/string-cache"
|
||||
[dependencies.string_cache_macros]
|
||||
git = "https://github.com/servo/string-cache"
|
||||
|
||||
[dependencies.lazy_static]
|
||||
git = "https://github.com/Kimundi/lazy-static.rs"
|
||||
|
||||
[dependencies]
|
||||
text_writer = "0.1.1"
|
||||
url = "0.2.16"
|
||||
time = "0.1.12"
|
||||
time = "0.1.12"
|
||||
bitflags = "*"
|
||||
rand = "*"
|
||||
|
@ -10,7 +10,7 @@ use std::collections::hash_state::DefaultState;
|
||||
use rand::Rng;
|
||||
use std::hash::{Hash, Hasher, SipHasher};
|
||||
use std::iter::repeat;
|
||||
use std::rand;
|
||||
use rand;
|
||||
use std::slice::Iter;
|
||||
|
||||
#[cfg(test)]
|
||||
|
@ -10,7 +10,7 @@ use text_writer::TextWriter;
|
||||
|
||||
macro_rules! define_cursor {
|
||||
($( $css: expr => $variant: ident = $value: expr, )+) => {
|
||||
#[derive(Clone, Copy, PartialEq, Eq, FromPrimitive, Show)]
|
||||
#[derive(Clone, Copy, PartialEq, Eq, FromPrimitive, Debug)]
|
||||
#[repr(u8)]
|
||||
pub enum Cursor {
|
||||
$( $variant = $value ),+
|
||||
|
@ -2,8 +2,8 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::io;
|
||||
use std::io::Writer;
|
||||
use std::old_io as io;
|
||||
use std::old_io::Writer;
|
||||
use std::mem;
|
||||
use std::mem::size_of;
|
||||
use std::slice;
|
||||
|
@ -86,19 +86,21 @@ struct Deque<T> {
|
||||
/// There may only be one worker per deque.
|
||||
pub struct Worker<T> {
|
||||
deque: Arc<Deque<T>>,
|
||||
_noshare: marker::NoSync,
|
||||
}
|
||||
|
||||
impl<T> !marker::Sync for Worker<T> {}
|
||||
|
||||
/// The stealing half of the work-stealing deque. Stealers have access to the
|
||||
/// opposite end of the deque from the worker, and they only have access to the
|
||||
/// `steal` method.
|
||||
pub struct Stealer<T> {
|
||||
deque: Arc<Deque<T>>,
|
||||
_noshare: marker::NoSync,
|
||||
}
|
||||
|
||||
impl<T> !marker::Sync for Stealer<T> {}
|
||||
|
||||
/// When stealing some data, this is an enumeration of the possible outcomes.
|
||||
#[derive(PartialEq, Show)]
|
||||
#[derive(PartialEq, Debug)]
|
||||
pub enum Stolen<T> {
|
||||
/// The deque was empty at the time of stealing
|
||||
Empty,
|
||||
@ -156,8 +158,7 @@ impl<T: Send> BufferPool<T> {
|
||||
pub fn deque(&self) -> (Worker<T>, Stealer<T>) {
|
||||
let a = Arc::new(Deque::new(self.clone()));
|
||||
let b = a.clone();
|
||||
(Worker { deque: a, _noshare: marker::NoSync },
|
||||
Stealer { deque: b, _noshare: marker::NoSync })
|
||||
(Worker { deque: a }, Stealer { deque: b })
|
||||
}
|
||||
|
||||
fn alloc(&mut self, bits: uint) -> Box<Buffer<T>> {
|
||||
@ -218,7 +219,7 @@ impl<T: Send> Stealer<T> {
|
||||
|
||||
impl<T: Send> Clone for Stealer<T> {
|
||||
fn clone(&self) -> Stealer<T> {
|
||||
Stealer { deque: self.deque.clone(), _noshare: marker::NoSync }
|
||||
Stealer { deque: self.deque.clone() }
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user