Auto merge of #18320 - upsuper:counter-style-clone, r=heycam

Rewrite CounterStyleOrNone::from_gecko_value to use fewer binding functions

This is the Servo side change of [bug 1393189](https://bugzilla.mozilla.org/show_bug.cgi?id=1393189).

<!-- 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/18320)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-31 01:31:52 -05:00 committed by GitHub
commit 12ca7d9e96
6 changed files with 1442 additions and 1329 deletions

View file

@ -14,6 +14,7 @@ use gecko_bindings::structs::mozilla::css::ErrorReporter;
use gecko_bindings::structs::mozilla::css::ImageValue;
use gecko_bindings::structs::mozilla::css::URLValue;
use gecko_bindings::structs::mozilla::css::URLValueData;
use gecko_bindings::structs::mozilla::AnonymousCounterStyle;
use gecko_bindings::structs::mozilla::MallocSizeOf;
use gecko_bindings::structs::mozilla::OriginFlags;
use gecko_bindings::structs::mozilla::Side;
@ -972,29 +973,12 @@ extern "C" {
src: *const CounterStylePtr);
}
extern "C" {
pub fn Gecko_CounterStyle_IsNone(ptr: *const CounterStylePtr) -> bool;
pub fn Gecko_CounterStyle_GetName(ptr: *const CounterStylePtr)
-> *mut nsIAtom;
}
extern "C" {
pub fn Gecko_CounterStyle_IsName(ptr: *const CounterStylePtr) -> bool;
}
extern "C" {
pub fn Gecko_CounterStyle_GetName(ptr: *const CounterStylePtr,
result: *mut nsAString);
}
extern "C" {
pub fn Gecko_CounterStyle_GetSymbols(ptr: *const CounterStylePtr)
-> *const nsTArray<nsStringRepr>;
}
extern "C" {
pub fn Gecko_CounterStyle_GetSystem(ptr: *const CounterStylePtr) -> u8;
}
extern "C" {
pub fn Gecko_CounterStyle_IsSingleString(ptr: *const CounterStylePtr)
-> bool;
}
extern "C" {
pub fn Gecko_CounterStyle_GetSingleString(ptr: *const CounterStylePtr,
result: *mut nsAString);
pub fn Gecko_CounterStyle_GetAnonymous(ptr: *const CounterStylePtr)
-> *const AnonymousCounterStyle;
}
extern "C" {
pub fn Gecko_SetNullImageValue(image: *mut nsStyleImage);