mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
script: add skeleton implementation of FontFace
API (#35262)
This patch implements the `FontFace` interface, but with some caveats 1. The interface is only exposed on `Window`. Support for Workers will be handled in the future. 2. The concept of `css-connected` `FontFace` is not implemented, so `@font-face` rules in stylesheets will not be represented in the DOM. 3. The constructor only supports using `url()` strings as source and `ArrayBuffer` and `ArrayBufferView` are not supported yet. A skeleton implementation of the `load` method of `FontFaceSet` is also implemented in this patch. The intention is to support some web pages that don't load without this method. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
29e0fad21e
commit
56840e0a35
52 changed files with 1160 additions and 551 deletions
|
@ -104,6 +104,7 @@ pub(crate) enum ScriptThreadEventCategory {
|
|||
DevtoolsMsg,
|
||||
DocumentEvent,
|
||||
FileRead,
|
||||
FontLoading,
|
||||
FormPlannedNavigation,
|
||||
HistoryEvent,
|
||||
ImageCacheMsg,
|
||||
|
@ -139,6 +140,7 @@ impl From<ScriptThreadEventCategory> for ProfilerCategory {
|
|||
ScriptThreadEventCategory::EnterFullscreen => ProfilerCategory::ScriptEnterFullscreen,
|
||||
ScriptThreadEventCategory::ExitFullscreen => ProfilerCategory::ScriptExitFullscreen,
|
||||
ScriptThreadEventCategory::FileRead => ProfilerCategory::ScriptFileRead,
|
||||
ScriptThreadEventCategory::FontLoading => ProfilerCategory::ScriptFontLoading,
|
||||
ScriptThreadEventCategory::FormPlannedNavigation => {
|
||||
ProfilerCategory::ScriptPlannedNavigation
|
||||
},
|
||||
|
@ -181,6 +183,7 @@ impl From<ScriptThreadEventCategory> for ScriptHangAnnotation {
|
|||
ScriptThreadEventCategory::DocumentEvent => ScriptHangAnnotation::DocumentEvent,
|
||||
ScriptThreadEventCategory::InputEvent => ScriptHangAnnotation::InputEvent,
|
||||
ScriptThreadEventCategory::FileRead => ScriptHangAnnotation::FileRead,
|
||||
ScriptThreadEventCategory::FontLoading => ScriptHangAnnotation::FontLoading,
|
||||
ScriptThreadEventCategory::FormPlannedNavigation => {
|
||||
ScriptHangAnnotation::FormPlannedNavigation
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue