mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update servo to rust 3b6f5a1. Removes extraneous by-ref parameter to option::get(), and removes binary move operator.
This commit is contained in:
parent
c255509688
commit
a7c796aaf1
10 changed files with 16 additions and 23 deletions
|
@ -8,7 +8,7 @@ against a released version of Rust will not work, nor will the Rust
|
||||||
'master' branch. The commit below will *probably* work. If it does not
|
'master' branch. The commit below will *probably* work. If it does not
|
||||||
then the topic in #servo might know better.
|
then the topic in #servo might know better.
|
||||||
|
|
||||||
* Last known-good Rust commit: 754704ea9442ce92602f8022f6c979824b016842
|
* Last known-good Rust commit: 3b6f5a1
|
||||||
|
|
||||||
[rust]: http://www.rust-lang.org
|
[rust]: http://www.rust-lang.org
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit b178de413ad288ba47160a4691cd8a32eddd359c
|
Subproject commit ad15d6ac9c632018da7765b4a6f2037a224f4383
|
|
@ -1 +1 @@
|
||||||
Subproject commit 00adb11b227604d3de74d67f14e7b3deef87ef56
|
Subproject commit cdedc9a50d0c59de945867c72f15e9694f7a73e9
|
|
@ -208,11 +208,11 @@ impl Content {
|
||||||
self.window = Some(@move window);
|
self.window = Some(@move window);
|
||||||
self.doc_url = Some(move url);
|
self.doc_url = Some(move url);
|
||||||
|
|
||||||
let compartment = option::expect(&self.compartment, ~"TODO error checking");
|
let compartment = option::expect(self.compartment, ~"TODO error checking");
|
||||||
compartment.define_functions(debug_fns);
|
compartment.define_functions(debug_fns);
|
||||||
define_bindings(compartment,
|
define_bindings(compartment,
|
||||||
option::get(&self.document),
|
option::get(self.document),
|
||||||
option::get(&self.window));
|
option::get(self.window));
|
||||||
|
|
||||||
do vec::consume(move js_scripts) |_i, bytes| {
|
do vec::consume(move js_scripts) |_i, bytes| {
|
||||||
self.cx.evaluate_script(compartment.global_obj, move bytes, ~"???", 1u);
|
self.cx.evaluate_script(compartment.global_obj, move bytes, ~"???", 1u);
|
||||||
|
@ -222,7 +222,7 @@ impl Content {
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer(timerData) => {
|
Timer(timerData) => {
|
||||||
let compartment = option::expect(&self.compartment, ~"TODO error checking");
|
let compartment = option::expect(self.compartment, ~"TODO error checking");
|
||||||
let thisValue = if timerData.args.len() > 0 {
|
let thisValue = if timerData.args.len() > 0 {
|
||||||
RUST_JSVAL_TO_OBJECT(unsafe { timerData.args.shift() })
|
RUST_JSVAL_TO_OBJECT(unsafe { timerData.args.shift() })
|
||||||
} else {
|
} else {
|
||||||
|
@ -245,7 +245,7 @@ impl Content {
|
||||||
println(fmt!("Error opening %s: %s", url_to_str(copy url), msg));
|
println(fmt!("Error opening %s: %s", url_to_str(copy url), msg));
|
||||||
}
|
}
|
||||||
Ok(move bytes) => {
|
Ok(move bytes) => {
|
||||||
let compartment = option::expect(&self.compartment, ~"TODO error checking");
|
let compartment = option::expect(self.compartment, ~"TODO error checking");
|
||||||
compartment.define_functions(debug_fns);
|
compartment.define_functions(debug_fns);
|
||||||
self.cx.evaluate_script(compartment.global_obj, move bytes, copy url.path, 1u);
|
self.cx.evaluate_script(compartment.global_obj, move bytes, copy url.path, 1u);
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,14 +88,14 @@ impl TokenReader : ParserMethods {
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let tok = self.get();
|
let tok = self.get();
|
||||||
let built_sel <- cur_sel;
|
let built_sel = move cur_sel;
|
||||||
|
|
||||||
match tok {
|
match tok {
|
||||||
tok::Descendant => {
|
tok::Descendant => {
|
||||||
match self.parse_element() {
|
match self.parse_element() {
|
||||||
Some(elmt) => {
|
Some(elmt) => {
|
||||||
let new_sel = copy elmt;
|
let new_sel = copy elmt;
|
||||||
cur_sel <- ~css::Descendant(move built_sel, move new_sel)
|
cur_sel = ~css::Descendant(move built_sel, move new_sel)
|
||||||
}
|
}
|
||||||
None => { return None; }
|
None => { return None; }
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ impl TokenReader : ParserMethods {
|
||||||
match self.parse_element() {
|
match self.parse_element() {
|
||||||
Some(elmt) => {
|
Some(elmt) => {
|
||||||
let new_sel = copy elmt;
|
let new_sel = copy elmt;
|
||||||
cur_sel <- ~css::Child(move built_sel, move new_sel)
|
cur_sel = ~css::Child(move built_sel, move new_sel)
|
||||||
}
|
}
|
||||||
None => { return None; }
|
None => { return None; }
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ impl TokenReader : ParserMethods {
|
||||||
match self.parse_element() {
|
match self.parse_element() {
|
||||||
Some(elmt) => {
|
Some(elmt) => {
|
||||||
let new_sel = copy elmt;
|
let new_sel = copy elmt;
|
||||||
cur_sel <- ~css::Sibling(move built_sel, move new_sel)
|
cur_sel = ~css::Sibling(move built_sel, move new_sel)
|
||||||
}
|
}
|
||||||
None => { return None; }
|
None => { return None; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ unsafe fn domstring_to_jsval(cx: *JSContext, str: &DOMString) -> JSVal {
|
||||||
pub fn get_compartment(cx: *JSContext) -> compartment {
|
pub fn get_compartment(cx: *JSContext) -> compartment {
|
||||||
unsafe {
|
unsafe {
|
||||||
let content = task_from_context(cx);
|
let content = task_from_context(cx);
|
||||||
let compartment = option::expect(&(*content).compartment,
|
let compartment = option::expect((*content).compartment,
|
||||||
~"Should always have compartment when \
|
~"Should always have compartment when \
|
||||||
executing JS code");
|
executing JS code");
|
||||||
assert cx == compartment.cx.ptr;
|
assert cx == compartment.cx.ptr;
|
||||||
|
|
|
@ -154,7 +154,7 @@ impl<T: Copy Send,A> Scope<T,A> {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn free<T:Send>(t: *T) {
|
unsafe fn free<T:Send>(t: *T) {
|
||||||
let _x <- *cast::reinterpret_cast::<*T,*mut T>(&t);
|
let _x = move *cast::reinterpret_cast::<*T,*mut T>(&t);
|
||||||
libc::free(cast::reinterpret_cast(&t));
|
libc::free(cast::reinterpret_cast(&t));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ priv fn simulate_UA_display_rules(node: Node) -> CSSDisplay {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BoxGenerator {
|
impl BoxGenerator {
|
||||||
pub static pure fn new(flow: @FlowContext) -> BoxGenerator {
|
static pub pure fn new(flow: @FlowContext) -> BoxGenerator {
|
||||||
unsafe { debug!("Creating box generator for flow: %s", flow.debug_str()); }
|
unsafe { debug!("Creating box generator for flow: %s", flow.debug_str()); }
|
||||||
BoxGenerator {
|
BoxGenerator {
|
||||||
flow: flow,
|
flow: flow,
|
||||||
|
|
|
@ -102,14 +102,7 @@ fn mainloop(mode: Mode, po: comm::Port<Msg>, dom_event_chan: pipes::SharedChan<E
|
||||||
Size2D(800.0f32, 600.0f32));
|
Size2D(800.0f32, 600.0f32));
|
||||||
|
|
||||||
let done = @mut false;
|
let done = @mut false;
|
||||||
|
|
||||||
let resize_rate_limiter = @ResizeRateLimiter(move dom_event_chan);
|
let resize_rate_limiter = @ResizeRateLimiter(move dom_event_chan);
|
||||||
|
|
||||||
#macro[
|
|
||||||
[#moov[x],
|
|
||||||
unsafe { let y <- *ptr::addr_of(x); y }]
|
|
||||||
];
|
|
||||||
|
|
||||||
let check_for_messages = fn@() {
|
let check_for_messages = fn@() {
|
||||||
|
|
||||||
// Periodically check if content responded to our last resize event
|
// Periodically check if content responded to our last resize event
|
||||||
|
|
|
@ -40,7 +40,7 @@ impl SendableTextRun {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TextRun {
|
impl TextRun {
|
||||||
pub static fn new(font: @Font, text: ~str) -> TextRun {
|
static pub fn new(font: @Font, text: ~str) -> TextRun {
|
||||||
let glyph_store = GlyphStore(text.len());
|
let glyph_store = GlyphStore(text.len());
|
||||||
let run = TextRun {
|
let run = TextRun {
|
||||||
text: move text,
|
text: move text,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue