servo: Rebase.
authorJosh Matthews <josh@joshmatthews.net>
Thu, 14 Feb 2013 06:58:16 -0500
changeset 380012 4617e6b42ae5ac3a032977dd1d581d5fe7897101
parent 380011 3c844ce6475442c2676e02414bdc57015bb7dd10
child 380013 54dc72674cdf61ed80e8d3368ed2a5562d9239b7
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
servo: Rebase. Source-Repo: https://github.com/servo/servo Source-Revision: 670c1deb2e382c75b44713c15c70499be624fcd7
servo/src/servo-gfx/font.rs
servo/src/servo-gfx/font_list.rs
servo/src/servo-gfx/resource/resource_task.rs
servo/src/servo-gfx/text/harfbuzz/shaper.rs
servo/src/servo-gfx/text/text_run.rs
servo/src/servo/html/hubbub_html_parser.rs
servo/src/servo/layout/layout_task.rs
--- a/servo/src/servo-gfx/font.rs
+++ b/servo/src/servo-gfx/font.rs
@@ -1,16 +1,17 @@
 use color::Color;
 use font_context::FontContext;
 use geometry::Au;
 use render_context::RenderContext;
 use util::range::Range;
 use text::glyph::{GlyphStore, GlyphIndex};
 use text::shaper::ShaperMethods;
 use text::{Shaper, TextRun};
+use text::shaper::ShaperMethods;
 
 use azure::{AzFloat, AzScaledFontRef, struct__AzDrawOptions, struct__AzGlyph};
 use azure::{struct__AzGlyphBuffer, struct__AzPoint};
 use azure::scaled_font::ScaledFont;
 use azure::azure_hl::{BackendType, ColorPattern};
 use geom::{Point2D, Rect, Size2D};
 
 #[cfg(target_os = "macos")]
