mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update for latest libcore changes.
This commit is contained in:
parent
fe4b1c92dd
commit
93418d4cc9
9 changed files with 12 additions and 12 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 27bde1d49759768eb7c8e0ac328c3286e0f0cdde
|
Subproject commit 32fef0a352053f84488d1fd8737d8311714173dd
|
|
@ -13,7 +13,7 @@ enum DOMString {
|
||||||
null_string
|
null_string
|
||||||
}
|
}
|
||||||
|
|
||||||
type rust_box<T> = {rc: uint, td: *sys::type_desc, next: *(), prev: *(), payload: T};
|
type rust_box<T> = {rc: uint, td: *sys::TypeDesc, next: *(), prev: *(), payload: T};
|
||||||
|
|
||||||
unsafe fn squirrel_away<T>(+x: @T) -> *rust_box<T> {
|
unsafe fn squirrel_away<T>(+x: @T) -> *rust_box<T> {
|
||||||
let y: *rust_box<T> = unsafe::reinterpret_cast(x);
|
let y: *rust_box<T> = unsafe::reinterpret_cast(x);
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import geom::point::Point2D;
|
import geom::point::Point2D;
|
||||||
import geom::rect::Rect;
|
import geom::rect::Rect;
|
||||||
import geom::size::Size2D;
|
import geom::size::Size2D;
|
||||||
import num::num;
|
import num::Num;
|
||||||
|
|
||||||
enum au = int;
|
enum au = int;
|
||||||
|
|
||||||
impl au : num {
|
impl au : Num {
|
||||||
pure fn add(&&other: au) -> au { au(*self + *other) }
|
pure fn add(&&other: au) -> au { au(*self + *other) }
|
||||||
pure fn sub(&&other: au) -> au { au(*self - *other) }
|
pure fn sub(&&other: au) -> au { au(*self - *other) }
|
||||||
pure fn mul(&&other: au) -> au { au(*self * *other) }
|
pure fn mul(&&other: au) -> au { au(*self * *other) }
|
||||||
|
@ -17,7 +17,7 @@ impl au : num {
|
||||||
pure fn from_int(n: int) -> au { au(n) }
|
pure fn from_int(n: int) -> au { au(n) }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn box<A:copy num>(x: A, y: A, w: A, h: A) -> Rect<A> {
|
fn box<A:copy Num>(x: A, y: A, w: A, h: A) -> Rect<A> {
|
||||||
Rect(Point2D(x, y), Size2D(w, h))
|
Rect(Point2D(x, y), Size2D(w, h))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ import vec::{push, push_all};
|
||||||
import std::net::url::url;
|
import std::net::url::url;
|
||||||
import resource::image_cache_task;
|
import resource::image_cache_task;
|
||||||
import image_cache_task::ImageCacheTask;
|
import image_cache_task::ImageCacheTask;
|
||||||
import core::to_str::to_str;
|
import core::to_str::ToStr;
|
||||||
import std::arc::{arc, clone};
|
import std::arc::{arc, clone};
|
||||||
|
|
||||||
enum BoxKind {
|
enum BoxKind {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import dom::style::{Auto, Px};
|
||||||
import geom::point::Point2D;
|
import geom::point::Point2D;
|
||||||
import geom::size::Size2D;
|
import geom::size::Size2D;
|
||||||
import gfx::geometry::{au, px_to_au};
|
import gfx::geometry::{au, px_to_au};
|
||||||
import num::num;
|
import num::Num;
|
||||||
import util::tree;
|
import util::tree;
|
||||||
|
|
||||||
trait InlineLayout {
|
trait InlineLayout {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import vec::{push, push_all_move, flat_map};
|
||||||
import std::net::url::url;
|
import std::net::url::url;
|
||||||
import resource::resource_task::{ResourceTask, Load, Payload, Done};
|
import resource::resource_task::{ResourceTask, Load, Payload, Done};
|
||||||
import result::{ok, err};
|
import result::{ok, err};
|
||||||
import to_str::to_str;
|
import to_str::ToStr;
|
||||||
|
|
||||||
enum CSSMessage {
|
enum CSSMessage {
|
||||||
File(url),
|
File(url),
|
||||||
|
|
|
@ -15,7 +15,7 @@ import std::arc::arc;
|
||||||
import clone_arc = std::arc::clone;
|
import clone_arc = std::arc::clone;
|
||||||
import std::cell::Cell;
|
import std::cell::Cell;
|
||||||
import result::{result, ok, err};
|
import result::{result, ok, err};
|
||||||
import to_str::to_str;
|
import to_str::ToStr;
|
||||||
|
|
||||||
enum Msg {
|
enum Msg {
|
||||||
/// Tell the cache that we may need a particular image soon. Must be posted
|
/// Tell the cache that we may need a particular image soon. Must be posted
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
import float::round;
|
import float::round;
|
||||||
import libc::types::os::arch::c95::c_double;
|
import libc::types::os::arch::c95::c_double;
|
||||||
import css_colors::*;
|
import css_colors::*;
|
||||||
import cmp::eq;
|
import cmp::Eq;
|
||||||
|
|
||||||
enum Color = {red : u8, green : u8, blue : u8, alpha : float};
|
enum Color = {red : u8, green : u8, blue : u8, alpha : float};
|
||||||
|
|
||||||
impl Color : eq {
|
impl Color : Eq {
|
||||||
pure fn eq(&&other: Color) -> bool {
|
pure fn eq(&&other: Color) -> bool {
|
||||||
return self.red == other.red && self.green == other.green && self.blue == other.blue &&
|
return self.red == other.red && self.green == other.green && self.blue == other.blue &&
|
||||||
self.alpha == other.alpha;
|
self.alpha == other.alpha;
|
||||||
|
|
|
@ -102,7 +102,7 @@ mod make_url_tests {
|
||||||
type UrlMap<T: copy> = hashmap<url, T>;
|
type UrlMap<T: copy> = hashmap<url, T>;
|
||||||
|
|
||||||
fn url_map<T: copy>() -> UrlMap<T> {
|
fn url_map<T: copy>() -> UrlMap<T> {
|
||||||
import core::to_str::to_str;
|
import core::to_str::ToStr;
|
||||||
|
|
||||||
hashmap::<url, T>(|a| str::hash(&a.to_str()),
|
hashmap::<url, T>(|a| str::hash(&a.to_str()),
|
||||||
|a, b| str::eq(&a.to_str(), &b.to_str()))
|
|a, b| str::eq(&a.to_str(), &b.to_str()))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue