mirror of
https://github.com/servo/servo.git
synced 2025-08-17 11:25:35 +01:00
Auto merge of #15627 - Manishearth:stylo-svg, r=heycam
stylo: Finish all SVG properties reviewed in bug https://bugzilla.mozilla.org/show_bug.cgi?id=1338388 <!-- 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/15627) <!-- Reviewable:end -->
This commit is contained in:
commit
d3ba09e588
17 changed files with 844 additions and 101 deletions
|
@ -3,6 +3,7 @@
|
|||
pub use nsstring::{nsACString, nsAString};
|
||||
type nsACString_internal = nsACString;
|
||||
type nsAString_internal = nsAString;
|
||||
use gecko_bindings::structs::mozilla::css::URLValue;
|
||||
use gecko_bindings::structs::RawGeckoDocument;
|
||||
use gecko_bindings::structs::RawGeckoElement;
|
||||
use gecko_bindings::structs::RawGeckoKeyframeList;
|
||||
|
@ -20,6 +21,7 @@ use gecko_bindings::structs::TraversalRootBehavior;
|
|||
use gecko_bindings::structs::FontFamilyList;
|
||||
use gecko_bindings::structs::FontFamilyType;
|
||||
use gecko_bindings::structs::Keyframe;
|
||||
use gecko_bindings::structs::ServoBundledURI;
|
||||
use gecko_bindings::structs::ServoElementSnapshot;
|
||||
use gecko_bindings::structs::SheetParsingMode;
|
||||
use gecko_bindings::structs::StyleBasicShape;
|
||||
|
@ -69,6 +71,9 @@ unsafe impl Sync for nsStyleDisplay {}
|
|||
use gecko_bindings::structs::nsStyleEffects;
|
||||
unsafe impl Send for nsStyleEffects {}
|
||||
unsafe impl Sync for nsStyleEffects {}
|
||||
use gecko_bindings::structs::nsStyleFilter;
|
||||
unsafe impl Send for nsStyleFilter {}
|
||||
unsafe impl Sync for nsStyleFilter {}
|
||||
use gecko_bindings::structs::nsStyleFont;
|
||||
unsafe impl Send for nsStyleFont {}
|
||||
unsafe impl Sync for nsStyleFont {}
|
||||
|
@ -114,6 +119,9 @@ unsafe impl Sync for nsStyleQuoteValues {}
|
|||
use gecko_bindings::structs::nsStyleSVG;
|
||||
unsafe impl Send for nsStyleSVG {}
|
||||
unsafe impl Sync for nsStyleSVG {}
|
||||
use gecko_bindings::structs::nsStyleSVGPaint;
|
||||
unsafe impl Send for nsStyleSVGPaint {}
|
||||
unsafe impl Sync for nsStyleSVGPaint {}
|
||||
use gecko_bindings::structs::nsStyleSVGReset;
|
||||
unsafe impl Send for nsStyleSVGReset {}
|
||||
unsafe impl Sync for nsStyleSVGReset {}
|
||||
|
@ -590,11 +598,7 @@ extern "C" {
|
|||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_SetListStyleImage(style_struct: *mut nsStyleList,
|
||||
string_bytes: *const u8,
|
||||
string_length: u32,
|
||||
base_uri: *mut ThreadSafeURIHolder,
|
||||
referrer: *mut ThreadSafeURIHolder,
|
||||
principal: *mut ThreadSafePrincipalHolder);
|
||||
uri: ServoBundledURI);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_CopyListStyleImageFrom(dest: *mut nsStyleList,
|
||||
|
@ -615,17 +619,6 @@ extern "C" {
|
|||
pub fn Gecko_CopyCursorArrayFrom(dest: *mut nsStyleUserInterface,
|
||||
src: *const nsStyleUserInterface);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_SetMozBinding(style_struct: *mut nsStyleDisplay,
|
||||
string_bytes: *const u8, string_length: u32,
|
||||
base_uri: *mut ThreadSafeURIHolder,
|
||||
referrer: *mut ThreadSafeURIHolder,
|
||||
principal: *mut ThreadSafePrincipalHolder);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_CopyMozBindingFrom(des: *mut nsStyleDisplay,
|
||||
src: *const nsStyleDisplay);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_GetNodeFlags(node: RawGeckoNodeBorrowed) -> u32;
|
||||
}
|
||||
|
@ -707,6 +700,10 @@ extern "C" {
|
|||
pub fn Gecko_NewBasicShape(type_: StyleBasicShapeType)
|
||||
-> *mut StyleBasicShape;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_StyleClipPath_SetURLValue(clip: *mut StyleClipPath,
|
||||
uri: ServoBundledURI);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_ResetFilters(effects: *mut nsStyleEffects, new_len: usize);
|
||||
}
|
||||
|
@ -714,6 +711,38 @@ extern "C" {
|
|||
pub fn Gecko_CopyFiltersFrom(aSrc: *mut nsStyleEffects,
|
||||
aDest: *mut nsStyleEffects);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_nsStyleFilter_SetURLValue(effects: *mut nsStyleFilter,
|
||||
uri: ServoBundledURI);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_nsStyleSVGPaint_CopyFrom(dest: *mut nsStyleSVGPaint,
|
||||
src: *const nsStyleSVGPaint);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_nsStyleSVGPaint_SetURLValue(paint: *mut nsStyleSVGPaint,
|
||||
uri: ServoBundledURI);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_nsStyleSVGPaint_Reset(paint: *mut nsStyleSVGPaint);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_nsStyleSVG_SetDashArrayLength(svg: *mut nsStyleSVG,
|
||||
len: u32);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_nsStyleSVG_CopyDashArray(dst: *mut nsStyleSVG,
|
||||
src: *const nsStyleSVG);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_NewURLValue(uri: ServoBundledURI) -> *mut URLValue;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_AddRefCSSURLValueArbitraryThread(aPtr: *mut URLValue);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_ReleaseCSSURLValueArbitraryThread(aPtr: *mut URLValue);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_FillAllBackgroundLists(layers: *mut nsStyleImageLayers,
|
||||
max_len: u32);
|
||||
|
|
|
@ -25363,6 +25363,23 @@ pub mod root {
|
|||
pub type ThreadSafePrincipalHolder =
|
||||
root::nsMainThreadPtrHolder<root::nsIPrincipal>;
|
||||
pub type ThreadSafeURIHolder = root::nsMainThreadPtrHolder<root::nsIURI>;
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct ServoBundledURI {
|
||||
pub mURLString: *const u8,
|
||||
pub mURLStringLength: u32,
|
||||
pub mBaseURI: *mut root::ThreadSafeURIHolder,
|
||||
pub mReferrer: *mut root::ThreadSafeURIHolder,
|
||||
pub mPrincipal: *mut root::ThreadSafePrincipalHolder,
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_ServoBundledURI() {
|
||||
assert_eq!(::std::mem::size_of::<ServoBundledURI>() , 40usize);
|
||||
assert_eq!(::std::mem::align_of::<ServoBundledURI>() , 8usize);
|
||||
}
|
||||
impl Clone for ServoBundledURI {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
pub type nsMediaFeatureValueGetter =
|
||||
::std::option::Option<unsafe extern "C" fn(aPresContext:
|
||||
*mut root::nsPresContext,
|
||||
|
|
|
@ -24719,6 +24719,23 @@ pub mod root {
|
|||
pub type ThreadSafePrincipalHolder =
|
||||
root::nsMainThreadPtrHolder<root::nsIPrincipal>;
|
||||
pub type ThreadSafeURIHolder = root::nsMainThreadPtrHolder<root::nsIURI>;
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct ServoBundledURI {
|
||||
pub mURLString: *const u8,
|
||||
pub mURLStringLength: u32,
|
||||
pub mBaseURI: *mut root::ThreadSafeURIHolder,
|
||||
pub mReferrer: *mut root::ThreadSafeURIHolder,
|
||||
pub mPrincipal: *mut root::ThreadSafePrincipalHolder,
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_ServoBundledURI() {
|
||||
assert_eq!(::std::mem::size_of::<ServoBundledURI>() , 40usize);
|
||||
assert_eq!(::std::mem::align_of::<ServoBundledURI>() , 8usize);
|
||||
}
|
||||
impl Clone for ServoBundledURI {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
pub type nsMediaFeatureValueGetter =
|
||||
::std::option::Option<unsafe extern "C" fn(aPresContext:
|
||||
*mut root::nsPresContext,
|
||||
|
|
|
@ -264,6 +264,9 @@ impl_threadsafe_refcount!(::gecko_bindings::structs::nsStyleQuoteValues,
|
|||
impl_threadsafe_refcount!(::gecko_bindings::structs::nsCSSValueSharedList,
|
||||
Gecko_AddRefCSSValueSharedListArbitraryThread,
|
||||
Gecko_ReleaseCSSValueSharedListArbitraryThread);
|
||||
impl_threadsafe_refcount!(::gecko_bindings::structs::mozilla::css::URLValue,
|
||||
Gecko_AddRefCSSURLValueArbitraryThread,
|
||||
Gecko_ReleaseCSSURLValueArbitraryThread);
|
||||
/// A Gecko `ThreadSafePrincipalHolder` wrapped in a safe refcounted pointer, to
|
||||
/// use during stylesheet parsing and style computation.
|
||||
pub type GeckoArcPrincipal = RefPtr<::gecko_bindings::structs::ThreadSafePrincipalHolder>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue