--- a/servo/components/style/build_gecko.rs
+++ b/servo/components/style/build_gecko.rs
@@ -227,16 +227,17 @@ mod bindings {
..CodegenConfig::nothing()
})
.header(add_include("nsStyleStruct.h"))
.include(add_include("mozilla/ServoPropPrefList.h"))
.header(add_include("mozilla/StyleAnimationValue.h"))
.include(add_include("gfxFontConstants.h"))
.include(add_include("nsThemeConstants.h"))
.include(add_include("mozilla/dom/AnimationEffectReadOnlyBinding.h"))
+ .include(add_include("mozilla/Keyframe.h"))
.include(add_include("mozilla/ServoElementSnapshot.h"))
.include(add_include("mozilla/dom/Element.h"))
.include(add_include("mozilla/ServoBindings.h"))
.include(add_include("nsMediaFeatures.h"))
.include(add_include("nsMediaList.h"))
// FIXME(emilio): Incrementally remove these "pub use"s. Probably
// mozilla::css and mozilla::dom are easier.
.raw_line("pub use self::root::*;")
@@ -283,16 +284,17 @@ mod bindings {
"FrameRequestCallback",
"gfxAlternateValue",
"gfxFontFeature",
"gfxFontVariation",
"GridNamedArea",
"HalfCorner",
"Image",
"ImageURL",
+ "Keyframe",
"nsAttrName",
"nsAttrValue",
"nsBorderColors",
"nscolor",
"nsChangeHint",
"nsCSSKeyword",
"nsCSSPropertyID",
"nsCSSProps",
@@ -357,16 +359,17 @@ mod bindings {
"nsStyleUnit",
"nsStyleUserInterface",
"nsStyleVariables",
"nsStyleVisibility",
"nsStyleXUL",
"nsTArray",
"nsTArrayHeader",
"Position",
+ "PropertyValuePair",
"Runnable",
"ServoAttrSnapshot",
"ServoElementSnapshot",
"SheetParsingMode",
"StaticRefPtr",
"StyleAnimation",
"StyleBasicShape",
"StyleBasicShapeType",
@@ -486,28 +489,31 @@ mod bindings {
.raw_line("pub use nsstring::{nsACString, nsAString};")
.raw_line("type nsACString_internal = nsACString;")
.raw_line("type nsAString_internal = nsAString;")
.whitelisted_function("Servo_.*")
.whitelisted_function("Gecko_.*");
let structs_types = [
"RawGeckoDocument",
"RawGeckoElement",
+ "RawGeckoKeyframeList",
"RawGeckoNode",
"RawGeckoAnimationValueList",
"RawServoAnimationValue",
"RawServoAnimationValueBorrowedList",
+ "RawServoDeclarationBlock",
"RawGeckoPresContext",
"RawGeckoPresContextOwned",
"ThreadSafeURIHolder",
"ThreadSafePrincipalHolder",
"CSSPseudoClassType",
"TraversalRootBehavior",
"FontFamilyList",
"FontFamilyType",
+ "Keyframe",
"ServoElementSnapshot",
"SheetParsingMode",
"StyleBasicShape",
"StyleBasicShapeType",
"StyleClipPath",
"nsCSSKeyword",
"nsCSSPropertyID",
"nsCSSShadowArray",
@@ -552,16 +558,17 @@ mod bindings {
"nsStyleTextReset",
"nsStyleUIReset",
"nsStyleUnion",
"nsStyleUnit",
"nsStyleUserInterface",
"nsStyleVariables",
"nsStyleVisibility",
"nsStyleXUL",
+ "nsTimingFunction",
"nscoord",
"nsresult",
"Loader",
"ServoStyleSheet",
"mozilla::EffectCompositor_CascadeLevel",
];
struct ArrayType {
cpp_type: &'static str,
@@ -593,16 +600,17 @@ mod bindings {
"RawGeckoElement",
"RawGeckoDocument",
"RawServoDeclarationBlockStrong",
"RawGeckoPresContext",
];
let servo_borrow_types = [
"nsCSSValue",
"RawGeckoAnimationValueList",
+ "RawGeckoKeyframeList",
"RawServoAnimationValueBorrowedList",
];
for &ty in structs_types.iter() {
builder = builder.hide_type(ty)
.raw_line(format!("use gecko_bindings::structs::{};", ty));
// TODO this is hacky, figure out a better way to do it without
// hardcoding everything...
if ty.starts_with("nsStyle") {
--- a/servo/components/style/gecko/conversions.rs
+++ b/servo/components/style/gecko/conversions.rs
@@ -6,20 +6,21 @@
//! Ideally, it would be in geckolib itself, but coherence
//! forces us to keep the traits and implementations here
#![allow(unsafe_code)]
use app_units::Au;
use gecko::values::convert_rgba_to_nscolor;
use gecko_bindings::bindings::{Gecko_CreateGradient, Gecko_SetGradientImageValue, Gecko_SetUrlImageValue};
-use gecko_bindings::bindings::{RawServoStyleSheet, RawServoDeclarationBlock, RawServoStyleRule, RawServoImportRule};
+use gecko_bindings::bindings::{RawServoStyleSheet, RawServoStyleRule, RawServoImportRule};
use gecko_bindings::bindings::{ServoComputedValues, ServoCssRules};
use gecko_bindings::structs::{nsStyleCoord_CalcValue, nsStyleImage};
use gecko_bindings::structs::nsresult;
+use gecko_bindings::structs::RawServoDeclarationBlock;
use gecko_bindings::sugar::ns_style_coord::{CoordDataValue, CoordDataMut};
use gecko_bindings::sugar::ownership::{HasArcFFI, HasFFI};
use parking_lot::RwLock;
use properties::{ComputedValues, PropertyDeclarationBlock};
use stylesheets::{CssRules, RulesMutateError, Stylesheet, StyleRule, ImportRule};
use values::computed::{CalcLengthOrPercentage, Gradient, Image, LengthOrPercentage, LengthOrPercentageOrAuto};
unsafe impl HasFFI for Stylesheet {