Bug 1349651 - stylo: Implement HasAuthorSpecifiedRules.

This commit is contained in:
Matt Brubeck 2017-05-09 09:54:24 -07:00
parent 121662aa57
commit 32d37795a2
8 changed files with 376 additions and 28 deletions

View file

@ -250,6 +250,11 @@ pub type RawServoSupportsRuleBorrowed<'a> = &'a RawServoSupportsRule;
pub type RawServoSupportsRuleBorrowedOrNull<'a> = Option<&'a RawServoSupportsRule>;
enum RawServoSupportsRuleVoid { }
pub struct RawServoSupportsRule(RawServoSupportsRuleVoid);
pub type RawServoRuleNodeStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoRuleNode>;
pub type RawServoRuleNodeBorrowed<'a> = &'a RawServoRuleNode;
pub type RawServoRuleNodeBorrowedOrNull<'a> = Option<&'a RawServoRuleNode>;
enum RawServoRuleNodeVoid { }
pub struct RawServoRuleNode(RawServoRuleNodeVoid);
pub type RawServoStyleSetOwned = ::gecko_bindings::sugar::ownership::Owned<RawServoStyleSet>;
pub type RawServoStyleSetOwnedOrNull = ::gecko_bindings::sugar::ownership::OwnedOrNull<RawServoStyleSet>;
pub type RawServoStyleSetBorrowed<'a> = &'a RawServoStyleSet;
@ -411,6 +416,12 @@ extern "C" {
extern "C" {
pub fn Servo_SupportsRule_Release(ptr: RawServoSupportsRuleBorrowed);
}
extern "C" {
pub fn Servo_RuleNode_AddRef(ptr: RawServoRuleNodeBorrowed);
}
extern "C" {
pub fn Servo_RuleNode_Release(ptr: RawServoRuleNodeBorrowed);
}
extern "C" {
pub fn Servo_StyleSet_Drop(ptr: RawServoStyleSetOwned);
}
@ -2183,6 +2194,18 @@ extern "C" {
set: RawServoStyleSetBorrowed)
-> ServoComputedValuesStrong;
}
extern "C" {
pub fn Servo_ResolveRuleNode(element: RawGeckoElementBorrowed,
pseudo_tag: *mut nsIAtom,
set: RawServoStyleSetBorrowed)
-> RawServoRuleNodeStrong;
}
extern "C" {
pub fn Servo_HasAuthorSpecifiedRules(rule_node: RawServoRuleNodeBorrowed,
element: RawGeckoElementBorrowed,
rule_type_mask: u32,
author_colors_allowed: bool) -> bool;
}
extern "C" {
pub fn Servo_ResolveStyleLazily(element: RawGeckoElementBorrowed,
pseudo_tag: *mut nsIAtom,