@@ -351,17 +352,23 @@ pub impl Font {
 pub impl Font {
     fn draw_text_into_context(&mut self,
                               rctx: &RenderContext,
                               run: &TextRun,
                               range: &const Range,
                               baseline_origin: Point2D<Au>,
                               color: Color) {
         use core::libc::types::common::c99::{uint16_t, uint32_t};
-        use azure::{AzDrawOptions, AzGlyph, AzGlyphBuffer};
+        use azure::{AzDrawOptions,
+                    struct__AzDrawOptions,
+                    AzGlyph,
+                    struct__AzGlyph,
+                    AzGlyphBuffer,
+                    struct__AzGlyphBuffer,
+                    struct__AzPoint};
         use azure::azure::bindgen::{AzCreateColorPattern};
         use azure::azure::bindgen::{AzDrawTargetFillGlyphs};
         use azure::azure::bindgen::{AzReleaseColorPattern};
 
         let target = rctx.get_draw_target();
         let azfontref = self.get_azure_font();
         let pattern = ColorPattern(color);
         let azure_pattern = pattern.azure_color_pattern;
--- a/servo/src/servo-gfx/font_list.rs
+++ b/servo/src/servo-gfx/font_list.rs
@@ -1,11 +1,12 @@
 use font::{CSSFontWeight, SpecifiedFontStyle, UsedFontStyle};
 use gfx_font::FontHandleMethods;
 use native::FontHandle;
+use gfx_font::FontHandleMethods;
 
 use core::hashmap::linear;
 
 #[cfg(target_os = "linux")]
 use fontconfig;
 #[cfg(target_os = "macos")]
 use quartz;
 use native;
--- a/servo/src/servo-gfx/resource/resource_task.rs
+++ b/servo/src/servo-gfx/resource/resource_task.rs
@@ -46,22 +46,22 @@ pub fn ResourceTask() -> ResourceTask {
     let loaders = ~[
         (~"file", file_loader_factory),
         (~"http", http_loader_factory)
     ];
     create_resource_task_with_loaders(loaders)
 }
 
 fn create_resource_task_with_loaders(loaders: ~[(~str, LoaderTaskFactory)]) -> ResourceTask {
-	let loaders_cell = Cell(loaders);
+    let loaders_cell = Cell(loaders);
     let chan = do spawn_listener |from_client| {
         // TODO: change copy to move once we can move out of closures
         ResourceManager(from_client, loaders_cell.take()).start()
     };
-	SharedChan(chan)
+    SharedChan(chan)
 }
 
 pub struct ResourceManager {
     from_client: Port<ControlMsg>,
     /// Per-scheme resource loaders
     loaders: ~[(~str, LoaderTaskFactory)],
 }
 
@@ -100,23 +100,23 @@ impl ResourceManager {
                 debug!("resource_task: no loader for scheme %s", url.scheme);
                 progress_chan.send(Done(Err(())));
             }
         }
     }
 
     fn get_loader_factory(&self, url: &Url) -> Option<LoaderTask> {
         for self.loaders.each |scheme_loader| {
-			match *scheme_loader {
-				(ref scheme, ref loader_factory) => {
-					if (*scheme) == url.scheme {
-						return Some((*loader_factory)());
-					}
-				}
-			}
+            match *scheme_loader {
+                (ref scheme, ref loader_factory) => {
+	            if (*scheme) == url.scheme {
+                        return Some((*loader_factory)());
+                    }
+	        }
+            }
         }
         return None;
     }
 }
 
 #[test]
 fn test_exit() {
     let resource_task = ResourceTask();
--- a/servo/src/servo-gfx/text/harfbuzz/shaper.rs
+++ b/servo/src/servo-gfx/text/harfbuzz/shaper.rs
@@ -3,16 +3,17 @@ extern mod harfbuzz;
 use geom::Point2D;
 
 use geometry::Au;
 
 use font::{Font, FontTable, FontTableMethods, FontTableTag};
 
 use text::glyph::{GlyphStore, GlyphIndex, GlyphData};
 use text::shaper::ShaperMethods;
+use gfx_font::{FontHandleMethods, FontTableMethods};
 
 use servo_util::range;
 use util::range::Range;
 
 use core::libc::types::common::c99::int32_t;
 use core::libc::{c_uint, c_int, c_void, c_char};
 use core::util::ignore;
 //use dvec::DVec;
--- a/servo/src/servo-gfx/text/text_run.rs
+++ b/servo/src/servo-gfx/text/text_run.rs
@@ -1,12 +1,12 @@
 use font_context::FontContext;
 use geometry::Au;
 use text::glyph::{BreakTypeNormal, GlyphStore};
-use servo_gfx_font::{Font, FontDescriptor, RunMetrics};
+use servo_gfx_font::{Font, FontDescriptor, RunMetrics, FontHandleMethods};
 use servo_gfx_util::range::Range;
 
 use core::libc::{c_void};
 use geom::point::Point2D;
 use geom::size::Size2D;
 use std::arc;
 use std::arc::ARC;
 
--- a/servo/src/servo/html/hubbub_html_parser.rs
+++ b/servo/src/servo/html/hubbub_html_parser.rs
@@ -216,16 +216,17 @@ pub fn parse_html(url: Url,
     let resource_task2 = resource_task.clone();
     let (css_port, css_chan): (Port<Option<Stylesheet>>, Chan<CSSMessage>) =
             do spawn_conversation |css_port: Port<CSSMessage>,
                                    css_chan: Chan<Option<Stylesheet>>| {
         css_link_listener(css_chan, css_port, resource_task2.clone());
     };
     let css_chan = SharedChan(css_chan);
 
+    let resource_task2 = resource_task.clone();
     // Spawn a JS parser to receive JavaScript.
     let resource_task2 = resource_task.clone();
     let (js_port, js_chan): (Port<JSResult>, Chan<JSMessage>) =
             do spawn_conversation |js_port: Port<JSMessage>,
                                    js_chan: Chan<JSResult>| {
         js_script_listener(js_chan, js_port, resource_task2.clone());
     };
     let js_chan = SharedChan(js_chan);
--- a/servo/src/servo/layout/layout_task.rs
+++ b/servo/src/servo/layout/layout_task.rs
@@ -94,17 +94,16 @@ pub fn LayoutTask(render_task: RenderTas
     }))
 }
 
 struct Layout {
     render_task: RenderTask,
     image_cache_task: ImageCacheTask,
     local_image_cache: @mut LocalImageCache,
     from_content: Port<Msg>,
-
     font_ctx: @mut FontContext,
     // This is used to root reader data
     layout_refs: ~[@mut LayoutData],
     css_select_ctx: Mut<SelectCtx>,
 }
 
 fn Layout(render_task: RenderTask, 
           image_cache_task: ImageCacheTask,