mirror of
https://github.com/servo/servo
synced 2026-05-10 09:02:30 +02:00
We were previously using the unsound `StylesheetContents::from_data()` to create a dummy stylesheet, which we were later replacing with the actual imported stylesheet once it loaded. This patch changes that to use `ImportSheet::Pending` instead. But then: - We need to store the `MediaList` in `StylesheetContextSource`. Previosuly we stored it in the dummy stylesheet. - We also need to store an Arc pointer to the `ImportRule`, in order to update its stylesheet to `ImportSheet::Sheet(stylesheet)` later on. Testing: Unnecessary, there should be no behavior change Fixes: #39710 Stylo PR: https://github.com/servo/stylo/pull/250 Signed-off-by: Oriol Brufau <obrufau@igalia.com>