diff --git a/src/components/compositing/compositing.rs b/src/components/compositing/compositing.rs index 737acce3b84..b944567549d 100644 --- a/src/components/compositing/compositing.rs +++ b/src/components/compositing/compositing.rs @@ -47,15 +47,15 @@ extern crate core_text; pub use compositor_task::{CompositorChan, CompositorTask}; pub use constellation::Constellation; -mod compositor_task; +pub mod compositor_task; mod compositor_data; mod compositor; mod headless; -mod pipeline; -mod constellation; +pub mod pipeline; +pub mod constellation; mod windowing; diff --git a/src/components/compositing/compositor_task.rs b/src/components/compositing/compositor_task.rs index faf34915a84..1b8e9653744 100644 --- a/src/components/compositing/compositor_task.rs +++ b/src/components/compositing/compositor_task.rs @@ -6,7 +6,7 @@ pub use windowing; use compositor; use headless; -use constellation::SendableFrameTree; +pub use constellation::SendableFrameTree; use windowing::{ApplicationMethods, WindowMethods}; use platform::Application; diff --git a/src/components/compositing/constellation.rs b/src/components/compositing/constellation.rs index f5215be1555..f6d12ebcedd 100644 --- a/src/components/compositing/constellation.rs +++ b/src/components/compositing/constellation.rs @@ -42,7 +42,7 @@ pub struct Constellation { pub compositor_chan: CompositorChan, pub resource_task: ResourceTask, pub image_cache_task: ImageCacheTask, - pub pipelines: HashMap>, + pipelines: HashMap>, navigation_context: NavigationContext, next_pipeline_id: PipelineId, pending_frames: Vec, diff --git a/src/components/compositing/platform/common/glfw_windowing.rs b/src/components/compositing/platform/common/glfw_windowing.rs index ca42af1f13f..8fea3535fc9 100644 --- a/src/components/compositing/platform/common/glfw_windowing.rs +++ b/src/components/compositing/platform/common/glfw_windowing.rs @@ -85,22 +85,20 @@ macro_rules! glfw_callback( /// The type of a window. pub struct Window { - pub glfw: glfw::Glfw, + glfw: glfw::Glfw, - pub glfw_window: glfw::Window, - pub events: Receiver<(f64, glfw::WindowEvent)>, + glfw_window: glfw::Window, + events: Receiver<(f64, glfw::WindowEvent)>, - pub event_queue: RefCell>, + event_queue: RefCell>, - pub drag_origin: Point2D, + mouse_down_button: Cell>, + mouse_down_point: Cell>, - pub mouse_down_button: Cell>, - pub mouse_down_point: Cell>, + ready_state: Cell, + render_state: Cell, - pub ready_state: Cell, - pub render_state: Cell, - - pub last_title_set_time: Cell, + last_title_set_time: Cell, } impl WindowMethods for Window { @@ -121,8 +119,6 @@ impl WindowMethods for Window { event_queue: RefCell::new(vec!()), - drag_origin: Point2D(0 as c_int, 0), - mouse_down_button: Cell::new(None), mouse_down_point: Cell::new(Point2D(0 as c_int, 0)), diff --git a/src/components/embedding/embedding.rs b/src/components/embedding/embedding.rs index 601d70d4c57..6d5eb46316f 100644 --- a/src/components/embedding/embedding.rs +++ b/src/components/embedding/embedding.rs @@ -8,7 +8,7 @@ #![feature(globs, macro_rules, phase, thread_local)] #![feature(phase)] -#[phase(syntax, link)] +#[phase(plugin, link)] extern crate log; extern crate rustuv; diff --git a/src/components/embedding/types.rs b/src/components/embedding/types.rs index a4f538a6bba..c01e1ec0cf1 100644 --- a/src/components/embedding/types.rs +++ b/src/components/embedding/types.rs @@ -950,9 +950,10 @@ pub struct cef_scheme_registrar { // per unique |scheme_name| value. If |scheme_name| is already registered or // if an error occurs this function will return false (0). /// - add_custom_scheme: extern "C" fn(registrar: *mut cef_scheme_registrar, - scheme_name: *cef_string_t, - is_standard: c_int, is_local: c_int, is_display_isolated: c_int), + _add_custom_scheme: extern "C" fn(registrar: *mut cef_scheme_registrar, + scheme_name: *cef_string_t, + is_standard: c_int, is_local: c_int, + is_display_isolated: c_int), } /// diff --git a/src/components/gfx/platform/linux/font.rs b/src/components/gfx/platform/linux/font.rs index e61d092ae07..1299315ade2 100644 --- a/src/components/gfx/platform/linux/font.rs +++ b/src/components/gfx/platform/linux/font.rs @@ -37,7 +37,7 @@ fn fixed_to_float_ft(f: i32) -> f64 { } pub struct FontTable { - bogus: () + _bogus: () } impl FontTableMethods for FontTable { diff --git a/src/components/gfx/text/shaping/harfbuzz.rs b/src/components/gfx/text/shaping/harfbuzz.rs index 251ddb8ab36..b6646db771a 100644 --- a/src/components/gfx/text/shaping/harfbuzz.rs +++ b/src/components/gfx/text/shaping/harfbuzz.rs @@ -53,7 +53,6 @@ pub struct ShapedGlyphData { } pub struct ShapedGlyphEntry { - cluster: int, codepoint: GlyphId, advance: Au, offset: Option>, @@ -123,7 +122,6 @@ impl ShapedGlyphData { }; ShapedGlyphEntry { - cluster: (*glyph_info_i).cluster as int, codepoint: (*glyph_info_i).codepoint as GlyphId, advance: x_advance, offset: offset, diff --git a/src/components/layout/block.rs b/src/components/layout/block.rs index 5e0b4a23670..36b525924a7 100644 --- a/src/components/layout/block.rs +++ b/src/components/layout/block.rs @@ -76,7 +76,7 @@ impl FloatedBlockInfo { /// The solutions for the heights-and-margins constraint equation. struct HeightConstraintSolution { top: Au, - bottom: Au, + _bottom: Au, height: Au, margin_top: Au, margin_bottom: Au @@ -87,7 +87,7 @@ impl HeightConstraintSolution { -> HeightConstraintSolution { HeightConstraintSolution { top: top, - bottom: bottom, + _bottom: bottom, height: height, margin_top: margin_top, margin_bottom: margin_bottom, diff --git a/src/components/layout/flow_list.rs b/src/components/layout/flow_list.rs index e136c29282f..19ccb68727e 100644 --- a/src/components/layout/flow_list.rs +++ b/src/components/layout/flow_list.rs @@ -33,15 +33,13 @@ pub struct FlowList { /// Double-ended FlowList iterator pub struct FlowListIterator<'a> { head: &'a Link, - tail: Rawlink, nelem: uint, } /// Double-ended mutable FlowList iterator pub struct MutFlowListIterator<'a> { - list: &'a mut FlowList, + _list: &'a mut FlowList, head: Rawlink, - tail: Rawlink, nelem: uint, } @@ -59,13 +57,6 @@ impl Rawlink { unsafe { mem::transmute(n) } } - fn from_optional_flow_ref(flow_ref: &Option) -> Rawlink { - match *flow_ref { - None => Rawlink::none(), - Some(ref flow_ref) => Rawlink::some(flow_ref.get()), - } - } - pub unsafe fn resolve_mut(&self) -> Option<&mut Flow> { if self.obj.is_null() { None @@ -204,7 +195,6 @@ impl FlowList { FlowListIterator { nelem: self.len(), head: &self.list_head, - tail: Rawlink::from_optional_flow_ref(&self.list_tail) } } @@ -218,8 +208,7 @@ impl FlowList { MutFlowListIterator { nelem: self.len(), head: head_raw, - tail: Rawlink::from_optional_flow_ref(&self.list_tail), - list: self + _list: self } } } diff --git a/src/components/script/dom/bindings/callback.rs b/src/components/script/dom/bindings/callback.rs index 7a261bf7cc7..8b0c1879dd3 100644 --- a/src/components/script/dom/bindings/callback.rs +++ b/src/components/script/dom/bindings/callback.rs @@ -109,7 +109,7 @@ pub fn WrapCallThisObject(cx: *mut JSContext, pub struct CallSetup { cx: *mut JSContext, - handling: ExceptionHandling + _handling: ExceptionHandling } impl CallSetup { @@ -118,7 +118,7 @@ impl CallSetup { let cx = win.deref().get_cx(); CallSetup { cx: cx, - handling: handling + _handling: handling } } diff --git a/src/components/style/selectors.rs b/src/components/style/selectors.rs index d19d7d9d480..951f85b8e20 100644 --- a/src/components/style/selectors.rs +++ b/src/components/style/selectors.rs @@ -306,13 +306,13 @@ fn parse_one_simple_selector(iter: &mut Iter, namespaces: &NamespaceMap, inside_ -> SimpleSelectorParseResult { match iter.peek() { Some(&IDHash(_)) => match iter.next() { - Some(IDHash(id)) => SimpleSelectorResult(IDSelector(id.into_owned())), + Some(IDHash(id)) => SimpleSelectorResult(IDSelector(id)), _ => fail!("Implementation error, this should not happen."), }, Some(&Delim('.')) => { iter.next(); match iter.next() { - Some(Ident(class)) => SimpleSelectorResult(ClassSelector(class.into_owned())), + Some(Ident(class)) => SimpleSelectorResult(ClassSelector(class)), _ => InvalidSimpleSelector, } } @@ -455,16 +455,16 @@ fn parse_attribute_selector(content: Vec, namespaces: &Namespace }};) let result = match iter.next() { None => AttrExists(attr), // [foo] - Some(Delim('=')) => AttrEqual(attr, (get_value!()).into_owned()), // [foo=bar] - Some(IncludeMatch) => AttrIncludes(attr, (get_value!()).into_owned()), // [foo~=bar] + Some(Delim('=')) => AttrEqual(attr, (get_value!())), // [foo=bar] + Some(IncludeMatch) => AttrIncludes(attr, (get_value!())), // [foo~=bar] Some(DashMatch) => { let value = get_value!(); let dashing_value = format!("{}-", value); - AttrDashMatch(attr, value.into_owned(), dashing_value) // [foo|=bar] + AttrDashMatch(attr, value, dashing_value) // [foo|=bar] }, - Some(PrefixMatch) => AttrPrefixMatch(attr, (get_value!()).into_owned()), // [foo^=bar] - Some(SubstringMatch) => AttrSubstringMatch(attr, (get_value!()).into_owned()), // [foo*=bar] - Some(SuffixMatch) => AttrSuffixMatch(attr, (get_value!()).into_owned()), // [foo$=bar] + Some(PrefixMatch) => AttrPrefixMatch(attr, (get_value!())), // [foo^=bar] + Some(SubstringMatch) => AttrSubstringMatch(attr, (get_value!())), // [foo*=bar] + Some(SuffixMatch) => AttrSuffixMatch(attr, (get_value!())), // [foo$=bar] _ => return None }; skip_whitespace(iter); @@ -551,7 +551,7 @@ fn parse_negation(arguments: Vec, namespaces: &NamespaceMap) #[inline] fn get_next_ident(iter: &mut Iter) -> String { match iter.next() { - Some(Ident(value)) => value.into_owned(), + Some(Ident(value)) => value, _ => fail!("Implementation error, this should not happen."), } } diff --git a/src/components/style/stylesheets.rs b/src/components/style/stylesheets.rs index cfe1c52a1c4..801fa70d095 100644 --- a/src/components/style/stylesheets.rs +++ b/src/components/style/stylesheets.rs @@ -22,9 +22,6 @@ pub struct Stylesheet { /// List of rules in the order they were found (important for /// cascading order) pub rules: Vec, - namespaces: NamespaceMap, - encoding: EncodingRef, - base_url: Url, } @@ -120,7 +117,7 @@ impl Stylesheet { } state = next_state; } - Stylesheet{ rules: rules, namespaces: namespaces, encoding: encoding, base_url: base_url } + Stylesheet{ rules: rules } } }