mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
auto merge of #3675 : glennw/servo/local-fonts, r=pcwalton
This commit is contained in:
commit
48ce107d72
5 changed files with 39 additions and 40 deletions
|
@ -469,8 +469,8 @@ impl LayoutTask {
|
|||
fn handle_add_stylesheet<'a>(&'a self, sheet: Stylesheet, possibly_locked_rw_data: &mut Option<MutexGuard<'a, LayoutTaskData>>) {
|
||||
// Find all font-face rules and notify the font cache of them.
|
||||
// GWTODO: Need to handle unloading web fonts (when we handle unloading stylesheets!)
|
||||
iter_font_face_rules(&sheet, |family, url| {
|
||||
self.font_cache_task.add_web_font(family.to_string(), url.clone());
|
||||
iter_font_face_rules(&sheet, |family, src| {
|
||||
self.font_cache_task.add_web_font(family.to_string(), (*src).clone());
|
||||
});
|
||||
let mut rw_data = self.lock_rw_data(possibly_locked_rw_data);
|
||||
rw_data.stylist.add_stylesheet(sheet, AuthorOrigin);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue