style: Use cbindgen for border-style and outline-style.

I'm pretty sure the FIXME I left in the outline-style code is a bug,
but I want to clean this up further and I didn't want to fix it without adding
a test.

Differential Revision: https://phabricator.services.mozilla.com/D12859
This commit is contained in:
Emilio Cobos Álvarez 2018-11-30 05:27:28 +00:00
parent fd73f1665a
commit efecd06a28
5 changed files with 80 additions and 95 deletions

View file

@ -21,8 +21,8 @@ use style_traits::{CssWriter, ParseError, ToCss};
/// A specified value for a single side of a `border-style` property.
///
/// The integer values here correspond to the border conflict resolution rules
/// in CSS 2.1 § 17.6.2.1. Higher values override lower values.
/// The order here corresponds to the integer values from the border conflict
/// resolution rules in CSS 2.1 § 17.6.2.1. Higher values override lower values.
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
#[derive(
@ -39,17 +39,18 @@ use style_traits::{CssWriter, ParseError, ToCss};
ToComputedValue,
ToCss,
)]
#[repr(u8)]
pub enum BorderStyle {
Hidden = -2,
None = -1,
Inset = 0,
Groove = 1,
Outset = 2,
Ridge = 3,
Dotted = 4,
Dashed = 5,
Solid = 6,
Double = 7,
Hidden,
None,
Inset,
Groove,
Outset,
Ridge,
Dotted,
Dashed,
Solid,
Double,
}
impl BorderStyle {