This commit is contained in:
Josh Matthews 2013-02-14 06:58:16 -05:00
parent 0bc4ae6f36
commit 670c1deb2e
7 changed files with 21 additions and 12 deletions

View file

@ -6,6 +6,7 @@ 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};
@ -356,7 +357,13 @@ pub impl Font {
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};

View file

@ -1,6 +1,7 @@
use font::{CSSFontWeight, SpecifiedFontStyle, UsedFontStyle};
use gfx_font::FontHandleMethods;
use native::FontHandle;
use gfx_font::FontHandleMethods;
use core::hashmap::linear;

View file

@ -51,12 +51,12 @@ pub fn ResourceTask() -> ResourceTask {
}
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 {
@ -105,13 +105,13 @@ impl ResourceManager {
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;
}

View file

@ -8,6 +8,7 @@ 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;

View file

@ -1,7 +1,7 @@
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};

View file

@ -221,6 +221,7 @@ pub fn parse_html(url: Url,
};
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>) =

View file

@ -99,7 +99,6 @@ struct Layout {
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],