Skip to content

Commit

Permalink
Update the style crate's bindgen dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
fitzgen committed May 8, 2017
1 parent a5fe464 commit 1cfd3ce
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 55 deletions.
94 changes: 50 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Expand Up @@ -13,3 +13,9 @@ opt-level = 3
# Uncomment to profile on Linux:
# debug = true
# lto = false

[replace]
# If you need to temporarily test Servo with a local fork of some upstream
# crate, add that here. Use the form:
#
# "<crate>:<version>" = { path = "/path/to/local/checkout" }
2 changes: 1 addition & 1 deletion components/style/Cargo.toml
Expand Up @@ -65,6 +65,6 @@ kernel32-sys = "0.2"
[build-dependencies]
lazy_static = "0.2"
log = "0.3"
bindgen = { version = "0.22", optional = true }
bindgen = { version = "0.24", optional = true }
regex = {version = "0.2", optional = true}
walkdir = "1.0"
16 changes: 8 additions & 8 deletions components/style/build_gecko.rs
Expand Up @@ -28,7 +28,7 @@ mod common {
#[cfg(feature = "bindgen")]
mod bindings {
use bindgen::{Builder, CodegenConfig};
use bindgen::chooser::{EnumVariantCustomBehavior, EnumVariantValue, TypeChooser};
use bindgen::callbacks::{EnumVariantCustomBehavior, EnumVariantValue, ParseCallbacks};
use regex::Regex;
use std::cmp;
use std::collections::HashSet;
Expand Down Expand Up @@ -270,7 +270,7 @@ mod bindings {

#[derive(Debug)]
struct Callbacks;
impl TypeChooser for Callbacks {
impl ParseCallbacks for Callbacks {
fn enum_variant_behavior(&self,
enum_name: Option<&str>,
variant_name: &str,
Expand All @@ -293,10 +293,10 @@ mod bindings {
vars: true,
..CodegenConfig::nothing()
})
.include(add_include("nsCSSPseudoClasses.h")) // servo/rust-bindgen#599
.header(add_include("nsStyleStruct.h"))
.header(add_include("nsCSSPseudoClasses.h")) // servo/rust-bindgen#599
.include(add_include("nsStyleStruct.h"))
.include(add_include("mozilla/ServoPropPrefList.h"))
.header(add_include("mozilla/StyleAnimationValue.h"))
.include(add_include("mozilla/StyleAnimationValue.h"))
.include(add_include("gfxFontConstants.h"))
.include(add_include("nsThemeConstants.h"))
.include(add_include("mozilla/dom/AnimationEffectReadOnlyBinding.h"))
Expand Down Expand Up @@ -324,7 +324,7 @@ mod bindings {
.bitfield_enum("nsChangeHint")
.bitfield_enum("nsRestyleHint")
.constified_enum("UpdateAnimationsTasks")
.type_chooser(Box::new(Callbacks));
.parse_callbacks(Box::new(Callbacks));
let whitelist_vars = [
"NS_THEME_.*",
"NODE_.*",
Expand Down Expand Up @@ -517,8 +517,8 @@ mod bindings {
"StyleAnimationValue", // pulls in a whole bunch of stuff we don't need in the bindings
];
let blacklist = [
".*_char_traits",
".*_incompatible_char_type",
".*char_traits",
".*incompatible_char_type",
];

struct MappedGenericType {
Expand Down
2 changes: 1 addition & 1 deletion components/style/properties/longhand/font.mako.rs
Expand Up @@ -2081,7 +2081,7 @@ ${helpers.single_keyword_system("font-variant-position",

#[inline]
pub fn get_initial_value() -> computed_value::T {
::gecko_bindings::structs::NS_MATHML_DEFAULT_SCRIPT_SIZE_MULTIPLIER
::gecko_bindings::structs::NS_MATHML_DEFAULT_SCRIPT_SIZE_MULTIPLIER as f32
}

pub fn parse(_context: &ParserContext, _input: &mut Parser) -> Result<SpecifiedValue, ()> {
Expand Down
5 changes: 4 additions & 1 deletion servo-tidy.toml
Expand Up @@ -31,7 +31,10 @@ num = []

[ignore]
# Ignored packages with duplicated versions
packages = ["bitflags"]
packages = [
"bitflags",
"libloading", # Conflicting version is only used at build-time by geckolib.
]
# Files that are ignored for all tidy and lint checks.
files = [
# Helper macro where actually a pseudo-element per line makes sense.
Expand Down

0 comments on commit 1cfd3ce

Please sign in to comment.