diff --git a/Makefile.in b/Makefile.in index d30276acb76..e64ac6a1f8e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -235,23 +235,23 @@ all: src/compiler/rust/rust-auto-clean-stamp servo package $(DONE_util): $(DEPS_util) @$(call E, compile: $@) - $(Q)$(RUSTC) $(RFLAGS_util) -o $@ $< && touch $@ + $(Q)$(RUSTC) $(RFLAGS_util) --out-dir src/components/util $< && touch $@ $(DONE_net): $(DEPS_net) @$(call E, compile: $@) - $(Q)$(RUSTC) $(RFLAGS_net) -o $@ $< && touch $@ + $(Q)$(RUSTC) $(RFLAGS_net) --out-dir src/components/net $< && touch $@ $(DONE_msg): $(DEPS_msg) @$(call E, compile: $@) - $(Q)$(RUSTC) $(RFLAGS_msg) -o $@ $< && touch $@ + $(Q)$(RUSTC) $(RFLAGS_msg) --out-dir src/components/msg $< && touch $@ $(DONE_gfx): $(DEPS_gfx) @$(call E, compile: $@) - $(Q)$(RUSTC) $(RFLAGS_gfx) -o $@ $< && touch $@ + $(Q)$(RUSTC) $(RFLAGS_gfx) --out-dir src/components/gfx $< && touch $@ $(DONE_script): $(DEPS_script) @$(call E, compile: $@) - $(Q)$(RUSTC) $(RFLAGS_script) -o $@ $< && touch $@ + $(Q)$(RUSTC) $(RFLAGS_script) --out-dir src/components/script $< && touch $@ BINDINGS_SRC = $(S)/src/components/script/dom/bindings/codegen diff --git a/src/components/gfx/font_list.rs b/src/components/gfx/font_list.rs index f96558a1b4c..f3d46bb7cce 100644 --- a/src/components/gfx/font_list.rs +++ b/src/components/gfx/font_list.rs @@ -125,8 +125,7 @@ impl FontFamily { // TODO(Issue #190): if not in the fast path above, do // expensive matching of weights, etc. - let this: &mut FontFamily = self; // FIXME: borrow checker workaround - for entry in this.entries.iter() { + for entry in self.entries.iter() { if (style.weight.is_bold() == entry.is_bold()) && (style.italic == entry.is_italic()) { diff --git a/src/components/gfx/platform/macos/font_context.rs b/src/components/gfx/platform/macos/font_context.rs index a96390d3537..79ebf1548c3 100644 --- a/src/components/gfx/platform/macos/font_context.rs +++ b/src/components/gfx/platform/macos/font_context.rs @@ -8,8 +8,6 @@ use platform::macos::font::FontHandle; use core_text; -use std::result; - pub struct FontContextHandle { ctx: () } @@ -33,7 +31,7 @@ impl FontContextHandleMethods for FontContextHandle { style: UsedFontStyle) -> Result { let ctfont_result = core_text::font::new_from_name(name, style.pt_size); - do result::chain(ctfont_result) |ctfont| { + do ctfont_result.chain |ctfont| { FontHandle::new_from_CTFont(self, ctfont) } } diff --git a/src/components/gfx/platform/macos/font_list.rs b/src/components/gfx/platform/macos/font_list.rs index 8b9098d816a..22016f18fe4 100644 --- a/src/components/gfx/platform/macos/font_list.rs +++ b/src/components/gfx/platform/macos/font_list.rs @@ -12,7 +12,6 @@ use core_foundation::array::CFArray; use core_foundation::base::CFWrapper; use core_foundation::string::{CFString, CFStringRef}; use core_text::font_collection::CTFontCollectionMethods; -use core_text::font_descriptor::CTFontDescriptorRef; use core_text; use std::hashmap::HashMap; @@ -31,22 +30,23 @@ impl FontListHandle { pub fn get_available_families(&self) -> FontFamilyMap { let family_names: CFArray = core_text::font_collection::get_family_names(); let mut family_map: FontFamilyMap = HashMap::new(); - for &strref in family_names.each() { + for strref in family_names.iter() { let family_name = CFString::wrap_shared(strref).to_str(); debug!("Creating new FontFamily for family: %s", family_name); let new_family = @mut FontFamily::new(family_name); family_map.insert(family_name, new_family); } - return family_map; + family_map } pub fn load_variations_for_family(&self, family: @mut FontFamily) { debug!("Looking for faces of family: %s", family.family_name); let family_collection = core_text::font_collection::create_for_family(family.family_name); - for &CTFontDescriptorRef in family_collection.get_descriptors().each() { - let desc = CFWrapper::wrap_shared(*descref); + let family_descriptors = family_collection.get_descriptors(); + for descref in family_descriptors.iter() { + let desc = CFWrapper::wrap_shared(descref); let font = core_text::font::new_from_descriptor(&desc, 0.0); let handle = FontHandle::new_from_CTFont(&self.fctx, font).unwrap(); diff --git a/src/components/main/compositing/mod.rs b/src/components/main/compositing/mod.rs index c4fc065e142..6417e8128f4 100644 --- a/src/components/main/compositing/mod.rs +++ b/src/components/main/compositing/mod.rs @@ -20,11 +20,9 @@ use gfx::opts::Opts; use azure::azure_hl::{DataSourceSurface, DrawTarget, SourceSurfaceMethods, current_gl_context}; use azure::azure::AzGLContext; -use std::cell::Cell; use std::comm; use std::comm::{Chan, SharedChan, Port}; use std::num::Orderable; -use std::task; use std::vec; use std::rt::rtio::RtioTimer; use std::rt::io::timer::Timer; diff --git a/src/components/main/servo.rc b/src/components/main/servo.rc index 93172d0e332..bb16497fe65 100755 --- a/src/components/main/servo.rc +++ b/src/components/main/servo.rc @@ -39,7 +39,9 @@ use compositing::{CompositorChan, CompositorTask}; use constellation::Constellation; use servo_msg::constellation_msg::{ExitMsg, InitLoadUrlMsg}; +#[cfg(not(test))] use gfx::opts; + use servo_net::image_cache_task::ImageCacheTask; use servo_net::resource_task::ResourceTask; use servo_util::time::{Profiler, ProfilerChan, PrintMsg}; @@ -47,8 +49,8 @@ use servo_util::time::{Profiler, ProfilerChan, PrintMsg}; pub use gfx::opts::Opts; pub use gfx::text; pub use servo_util::url::make_url; -use std::cell::Cell; use std::comm; +#[cfg(not(test))] use std::os; use std::rt::rtio::RtioTimer; use std::rt::io::timer::Timer; diff --git a/src/components/script/dom/bindings/utils.rs b/src/components/script/dom/bindings/utils.rs index d8722af9d09..057f6d6ef97 100644 --- a/src/components/script/dom/bindings/utils.rs +++ b/src/components/script/dom/bindings/utils.rs @@ -666,7 +666,7 @@ impl WrapperCache { } pub fn WrapNewBindingObject(cx: *JSContext, scope: *JSObject, - mut value: @mut CacheableWrapper, + value: @mut CacheableWrapper, vp: *mut JSVal) -> bool { unsafe { let cache = value.get_wrappercache(); diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs index 71bdeb9200d..1aad6dc007c 100644 --- a/src/components/script/html/hubbub_html_parser.rs +++ b/src/components/script/html/hubbub_html_parser.rs @@ -54,7 +54,7 @@ use newcss::stylesheet::Stylesheet; use std::cast; use std::cell::Cell; use std::comm; -use std::comm::{Chan, Port, SharedChan}; +use std::comm::{Port, SharedChan}; use std::str::eq_slice; use std::task; use std::from_str::FromStr; diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs index cbe8eac763d..28249044e7d 100644 --- a/src/components/script/script_task.rs +++ b/src/components/script/script_task.rs @@ -25,8 +25,6 @@ use servo_msg::constellation_msg::{PipelineId, SubpageId, RendererReadyMsg, Resi use servo_msg::constellation_msg::{LoadIframeUrlMsg}; use servo_msg::constellation_msg; -use newcss::stylesheet::Stylesheet; - use std::cell::Cell; use std::comm; use std::comm::{Port, SharedChan}; diff --git a/src/platform/linux/rust-fontconfig b/src/platform/linux/rust-fontconfig index 78f84af79eb..534d04eb6f5 160000 --- a/src/platform/linux/rust-fontconfig +++ b/src/platform/linux/rust-fontconfig @@ -1 +1 @@ -Subproject commit 78f84af79eb653fde2d50621fc3631043fa6fa9e +Subproject commit 534d04eb6f598b8fea3afaeb9b99fec2768454bf diff --git a/src/platform/linux/rust-freetype b/src/platform/linux/rust-freetype index 980254dd840..38d16a13910 160000 --- a/src/platform/linux/rust-freetype +++ b/src/platform/linux/rust-freetype @@ -1 +1 @@ -Subproject commit 980254dd840772c8ee5f37056e7bd9f4d93d5377 +Subproject commit 38d16a13910d1c3b221750a07018a9760bebfb84 diff --git a/src/platform/linux/rust-xlib b/src/platform/linux/rust-xlib index 641af36389a..780fe7d2223 160000 --- a/src/platform/linux/rust-xlib +++ b/src/platform/linux/rust-xlib @@ -1 +1 @@ -Subproject commit 641af36389a7592ef0faea2488ec08bd144e9bfe +Subproject commit 780fe7d22230d258feccff80bdd56867b22c96cd diff --git a/src/platform/macos/rust-cocoa b/src/platform/macos/rust-cocoa index 23bb1728984..0290c160878 160000 --- a/src/platform/macos/rust-cocoa +++ b/src/platform/macos/rust-cocoa @@ -1 +1 @@ -Subproject commit 23bb17289846dd9486f633c0b5187c7ba333d943 +Subproject commit 0290c1608784e2dd7a227d3f198039fc1b3b9f1d diff --git a/src/platform/macos/rust-core-foundation b/src/platform/macos/rust-core-foundation index 77e9ed24ca7..27050029b7f 160000 --- a/src/platform/macos/rust-core-foundation +++ b/src/platform/macos/rust-core-foundation @@ -1 +1 @@ -Subproject commit 77e9ed24ca7bb0f9a0b33d7fd888de2905dddcd4 +Subproject commit 27050029b7fa41e925e91e7e537cf7e24dac70a8 diff --git a/src/platform/macos/rust-core-graphics b/src/platform/macos/rust-core-graphics index bf9d0ebf3e0..2893fd675c5 160000 --- a/src/platform/macos/rust-core-graphics +++ b/src/platform/macos/rust-core-graphics @@ -1 +1 @@ -Subproject commit bf9d0ebf3e0283f8bdb505d29d93de9631f7877c +Subproject commit 2893fd675c56f28cc0e653c7a7bb35a25ba0a032 diff --git a/src/platform/macos/rust-core-text b/src/platform/macos/rust-core-text index 313e26f9202..a281f975cba 160000 --- a/src/platform/macos/rust-core-text +++ b/src/platform/macos/rust-core-text @@ -1 +1 @@ -Subproject commit 313e26f9202b44d09043485671bc903786c328e7 +Subproject commit a281f975cbada7fff6c50c1273b473a4c851ec8f diff --git a/src/platform/macos/rust-io-surface b/src/platform/macos/rust-io-surface index f155846fe04..5e2b7714042 160000 --- a/src/platform/macos/rust-io-surface +++ b/src/platform/macos/rust-io-surface @@ -1 +1 @@ -Subproject commit f155846fe043f9060fa05be696c203180e7371f7 +Subproject commit 5e2b771404291afd3c30a042624a1ddc6574c6d3 diff --git a/src/support/alert/rust-alert b/src/support/alert/rust-alert index 4e9340d2549..f3d6be90ed8 160000 --- a/src/support/alert/rust-alert +++ b/src/support/alert/rust-alert @@ -1 +1 @@ -Subproject commit 4e9340d2549d0f62468254809b59d833c2e82595 +Subproject commit f3d6be90ed801dd4faaa55fb4f41d7cd98115003 diff --git a/src/support/azure/rust-azure b/src/support/azure/rust-azure index 4e883bc2754..9e23ca2383e 160000 --- a/src/support/azure/rust-azure +++ b/src/support/azure/rust-azure @@ -1 +1 @@ -Subproject commit 4e883bc2754d9d3b1ba21baa0603dd43b093cffd +Subproject commit 9e23ca2383e8a362a879e5d71b82e4cd0252bfe8 diff --git a/src/support/css/rust-css b/src/support/css/rust-css index b66cc67a1fa..8ee78ad7344 160000 --- a/src/support/css/rust-css +++ b/src/support/css/rust-css @@ -1 +1 @@ -Subproject commit b66cc67a1fa0a5a85eefdb0073d29e410f34f1f2 +Subproject commit 8ee78ad734438db57c26d8b5cb3bbc3f59bde76d diff --git a/src/support/css/rust-cssparser b/src/support/css/rust-cssparser index 3e2179942cb..faca82a71ca 160000 --- a/src/support/css/rust-cssparser +++ b/src/support/css/rust-cssparser @@ -1 +1 @@ -Subproject commit 3e2179942cb679a4f08c81674f4f8e4777f88cff +Subproject commit faca82a71cad81b14b9e5948b1960037108dc2aa diff --git a/src/support/geom/rust-geom b/src/support/geom/rust-geom index 690f9062746..a9161832150 160000 --- a/src/support/geom/rust-geom +++ b/src/support/geom/rust-geom @@ -1 +1 @@ -Subproject commit 690f9062746e1fed5e0f027acc1b095db6b50c6f +Subproject commit a9161832150798986f5034142eb0ecd86a9b3136 diff --git a/src/support/glfw/glfw-rs b/src/support/glfw/glfw-rs index 41e63b6856b..028080a6cf4 160000 --- a/src/support/glfw/glfw-rs +++ b/src/support/glfw/glfw-rs @@ -1 +1 @@ -Subproject commit 41e63b6856b21ee21549dcb98618404d088513bc +Subproject commit 028080a6cf41e66f7d426f0887b05aea1b4e445e diff --git a/src/support/harfbuzz/rust-harfbuzz b/src/support/harfbuzz/rust-harfbuzz index 4d576047b5b..ccbf99c3f3c 160000 --- a/src/support/harfbuzz/rust-harfbuzz +++ b/src/support/harfbuzz/rust-harfbuzz @@ -1 +1 @@ -Subproject commit 4d576047b5b94d98669080f3ac25efa053024d7e +Subproject commit ccbf99c3f3cbfa72ebc5335f7ad71cac05b142cd diff --git a/src/support/hubbub/rust-hubbub b/src/support/hubbub/rust-hubbub index 065db559d51..b99f72ccde8 160000 --- a/src/support/hubbub/rust-hubbub +++ b/src/support/hubbub/rust-hubbub @@ -1 +1 @@ -Subproject commit 065db559d51051bd786836e2aba9c0bef4031ad7 +Subproject commit b99f72ccde8ca973add1246426540849ffc50792 diff --git a/src/support/layers/rust-layers b/src/support/layers/rust-layers index e036183e152..a23bb2fa8a8 160000 --- a/src/support/layers/rust-layers +++ b/src/support/layers/rust-layers @@ -1 +1 @@ -Subproject commit e036183e152542cb2080e5b098b66efce1decf5a +Subproject commit a23bb2fa8a8c86f24d7dd6af9e3dcab2f2f1d2b0 diff --git a/src/support/netsurfcss/rust-netsurfcss b/src/support/netsurfcss/rust-netsurfcss index 9ea9b1411e0..d353286e558 160000 --- a/src/support/netsurfcss/rust-netsurfcss +++ b/src/support/netsurfcss/rust-netsurfcss @@ -1 +1 @@ -Subproject commit 9ea9b1411e0b98358c757e27eb026aac2c5948b2 +Subproject commit d353286e5584537d1491cbfd59ebe42be0196756 diff --git a/src/support/opengles/rust-opengles b/src/support/opengles/rust-opengles index 69de03ef7e4..48deba28f7b 160000 --- a/src/support/opengles/rust-opengles +++ b/src/support/opengles/rust-opengles @@ -1 +1 @@ -Subproject commit 69de03ef7e447d22593eb3e405257b07ff38aa71 +Subproject commit 48deba28f7bf50b8f6e76857c4e3be32e771a350 diff --git a/src/support/png/rust-png b/src/support/png/rust-png index 6734e37c202..a4821235aea 160000 --- a/src/support/png/rust-png +++ b/src/support/png/rust-png @@ -1 +1 @@ -Subproject commit 6734e37c2023000d17c4ba4ada9826fc6263efd1 +Subproject commit a4821235aeabe80511e30edfed7111bece1ae5a6 diff --git a/src/support/sharegl/sharegl b/src/support/sharegl/sharegl index 73f46084428..bd06cd169cf 160000 --- a/src/support/sharegl/sharegl +++ b/src/support/sharegl/sharegl @@ -1 +1 @@ -Subproject commit 73f46084428a37021e7d0d77daaa7b8a18fface3 +Subproject commit bd06cd169cf68de03438f6ab9ab87bc62243774e diff --git a/src/support/spidermonkey/rust-mozjs b/src/support/spidermonkey/rust-mozjs index f19be6340c2..7fd449b8324 160000 --- a/src/support/spidermonkey/rust-mozjs +++ b/src/support/spidermonkey/rust-mozjs @@ -1 +1 @@ -Subproject commit f19be6340c2d3fa9a12a53889ba5021a8f155073 +Subproject commit 7fd449b83240f29e48cdab5efe683ad092f9dd00 diff --git a/src/support/stb-image/rust-stb-image b/src/support/stb-image/rust-stb-image index ae5fe313829..9cc13064c96 160000 --- a/src/support/stb-image/rust-stb-image +++ b/src/support/stb-image/rust-stb-image @@ -1 +1 @@ -Subproject commit ae5fe3138298d276656715f5fdef021ce0a98c99 +Subproject commit 9cc13064c96e7749d09729e931f1d85da5088777 diff --git a/src/support/wapcaplet/rust-wapcaplet b/src/support/wapcaplet/rust-wapcaplet index caa31c98eee..24f8390bc9c 160000 --- a/src/support/wapcaplet/rust-wapcaplet +++ b/src/support/wapcaplet/rust-wapcaplet @@ -1 +1 @@ -Subproject commit caa31c98eee0334b5881f6ced37ccee4eba7d28c +Subproject commit 24f8390bc9c831c06f90668671da821b8e87f1a4