Skip to content

Commit

Permalink
servo: Merge #16392 - Update the style crate's bindgen dependency to …
Browse files Browse the repository at this point in the history
…0.24.0 (from fitzgen:update-bindgen-dependency); r=emilio

<!-- Please describe your changes on the following line: -->

Update style's dependency on bindgen from 0.22 to 0.23

This introduces a huge mess of transitive dependency versioning issues with `bitflags`, which I'm going to just ignore for now. Will file a follow up issue to address them properly.

r? @emilio

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because bindgen has its own tests, including building stylo's bindings now.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 81f273b66f3af5cd814ef34c2754121d59547de6

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 046a4c45f3e47212625bbdb70fe340c64f846ec0
  • Loading branch information
fitzgen committed May 8, 2017
1 parent 5fc76a8 commit 7783990
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 55 deletions.
94 changes: 50 additions & 44 deletions servo/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 servo/Cargo.toml
Original file line number Diff line number Diff line change
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 servo/components/style/Cargo.toml
Original file line number Diff line number Diff line change
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 servo/components/style/build_gecko.rs
Original file line number Diff line number Diff line change
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 servo/components/style/properties/longhand/font.mako.rs
Original file line number Diff line number Diff line change
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/servo-tidy.toml
Original file line number Diff line number Diff line change
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 7783990

Please sign in to comment.