Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the "tree" API and clean up flow a bit #412

Merged
merged 6 commits into from May 3, 2013
Next

Update servo-gfx and submodules for language changes

  • Loading branch information
pcwalton committed May 2, 2013
commit 51be0641ff773e96ea32537bf2f17b27dbe09ae9
@@ -64,10 +64,10 @@ pub impl FontHandle {

fn get_CGFont(&mut self) -> CGFont {
match self.cgfont {
Some(ref font) => CFWrapper::wrap_shared(*(font.borrow_ref())),
Some(ref font) => font.clone(),
None => {
let cgfont = self.ctfont.copy_to_CGFont();
self.cgfont = Some(CFWrapper::clone(&cgfont));
self.cgfont = Some(cgfont.clone());
cgfont
}
}
@@ -30,9 +30,9 @@ pub impl FontListHandle {

fn get_available_families(&self) -> FontFamilyMap {
let family_names: CFArray<CFStringRef> = core_text::font_collection::get_family_names();
let mut family_map : FontFamilyMap = HashMap::new();
let mut family_map: FontFamilyMap = HashMap::new();
for family_names.each |&strref: &CFStringRef| {
let family_name = CFString::wrap_extern(strref).to_str();
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);
@@ -42,7 +42,7 @@ pub impl FontListHandle {
}

fn load_variations_for_family(&self, family: @mut FontFamily) {
let fam : &mut FontFamily = family; // FIXME: borrow checker workaround
let fam: &mut FontFamily = family; // FIXME: borrow checker workaround
let family_name = &fam.family_name;
debug!("Looking for faces of family: %s", *family_name);

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.