mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Change ToCss to take a CssWriter<W>
This more concrete wrapper type can write a prefix the very first time something is written to it. This allows removing plenty of useless monomorphisations caused by the former W/SequenceWriter<W> pair of types.
This commit is contained in:
parent
3672856efa
commit
cd8f96cc9e
89 changed files with 873 additions and 533 deletions
|
@ -16,7 +16,7 @@ use selectors::parser::{self as selector_parser, Selector, Visit, SelectorParseE
|
|||
use selectors::visitor::SelectorVisitor;
|
||||
use std::fmt;
|
||||
use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
|
||||
use style_traits::{ParseError, StyleParseErrorKind, ToCss as ToCss_};
|
||||
use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss as ToCss_};
|
||||
|
||||
pub use gecko::pseudo_element::{PseudoElement, EAGER_PSEUDOS, EAGER_PSEUDO_COUNT, PSEUDO_COUNT};
|
||||
pub use gecko::snapshot::SnapshotMap;
|
||||
|
@ -86,12 +86,12 @@ impl ToCss for NonTSPseudoClass {
|
|||
}, )*
|
||||
NonTSPseudoClass::MozLocaleDir(ref dir) => {
|
||||
dest.write_str(":-moz-locale-dir(")?;
|
||||
dir.to_css(dest)?;
|
||||
dir.to_css(&mut CssWriter::new(dest))?;
|
||||
return dest.write_char(')')
|
||||
},
|
||||
NonTSPseudoClass::Dir(ref dir) => {
|
||||
dest.write_str(":dir(")?;
|
||||
dir.to_css(dest)?;
|
||||
dir.to_css(&mut CssWriter::new(dest))?;
|
||||
return dest.write_char(')')
|
||||
},
|
||||
NonTSPseudoClass::MozAny(ref selectors) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue