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:
Martin Robinson 2025-01-15 12:16:43 +01:00 committed by GitHub
parent 5140ce81f0
commit 28c9ceedf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 4 additions and 49 deletions

View file

@ -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> {