mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Stylo: Add FFI interfaces for exposing style sources.
MozReview-Commit-ID: BlAb8sQ5WYl
This commit is contained in:
parent
a4605855f0
commit
bfc7e84767
6 changed files with 59 additions and 6 deletions
|
@ -614,9 +614,11 @@ mod bindings {
|
|||
"RawServoAnimationValue",
|
||||
"RawServoAnimationValueMap",
|
||||
"RawServoDeclarationBlock",
|
||||
"RawServoStyleRule",
|
||||
"RawGeckoPresContext",
|
||||
"RawGeckoPresContextOwned",
|
||||
"RawGeckoStyleAnimationList",
|
||||
"RawGeckoServoStyleRuleList",
|
||||
"RawGeckoURLExtraData",
|
||||
"RefPtr",
|
||||
"CSSPseudoClassType",
|
||||
|
@ -731,6 +733,7 @@ mod bindings {
|
|||
"RawGeckoKeyframeList",
|
||||
"RawGeckoComputedKeyframeValuesList",
|
||||
"RawGeckoFontFaceRuleList",
|
||||
"RawGeckoServoStyleRuleList",
|
||||
];
|
||||
for &ty in structs_types.iter() {
|
||||
builder = builder.hide_type(ty)
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
#![allow(non_snake_case, missing_docs)]
|
||||
|
||||
use gecko_bindings::bindings::{RawServoMediaList, RawServoMediaRule, RawServoNamespaceRule, RawServoPageRule};
|
||||
use gecko_bindings::bindings::{RawServoStyleSheet, RawServoStyleRule, RawServoImportRule};
|
||||
use gecko_bindings::bindings::{RawServoStyleSheet, RawServoImportRule};
|
||||
use gecko_bindings::bindings::{ServoComputedValues, ServoCssRules};
|
||||
use gecko_bindings::structs::{RawServoAnimationValue, RawServoAnimationValueMap, RawServoDeclarationBlock};
|
||||
use gecko_bindings::structs::{RawServoAnimationValue, RawServoAnimationValueMap};
|
||||
use gecko_bindings::structs::{RawServoDeclarationBlock, RawServoStyleRule};
|
||||
use gecko_bindings::sugar::ownership::{HasArcFFI, HasFFI};
|
||||
use media_queries::MediaList;
|
||||
use parking_lot::RwLock;
|
||||
|
|
|
@ -16,9 +16,11 @@ use gecko_bindings::structs::RawGeckoAnimationValueList;
|
|||
use gecko_bindings::structs::RawServoAnimationValue;
|
||||
use gecko_bindings::structs::RawServoAnimationValueMap;
|
||||
use gecko_bindings::structs::RawServoDeclarationBlock;
|
||||
use gecko_bindings::structs::RawServoStyleRule;
|
||||
use gecko_bindings::structs::RawGeckoPresContext;
|
||||
use gecko_bindings::structs::RawGeckoPresContextOwned;
|
||||
use gecko_bindings::structs::RawGeckoStyleAnimationList;
|
||||
use gecko_bindings::structs::RawGeckoServoStyleRuleList;
|
||||
use gecko_bindings::structs::RawGeckoURLExtraData;
|
||||
use gecko_bindings::structs::RefPtr;
|
||||
use gecko_bindings::structs::CSSPseudoClassType;
|
||||
|
@ -207,8 +209,6 @@ pub type RawServoDeclarationBlockBorrowedOrNull<'a> = Option<&'a RawServoDeclara
|
|||
pub type RawServoStyleRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoStyleRule>;
|
||||
pub type RawServoStyleRuleBorrowed<'a> = &'a RawServoStyleRule;
|
||||
pub type RawServoStyleRuleBorrowedOrNull<'a> = Option<&'a RawServoStyleRule>;
|
||||
enum RawServoStyleRuleVoid { }
|
||||
pub struct RawServoStyleRule(RawServoStyleRuleVoid);
|
||||
pub type RawServoImportRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoImportRule>;
|
||||
pub type RawServoImportRuleBorrowed<'a> = &'a RawServoImportRule;
|
||||
pub type RawServoImportRuleBorrowedOrNull<'a> = Option<&'a RawServoImportRule>;
|
||||
|
@ -306,6 +306,10 @@ pub type RawGeckoFontFaceRuleListBorrowed<'a> = &'a RawGeckoFontFaceRuleList;
|
|||
pub type RawGeckoFontFaceRuleListBorrowedOrNull<'a> = Option<&'a RawGeckoFontFaceRuleList>;
|
||||
pub type RawGeckoFontFaceRuleListBorrowedMut<'a> = &'a mut RawGeckoFontFaceRuleList;
|
||||
pub type RawGeckoFontFaceRuleListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoFontFaceRuleList>;
|
||||
pub type RawGeckoServoStyleRuleListBorrowed<'a> = &'a RawGeckoServoStyleRuleList;
|
||||
pub type RawGeckoServoStyleRuleListBorrowedOrNull<'a> = Option<&'a RawGeckoServoStyleRuleList>;
|
||||
pub type RawGeckoServoStyleRuleListBorrowedMut<'a> = &'a mut RawGeckoServoStyleRuleList;
|
||||
pub type RawGeckoServoStyleRuleListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoServoStyleRuleList>;
|
||||
|
||||
extern "C" {
|
||||
pub fn Gecko_EnsureTArrayCapacity(aArray: *mut ::std::os::raw::c_void,
|
||||
|
@ -1911,6 +1915,11 @@ extern "C" {
|
|||
pub fn Servo_Element_GetSnapshot(element: RawGeckoElementBorrowed)
|
||||
-> *mut ServoElementSnapshot;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_Element_GetStyleRuleList(element: RawGeckoElementBorrowed,
|
||||
rules:
|
||||
RawGeckoServoStyleRuleListBorrowedMut);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_NoteExplicitHints(element: RawGeckoElementBorrowed,
|
||||
restyle_hint: nsRestyleHint,
|
||||
|
|
|
@ -26659,6 +26659,9 @@ pub mod root {
|
|||
pub struct RawServoDeclarationBlock([u8; 0]);
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct RawServoStyleRule([u8; 0]);
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct RawServoAnimationValue([u8; 0]);
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
|
@ -26680,6 +26683,8 @@ pub mod root {
|
|||
pub type RawGeckoAnimationPropertySegment =
|
||||
root::mozilla::AnimationPropertySegment;
|
||||
pub type RawGeckoComputedTiming = root::mozilla::ComputedTiming;
|
||||
pub type RawGeckoServoStyleRuleList =
|
||||
root::nsTArray<*const root::RawServoStyleRule>;
|
||||
pub type RawServoAnimationValueMapBorrowed =
|
||||
*const root::RawServoAnimationValueMap;
|
||||
pub type RawGeckoNodeBorrowed = *const root::RawGeckoNode;
|
||||
|
@ -26706,6 +26711,8 @@ pub mod root {
|
|||
*const root::RawGeckoAnimationPropertySegment;
|
||||
pub type RawGeckoComputedTimingBorrowed =
|
||||
*const root::RawGeckoComputedTiming;
|
||||
pub type RawGeckoServoStyleRuleListBorrowedMut =
|
||||
*mut root::RawGeckoServoStyleRuleList;
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct nsSVGAngle([u8; 0]);
|
||||
|
|
|
@ -26000,6 +26000,9 @@ pub mod root {
|
|||
pub struct RawServoDeclarationBlock([u8; 0]);
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct RawServoStyleRule([u8; 0]);
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct RawServoAnimationValue([u8; 0]);
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
|
@ -26021,6 +26024,8 @@ pub mod root {
|
|||
pub type RawGeckoAnimationPropertySegment =
|
||||
root::mozilla::AnimationPropertySegment;
|
||||
pub type RawGeckoComputedTiming = root::mozilla::ComputedTiming;
|
||||
pub type RawGeckoServoStyleRuleList =
|
||||
root::nsTArray<*const root::RawServoStyleRule>;
|
||||
pub type RawServoAnimationValueMapBorrowed =
|
||||
*const root::RawServoAnimationValueMap;
|
||||
pub type RawGeckoNodeBorrowed = *const root::RawGeckoNode;
|
||||
|
@ -26047,6 +26052,8 @@ pub mod root {
|
|||
*const root::RawGeckoAnimationPropertySegment;
|
||||
pub type RawGeckoComputedTimingBorrowed =
|
||||
*const root::RawGeckoComputedTiming;
|
||||
pub type RawGeckoServoStyleRuleListBorrowedMut =
|
||||
*mut root::RawGeckoServoStyleRuleList;
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct nsSVGAngle([u8; 0]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue