servo/components/shared
Jonathan Schwender d7e560c9c0
resources: Remove baked in resources (#36042)
This allows removing a LazyLock around the resources.
We override the baked in resources unconditionally in servoshell
upon initialization anyway
([desktop](9f93ccd942/ports/servoshell/desktop/cli.rs (L15)),
[android](9f93ccd942/ports/servoshell/egl/android/simpleservo.rs (L49)),
[ohos](9f93ccd942/ports/servoshell/egl/ohos/simpleservo.rs (L43))
), meaning that the baked in resources
are unused in servoshell.

For 3rd-party embedders, we probably also want to the let them know
early that they should initialize the resources, instead of
restricting the panics to production mode.

Rippy is the only resource which was required. Since it is only
253 bytes large, we just bake that resource in as a fallback.

We do want to make using the resources easy from tests, so we add
some logic to keep the baked in resources for tests only and initialize
the resource reader on first access.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-04-17 05:12:44 +00:00
..
background_hang_monitor script: add skeleton implementation of FontFace API (#35262) 2025-02-19 05:50:01 +00:00
base Make DOMException serializable (#36535) 2025-04-15 13:25:31 +00:00
bluetooth Include WebViewId into EmbedderMsg variants where possible (#35211) 2025-01-30 11:15:35 +00:00
canvas canvas: Implement line dash setters and getters (#36257) 2025-04-01 11:22:00 +00:00
compositing compositing: Add memory reporter for WebRender. (#36557) 2025-04-16 13:14:04 +00:00
constellation Make DOMException serializable (#36535) 2025-04-15 13:25:31 +00:00
devtools Devtools: initial Debugger > Sources panel (#36164) 2025-04-08 09:22:53 +00:00
embedder resources: Remove baked in resources (#36042) 2025-04-17 05:12:44 +00:00
fonts Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
net resources: Remove baked in resources (#36042) 2025-04-17 05:12:44 +00:00
profile compositing: Add memory reporter for WebRender. (#36557) 2025-04-16 13:14:04 +00:00
script compositing: Combine webrender_traits and compositing_traits (#36372) 2025-04-06 17:34:18 +00:00
script_layout feat: Implement display for text selection and caret (#35830) 2025-04-10 14:40:38 +00:00
webgpu Add serde and wgsl features to wgpu-core (#36411) 2025-04-09 10:09:13 +00:00
webxr libservo: Move EventLooperWaker from webxr_traits to embedder_traits (#36420) 2025-04-09 14:19:33 +00:00