mirror of
https://github.com/servo/servo.git
synced 2025-06-19 22:59:03 +01:00
Provide @font-face rules for stylo backend.
This commit is contained in:
parent
01e986f2e6
commit
0a57dbc110
3 changed files with 30 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue