Auto merge of #16765 - CJKu:bug-1310885-part-1, r=heycam

stylo: Export mozilla::css::ImageValue to stylo.

<!-- Please describe your changes on the following line: -->
This is "Bug 1310885 - Part 0. (gecko) Export mozilla::css::ImageValue to stylo."
We need to land it separately to prevent build break.

Link to the gecko bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1310885.

---
<!-- 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
- [ ] These changes do not require tests because _____

<!-- 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. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16765)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-05-08 03:28:48 -05:00 committed by GitHub
commit 2119c16b66

View file

@ -624,6 +624,7 @@ mod bindings {
.whitelisted_function("Gecko_.*");
let structs_types = [
"mozilla::css::GridTemplateAreasValue",
"mozilla::css::ImageValue",
"mozilla::css::URLValue",
"mozilla::Side",
"RawGeckoAnimationPropertySegment",
@ -764,6 +765,11 @@ mod bindings {
"RawGeckoServoStyleRuleList",
];
for &ty in structs_types.iter() {
// XXX cku: will be removed in Part 2.
if ty.starts_with("mozilla::css::ImageValue") {
builder = builder
.raw_line("#[allow(unused_imports)]");
}
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