mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Introduce a ToCssWithGuard trait
This commit is contained in:
parent
3ae2ecbec2
commit
fe4e70c5f8
16 changed files with 104 additions and 54 deletions
|
@ -14,6 +14,7 @@ use computed_values::font_family::FamilyName;
|
|||
use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser, Parser};
|
||||
#[cfg(feature = "gecko")] use cssparser::UnicodeRange;
|
||||
use parser::{ParserContext, log_css_error, Parse};
|
||||
use shared_lock::{SharedRwLockReadGuard, ToCssWithGuard};
|
||||
use std::fmt;
|
||||
use std::iter;
|
||||
use style_traits::{ToCss, OneOrMoreCommaSeparated};
|
||||
|
@ -230,11 +231,10 @@ macro_rules! font_face_descriptors {
|
|||
}
|
||||
}
|
||||
|
||||
impl ToCss for FontFaceRule {
|
||||
impl ToCssWithGuard for FontFaceRule {
|
||||
// Serialization of FontFaceRule is not specced.
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result
|
||||
where W: fmt::Write,
|
||||
{
|
||||
fn to_css<W>(&self, _guard: &SharedRwLockReadGuard, dest: &mut W) -> fmt::Result
|
||||
where W: fmt::Write {
|
||||
dest.write_str("@font-face {\n")?;
|
||||
$(
|
||||
dest.write_str(concat!(" ", $m_name, ": "))?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue