зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1468651: remove shorthand/serialize.mako.rs. r=heycam
MozReview-Commit-ID: 8Xyep2Q7trR
This commit is contained in:
Родитель
dae63b2e5b
Коммит
d6c4f58d3f
|
@ -137,7 +137,32 @@ pub mod shorthands {
|
|||
use style_traits::{ParseError, StyleParseErrorKind};
|
||||
use values::specified;
|
||||
|
||||
<%include file="/shorthand/serialize.mako.rs" />
|
||||
use style_traits::{CssWriter, ToCss};
|
||||
use values::specified::{BorderStyle, Color};
|
||||
use std::fmt::{self, Write};
|
||||
|
||||
fn serialize_directional_border<W, I,>(
|
||||
dest: &mut CssWriter<W>,
|
||||
width: &I,
|
||||
style: &BorderStyle,
|
||||
color: &Color,
|
||||
) -> fmt::Result
|
||||
where
|
||||
W: Write,
|
||||
I: ToCss,
|
||||
{
|
||||
width.to_css(dest)?;
|
||||
// FIXME(emilio): Should we really serialize the border style if it's
|
||||
// `solid`?
|
||||
dest.write_str(" ")?;
|
||||
style.to_css(dest)?;
|
||||
if *color != Color::CurrentColor {
|
||||
dest.write_str(" ")?;
|
||||
color.to_css(dest)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
<%include file="/shorthand/background.mako.rs" />
|
||||
<%include file="/shorthand/border.mako.rs" />
|
||||
<%include file="/shorthand/box.mako.rs" />
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use style_traits::{CssWriter, ToCss};
|
||||
use values::specified::{BorderStyle, Color};
|
||||
use std::fmt::{self, Write};
|
||||
|
||||
fn serialize_directional_border<W, I,>(
|
||||
dest: &mut CssWriter<W>,
|
||||
width: &I,
|
||||
style: &BorderStyle,
|
||||
color: &Color,
|
||||
) -> fmt::Result
|
||||
where
|
||||
W: Write,
|
||||
I: ToCss,
|
||||
{
|
||||
width.to_css(dest)?;
|
||||
dest.write_str(" ")?;
|
||||
style.to_css(dest)?;
|
||||
if *color != Color::CurrentColor {
|
||||
dest.write_str(" ")?;
|
||||
color.to_css(dest)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
Загрузка…
Ссылка в новой задаче