mirror of
https://github.com/servo/servo.git
synced 2025-08-20 04:45:33 +01:00
style: Add simple ToShmem implementations.
Differential Revision: https://phabricator.services.mozilla.com/D17190
This commit is contained in:
parent
f6ef35c5d3
commit
7fa7c103d6
7 changed files with 85 additions and 3 deletions
|
@ -15,7 +15,9 @@ use crate::stylesheets::{CssRule, Origin, StylesheetInDocument};
|
|||
use crate::values::CssUrl;
|
||||
use cssparser::SourceLocation;
|
||||
use std::fmt::{self, Write};
|
||||
use std::mem::ManuallyDrop;
|
||||
use style_traits::{CssWriter, ToCss};
|
||||
use to_shmem::{SharedMemoryBuilder, ToShmem};
|
||||
|
||||
/// With asynchronous stylesheet parsing, we can't synchronously create a
|
||||
/// GeckoStyleSheet. So we use this placeholder instead.
|
||||
|
@ -180,6 +182,12 @@ pub struct ImportRule {
|
|||
pub source_location: SourceLocation,
|
||||
}
|
||||
|
||||
impl ToShmem for ImportRule {
|
||||
fn to_shmem(&self, _builder: &mut SharedMemoryBuilder) -> ManuallyDrop<Self> {
|
||||
panic!("ToShmem failed for ImportRule: cannot handle imported style sheets")
|
||||
}
|
||||
}
|
||||
|
||||
impl DeepCloneWithLock for ImportRule {
|
||||
fn deep_clone_with_lock(
|
||||
&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue