mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
fonts: Remove synchronous web font loading functionality (#35000)
Synchronous web font loading is not specification compliant and was added in #8341 to work around issues that do not exist any longer. This change removes the functionality and ensures that WPT tests are run with the spec compliant loader. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
5140ce81f0
commit
28c9ceedf6
6 changed files with 4 additions and 49 deletions
|
@ -639,22 +639,12 @@ impl LayoutThread {
|
|||
);
|
||||
};
|
||||
|
||||
// Find all font-face rules and notify the FontContext of them.
|
||||
// GWTODO: Need to handle unloading web fonts.
|
||||
let newly_loading_font_count = self.font_context.add_all_web_fonts_from_stylesheet(
|
||||
self.font_context.add_all_web_fonts_from_stylesheet(
|
||||
stylesheet,
|
||||
guard,
|
||||
self.stylist.device(),
|
||||
Arc::new(web_font_finished_loading_callback) as WebFontLoadFinishedCallback,
|
||||
self.debug.load_webfonts_synchronously,
|
||||
);
|
||||
|
||||
if self.debug.load_webfonts_synchronously && newly_loading_font_count > 0 {
|
||||
// TODO: Handle failure in web font loading
|
||||
let _ = self
|
||||
.script_chan
|
||||
.send(ConstellationControlMsg::WebFontLoaded(self.id, true));
|
||||
}
|
||||
}
|
||||
|
||||
fn try_get_layout_root<'dom>(&self, node: impl LayoutNode<'dom>) -> Option<FlowRef> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue