Provide @font-face rules for stylo backend.

This commit is contained in:
Xidorn Quan 2017-03-30 10:44:18 +11:00
parent 01e986f2e6
commit 0a57dbc110
3 changed files with 30 additions and 2 deletions

View file

@ -588,6 +588,7 @@ mod bindings {
"RawGeckoElement",
"RawGeckoKeyframeList",
"RawGeckoComputedKeyframeValuesList",
"RawGeckoFontFaceRuleList",
"RawGeckoNode",
"RawGeckoAnimationValueList",
"RawServoAnimationValue",
@ -706,6 +707,7 @@ mod bindings {
"RawGeckoAnimationValueList",
"RawGeckoKeyframeList",
"RawGeckoComputedKeyframeValuesList",
"RawGeckoFontFaceRuleList",
];
for &ty in structs_types.iter() {
builder = builder.hide_type(ty)

View file

@ -13,9 +13,9 @@ use gecko::values::{convert_rgba_to_nscolor, GeckoStyleCoordConvertible};
use gecko_bindings::bindings::{Gecko_CreateGradient, Gecko_SetGradientImageValue, Gecko_SetUrlImageValue};
use gecko_bindings::bindings::Gecko_InitializeImageCropRect;
use gecko_bindings::structs::{nsStyleCoord_CalcValue, nsStyleImage};
use gecko_bindings::structs::nsresult;
use gecko_bindings::structs::{nsresult, SheetType};
use gecko_bindings::sugar::ns_style_coord::{CoordDataValue, CoordDataMut};
use stylesheets::RulesMutateError;
use stylesheets::{Origin, RulesMutateError};
use values::computed::{CalcLengthOrPercentage, Gradient, Image, LengthOrPercentage, LengthOrPercentageOrAuto};
impl From<CalcLengthOrPercentage> for nsStyleCoord_CalcValue {
@ -503,3 +503,13 @@ impl From<RulesMutateError> for nsresult {
}
}
}
impl From<Origin> for SheetType {
fn from(other: Origin) -> Self {
match other {
Origin::UserAgent => SheetType::Agent,
Origin::Author => SheetType::Doc,
Origin::User => SheetType::User,
}
}
}