Auto merge of #16470 - hiikezoe:canvas-font-handling, r=heycam

Canvas font handling

<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1324700

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

<!-- Either: -->
- [X] These changes do not require tests because it's for stylo.

<!-- 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/16470)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-04-15 06:20:52 -05:00 committed by GitHub
commit a9e917cf87
6 changed files with 518 additions and 390 deletions

View file

@ -1553,6 +1553,15 @@ extern "C" {
list:
RawGeckoFontFaceRuleListBorrowedMut);
}
extern "C" {
pub fn Servo_StyleSet_ResolveForDeclarations(set:
RawServoStyleSetBorrowed,
parent_style:
ServoComputedValuesBorrowedOrNull,
declarations:
RawServoDeclarationBlockBorrowed)
-> ServoComputedValuesStrong;
}
extern "C" {
pub fn Servo_CssRules_ListTypes(rules: ServoCssRulesBorrowed,
result: nsTArrayBorrowed_uintptr_t);
@ -1664,7 +1673,7 @@ extern "C" {
RawServoDeclarationBlockBorrowed);
}
extern "C" {
pub fn Servo_ParseProperty(property: *const nsACString,
pub fn Servo_ParseProperty(property: nsCSSPropertyID,
value: *const nsACString,
data: *mut RawGeckoURLExtraData)
-> RawServoDeclarationBlockStrong;
@ -1845,6 +1854,12 @@ extern "C" {
property:
nsCSSPropertyID);
}
extern "C" {
pub fn Servo_DeclarationBlock_HasCSSWideKeyword(declarations:
RawServoDeclarationBlockBorrowed,
property: nsCSSPropertyID)
-> bool;
}
extern "C" {
pub fn Servo_AnimationCompose(animation_values:
RawServoAnimationValueMapBorrowed,

File diff suppressed because it is too large Load diff

View file

@ -5336,7 +5336,7 @@ pub mod root {
pub vtable_: *const URLValueData__bindgen_vtable,
pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt,
pub mURI: root::nsMainThreadPtrHandle<root::nsIURI>,
pub mString: root::RefPtr<root::nsStringBuffer>,
pub mString: ::nsstring::nsStringRepr,
pub mExtraData: root::RefPtr<root::mozilla::URLExtraData>,
pub mURIResolved: bool,
pub mIsLocalRef: [u8; 2usize],
@ -5346,7 +5346,7 @@ pub mod root {
root::mozilla::TrueType;
#[test]
fn bindgen_test_layout_URLValueData() {
assert_eq!(::std::mem::size_of::<URLValueData>() , 48usize ,
assert_eq!(::std::mem::size_of::<URLValueData>() , 56usize ,
concat ! (
"Size of: " , stringify ! ( URLValueData ) ));
assert_eq! (::std::mem::align_of::<URLValueData>() , 8usize ,
@ -5371,27 +5371,27 @@ pub mod root {
));
assert_eq! (unsafe {
& ( * ( 0 as * const URLValueData ) ) . mExtraData
as * const _ as usize } , 32usize , concat ! (
as * const _ as usize } , 40usize , concat ! (
"Alignment of field: " , stringify ! (
URLValueData ) , "::" , stringify ! ( mExtraData )
));
assert_eq! (unsafe {
& ( * ( 0 as * const URLValueData ) ) .
mURIResolved as * const _ as usize } , 40usize ,
mURIResolved as * const _ as usize } , 48usize ,
concat ! (
"Alignment of field: " , stringify ! (
URLValueData ) , "::" , stringify ! ( mURIResolved
) ));
assert_eq! (unsafe {
& ( * ( 0 as * const URLValueData ) ) .
mIsLocalRef as * const _ as usize } , 41usize ,
mIsLocalRef as * const _ as usize } , 49usize ,
concat ! (
"Alignment of field: " , stringify ! (
URLValueData ) , "::" , stringify ! ( mIsLocalRef
) ));
assert_eq! (unsafe {
& ( * ( 0 as * const URLValueData ) ) .
mMightHaveRef as * const _ as usize } , 43usize ,
mMightHaveRef as * const _ as usize } , 51usize ,
concat ! (
"Alignment of field: " , stringify ! (
URLValueData ) , "::" , stringify ! (
@ -5404,7 +5404,7 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_URLValue() {
assert_eq!(::std::mem::size_of::<URLValue>() , 48usize ,
assert_eq!(::std::mem::size_of::<URLValue>() , 56usize ,
concat ! ( "Size of: " , stringify ! ( URLValue )
));
assert_eq! (::std::mem::align_of::<URLValue>() , 8usize ,
@ -5419,7 +5419,7 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_ImageValue() {
assert_eq!(::std::mem::size_of::<ImageValue>() , 88usize ,
assert_eq!(::std::mem::size_of::<ImageValue>() , 96usize ,
concat ! ( "Size of: " , stringify ! ( ImageValue )
));
assert_eq! (::std::mem::align_of::<ImageValue>() , 8usize ,
@ -5427,7 +5427,7 @@ pub mod root {
"Alignment of " , stringify ! ( ImageValue ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ImageValue ) ) . mRequests as
* const _ as usize } , 48usize , concat ! (
* const _ as usize } , 56usize , concat ! (
"Alignment of field: " , stringify ! ( ImageValue
) , "::" , stringify ! ( mRequests ) ));
}
@ -13066,6 +13066,8 @@ pub mod root {
pub mLangService: root::nsCOMPtr<root::nsILanguageAtomService>,
pub mPrintSettings: root::nsCOMPtr<root::nsIPrintSettings>,
pub mPrefChangedTimer: root::nsCOMPtr<root::nsITimer>,
pub mBidiEngine: root::mozilla::UniquePtr<root::nsBidi,
root::mozilla::DefaultDelete<root::nsBidi>>,
pub mPropertyTable: root::nsPresContext_FramePropertyTable,
pub mTransactions: [u64; 10usize],
pub mTextPerf: root::nsAutoPtr<root::gfxTextPerfMetrics>,
@ -13231,7 +13233,7 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_nsPresContext() {
assert_eq!(::std::mem::size_of::<nsPresContext>() , 1296usize , concat
assert_eq!(::std::mem::size_of::<nsPresContext>() , 1304usize , concat
! ( "Size of: " , stringify ! ( nsPresContext ) ));
assert_eq! (::std::mem::align_of::<nsPresContext>() , 8usize , concat
! ( "Alignment of " , stringify ! ( nsPresContext ) ));
@ -13398,209 +13400,214 @@ pub mod root {
as * const _ as usize } , 232usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mPrefChangedTimer ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mBidiEngine as *
const _ as usize } , 240usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mBidiEngine ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mPropertyTable as
* const _ as usize } , 240usize , concat ! (
* const _ as usize } , 248usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mPropertyTable ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mTransactions as
* const _ as usize } , 296usize , concat ! (
* const _ as usize } , 304usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mTransactions ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mTextPerf as *
const _ as usize } , 376usize , concat ! (
const _ as usize } , 384usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mTextPerf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mMissingFonts as
* const _ as usize } , 384usize , concat ! (
* const _ as usize } , 392usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mMissingFonts ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mVisibleArea as *
const _ as usize } , 392usize , concat ! (
const _ as usize } , 400usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mVisibleArea ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mPageSize as *
const _ as usize } , 408usize , concat ! (
const _ as usize } , 416usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mPageSize ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mPageScale as *
const _ as usize } , 416usize , concat ! (
const _ as usize } , 424usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mPageScale ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mPPScale as *
const _ as usize } , 420usize , concat ! (
const _ as usize } , 428usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mPPScale ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mDefaultColor as
* const _ as usize } , 424usize , concat ! (
* const _ as usize } , 432usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mDefaultColor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mBackgroundColor
as * const _ as usize } , 428usize , concat ! (
as * const _ as usize } , 436usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mBackgroundColor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mLinkColor as *
const _ as usize } , 432usize , concat ! (
const _ as usize } , 440usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mLinkColor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mActiveLinkColor
as * const _ as usize } , 436usize , concat ! (
as * const _ as usize } , 444usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mActiveLinkColor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mVisitedLinkColor
as * const _ as usize } , 440usize , concat ! (
as * const _ as usize } , 448usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mVisitedLinkColor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mFocusBackgroundColor as * const _ as usize } , 444usize ,
mFocusBackgroundColor as * const _ as usize } , 452usize ,
concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mFocusBackgroundColor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mFocusTextColor
as * const _ as usize } , 448usize , concat ! (
as * const _ as usize } , 456usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mFocusTextColor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mBodyTextColor as
* const _ as usize } , 452usize , concat ! (
* const _ as usize } , 460usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mBodyTextColor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mViewportStyleScrollbar as * const _ as usize } , 456usize
mViewportStyleScrollbar as * const _ as usize } , 464usize
, concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mViewportStyleScrollbar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mFocusRingWidth
as * const _ as usize } , 520usize , concat ! (
as * const _ as usize } , 528usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mFocusRingWidth ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mExistThrottledUpdates as * const _ as usize } , 521usize
mExistThrottledUpdates as * const _ as usize } , 529usize
, concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mExistThrottledUpdates ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mImageAnimationMode as * const _ as usize } , 522usize ,
mImageAnimationMode as * const _ as usize } , 530usize ,
concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mImageAnimationMode ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mImageAnimationModePref as * const _ as usize } , 524usize
mImageAnimationModePref as * const _ as usize } , 532usize
, concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mImageAnimationModePref ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mLangGroupFontPrefs as * const _ as usize } , 528usize ,
mLangGroupFontPrefs as * const _ as usize } , 536usize ,
concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mLangGroupFontPrefs ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mBorderWidthTable
as * const _ as usize } , 1168usize , concat ! (
as * const _ as usize } , 1176usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mBorderWidthTable ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mInterruptChecksToSkip as * const _ as usize } , 1180usize
mInterruptChecksToSkip as * const _ as usize } , 1188usize
, concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mInterruptChecksToSkip ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mElementsRestyled
as * const _ as usize } , 1184usize , concat ! (
as * const _ as usize } , 1192usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mElementsRestyled ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mFramesConstructed as * const _ as usize } , 1192usize ,
mFramesConstructed as * const _ as usize } , 1200usize ,
concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mFramesConstructed ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mFramesReflowed
as * const _ as usize } , 1200usize , concat ! (
as * const _ as usize } , 1208usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mFramesReflowed ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mReflowStartTime
as * const _ as usize } , 1208usize , concat ! (
as * const _ as usize } , 1216usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mReflowStartTime ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mFirstNonBlankPaintTime as * const _ as usize } ,
1216usize , concat ! (
1224usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mFirstNonBlankPaintTime ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mFirstClickTime
as * const _ as usize } , 1224usize , concat ! (
as * const _ as usize } , 1232usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mFirstClickTime ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mFirstKeyTime as
* const _ as usize } , 1232usize , concat ! (
* const _ as usize } , 1240usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mFirstKeyTime ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mFirstMouseMoveTime as * const _ as usize } , 1240usize ,
mFirstMouseMoveTime as * const _ as usize } , 1248usize ,
concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mFirstMouseMoveTime ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) . mFirstScrollTime
as * const _ as usize } , 1248usize , concat ! (
as * const _ as usize } , 1256usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mFirstScrollTime ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mInteractionTimeEnabled as * const _ as usize } ,
1256usize , concat ! (
1264usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mInteractionTimeEnabled ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mLastStyleUpdateForAllAnimations as * const _ as usize } ,
1264usize , concat ! (
1272usize , concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mLastStyleUpdateForAllAnimations )
));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mTelemetryScrollLastY as * const _ as usize } , 1272usize
mTelemetryScrollLastY as * const _ as usize } , 1280usize
, concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mTelemetryScrollLastY ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mTelemetryScrollMaxY as * const _ as usize } , 1276usize ,
mTelemetryScrollMaxY as * const _ as usize } , 1284usize ,
concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mTelemetryScrollMaxY ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsPresContext ) ) .
mTelemetryScrollTotalY as * const _ as usize } , 1280usize
mTelemetryScrollTotalY as * const _ as usize } , 1288usize
, concat ! (
"Alignment of field: " , stringify ! ( nsPresContext ) ,
"::" , stringify ! ( mTelemetryScrollTotalY ) ));
@ -15954,66 +15961,66 @@ pub mod root {
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nsDOMMutationObserver([u8; 0]);
pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_HAS_LISTENERMANAGER;
pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_HAS_PROPERTIES;
pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_IS_ANONYMOUS_ROOT;
pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_IS_NATIVE_ANONYMOUS_ROOT;
pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_FORCE_XBL_BINDINGS;
pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_MAY_BE_IN_BINDING_MNGR;
pub const NODE_IS_EDITABLE: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_IS_EDITABLE;
pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_IS_NATIVE_ANONYMOUS;
pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_IS_IN_SHADOW_TREE;
pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_HAS_EMPTY_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_HAS_SLOW_SELECTOR;
pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_HAS_EDGE_CHILD_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_ALL_SELECTOR_FLAGS;
pub const NODE_NEEDS_FRAME: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_NEEDS_FRAME;
pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_DESCENDANTS_NEED_FRAMES;
pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_HAS_ACCESSKEY;
pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_HAS_DIRECTION_RTL;
pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_HAS_DIRECTION_LTR;
pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_ALL_DIRECTION_FLAGS;
pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_CHROME_ONLY_ACCESS;
pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_SHARED_RESTYLE_BIT_1;
pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_SHARED_RESTYLE_BIT_2;
pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_SHARED_RESTYLE_BIT_1;
pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_HAS_LISTENERMANAGER;
pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_HAS_PROPERTIES;
pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_IS_ANONYMOUS_ROOT;
pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_IS_NATIVE_ANONYMOUS_ROOT;
pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_FORCE_XBL_BINDINGS;
pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_MAY_BE_IN_BINDING_MNGR;
pub const NODE_IS_EDITABLE: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_IS_EDITABLE;
pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_IS_NATIVE_ANONYMOUS;
pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_IS_IN_SHADOW_TREE;
pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_HAS_EMPTY_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_HAS_SLOW_SELECTOR;
pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_HAS_EDGE_CHILD_SELECTOR;
pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_ALL_SELECTOR_FLAGS;
pub const NODE_NEEDS_FRAME: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_NEEDS_FRAME;
pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_DESCENDANTS_NEED_FRAMES;
pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_HAS_ACCESSKEY;
pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_HAS_DIRECTION_RTL;
pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_HAS_DIRECTION_LTR;
pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_ALL_DIRECTION_FLAGS;
pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_CHROME_ONLY_ACCESS;
pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_SHARED_RESTYLE_BIT_1;
pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_SHARED_RESTYLE_BIT_2;
pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_SHARED_RESTYLE_BIT_1;
pub const NODE_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO:
root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_SHARED_RESTYLE_BIT_2;
pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_101 =
_bindgen_ty_101::NODE_TYPE_SPECIFIC_BITS_OFFSET;
root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_SHARED_RESTYLE_BIT_2;
pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_99 =
_bindgen_ty_99::NODE_TYPE_SPECIFIC_BITS_OFFSET;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_101 {
pub enum _bindgen_ty_99 {
NODE_HAS_LISTENERMANAGER = 4,
NODE_HAS_PROPERTIES = 8,
NODE_IS_ANONYMOUS_ROOT = 16,
@ -19064,6 +19071,9 @@ pub mod root {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nsBidi([u8; 0]);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nsIPrintSettings([u8; 0]);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
@ -19183,7 +19193,7 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_nsRootPresContext() {
assert_eq!(::std::mem::size_of::<nsRootPresContext>() , 1448usize ,
assert_eq!(::std::mem::size_of::<nsRootPresContext>() , 1456usize ,
concat ! ( "Size of: " , stringify ! ( nsRootPresContext )
));
assert_eq! (::std::mem::align_of::<nsRootPresContext>() , 8usize ,
@ -19191,37 +19201,37 @@ pub mod root {
"Alignment of " , stringify ! ( nsRootPresContext ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsRootPresContext ) ) .
mNotifyDidPaintTimers as * const _ as usize } , 1296usize
mNotifyDidPaintTimers as * const _ as usize } , 1304usize
, concat ! (
"Alignment of field: " , stringify ! ( nsRootPresContext )
, "::" , stringify ! ( mNotifyDidPaintTimers ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsRootPresContext ) ) .
mApplyPluginGeometryTimer as * const _ as usize } ,
1376usize , concat ! (
1384usize , concat ! (
"Alignment of field: " , stringify ! ( nsRootPresContext )
, "::" , stringify ! ( mApplyPluginGeometryTimer ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsRootPresContext ) ) .
mRegisteredPlugins as * const _ as usize } , 1384usize ,
mRegisteredPlugins as * const _ as usize } , 1392usize ,
concat ! (
"Alignment of field: " , stringify ! ( nsRootPresContext )
, "::" , stringify ! ( mRegisteredPlugins ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsRootPresContext ) ) .
mWillPaintObservers as * const _ as usize } , 1424usize ,
mWillPaintObservers as * const _ as usize } , 1432usize ,
concat ! (
"Alignment of field: " , stringify ! ( nsRootPresContext )
, "::" , stringify ! ( mWillPaintObservers ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsRootPresContext ) ) .
mWillPaintFallbackEvent as * const _ as usize } ,
1432usize , concat ! (
1440usize , concat ! (
"Alignment of field: " , stringify ! ( nsRootPresContext )
, "::" , stringify ! ( mWillPaintFallbackEvent ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsRootPresContext ) ) .
mDOMGeneration as * const _ as usize } , 1440usize ,
mDOMGeneration as * const _ as usize } , 1448usize ,
concat ! (
"Alignment of field: " , stringify ! ( nsRootPresContext )
, "::" , stringify ! ( mDOMGeneration ) ));
@ -27607,6 +27617,17 @@ pub mod root {
}
#[test]
fn __bindgen_test_layout_template_52() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::nsBidi>>()
, 1usize , concat ! (
"Size of template specialization: " , stringify ! (
root::mozilla::DefaultDelete<root::nsBidi> ) ));
assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete<root::nsBidi>>()
, 1usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::mozilla::DefaultDelete<root::nsBidi> ) ));
}
#[test]
fn __bindgen_test_layout_template_53() {
assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat
! (
"Size of template specialization: " , stringify ! (
@ -27617,7 +27638,7 @@ pub mod root {
[u64; 28usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_53() {
fn __bindgen_test_layout_template_54() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27628,7 +27649,7 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) ));
}
#[test]
fn __bindgen_test_layout_template_54() {
fn __bindgen_test_layout_template_55() {
assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::mozilla::dom::CSSValue>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27639,7 +27660,7 @@ pub mod root {
root::already_AddRefed<root::mozilla::dom::CSSValue> ) ));
}
#[test]
fn __bindgen_test_layout_template_55() {
fn __bindgen_test_layout_template_56() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::mozilla::dom::TimeoutManager>>()
, 1usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27652,7 +27673,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_template_56() {
fn __bindgen_test_layout_template_57() {
assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsISupports>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27663,7 +27684,7 @@ pub mod root {
root::already_AddRefed<root::nsISupports> ) ));
}
#[test]
fn __bindgen_test_layout_template_57() {
fn __bindgen_test_layout_template_58() {
assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIRunnable>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27674,7 +27695,7 @@ pub mod root {
root::nsCOMPtr<root::nsIRunnable> ) ));
}
#[test]
fn __bindgen_test_layout_template_58() {
fn __bindgen_test_layout_template_59() {
assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsIContent>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27685,7 +27706,7 @@ pub mod root {
root::already_AddRefed<root::nsIContent> ) ));
}
#[test]
fn __bindgen_test_layout_template_59() {
fn __bindgen_test_layout_template_60() {
assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat !
(
"Size of template specialization: " , stringify ! (
@ -27696,7 +27717,7 @@ pub mod root {
[u64; 5usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_60() {
fn __bindgen_test_layout_template_61() {
assert_eq!(::std::mem::size_of::<root::mozilla::OwningNonNull<root::nsINode>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27707,17 +27728,6 @@ pub mod root {
root::mozilla::OwningNonNull<root::nsINode> ) ));
}
#[test]
fn __bindgen_test_layout_template_61() {
assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat !
(
"Size of template specialization: " , stringify ! (
[u32; 2usize] ) ));
assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat !
(
"Alignment of template specialization: " , stringify ! (
[u32; 2usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_62() {
assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat !
(
@ -27741,17 +27751,6 @@ pub mod root {
}
#[test]
fn __bindgen_test_layout_template_64() {
assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat !
(
"Size of template specialization: " , stringify ! (
[u32; 4usize] ) ));
assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat !
(
"Alignment of template specialization: " , stringify ! (
[u32; 4usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_65() {
assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat !
(
"Size of template specialization: " , stringify ! (
@ -27762,6 +27761,17 @@ pub mod root {
[u32; 2usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_65() {
assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat !
(
"Size of template specialization: " , stringify ! (
[u32; 4usize] ) ));
assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat !
(
"Alignment of template specialization: " , stringify ! (
[u32; 4usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_66() {
assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat !
(
@ -27774,14 +27784,14 @@ pub mod root {
}
#[test]
fn __bindgen_test_layout_template_67() {
assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat !
assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat !
(
"Size of template specialization: " , stringify ! (
[u32; 4usize] ) ));
assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat !
[u32; 2usize] ) ));
assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat !
(
"Alignment of template specialization: " , stringify ! (
[u32; 4usize] ) ));
[u32; 2usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_68() {
@ -27807,6 +27817,17 @@ pub mod root {
}
#[test]
fn __bindgen_test_layout_template_70() {
assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat !
(
"Size of template specialization: " , stringify ! (
[u32; 4usize] ) ));
assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat !
(
"Alignment of template specialization: " , stringify ! (
[u32; 4usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_71() {
assert_eq!(::std::mem::size_of::<u32>() , 4usize , concat ! (
"Size of template specialization: " , stringify ! ( u32 )
));
@ -27815,17 +27836,6 @@ pub mod root {
u32 ) ));
}
#[test]
fn __bindgen_test_layout_template_71() {
assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat !
(
"Size of template specialization: " , stringify ! (
[u32; 2usize] ) ));
assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat !
(
"Alignment of template specialization: " , stringify ! (
[u32; 2usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_72() {
assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat !
(
@ -27849,6 +27859,17 @@ pub mod root {
}
#[test]
fn __bindgen_test_layout_template_74() {
assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat !
(
"Size of template specialization: " , stringify ! (
[u32; 2usize] ) ));
assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat !
(
"Alignment of template specialization: " , stringify ! (
[u32; 2usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_75() {
assert_eq!(::std::mem::size_of::<root::nsTArray<f64>>() , 8usize ,
concat ! (
"Size of template specialization: " , stringify ! (
@ -27859,7 +27880,7 @@ pub mod root {
root::nsTArray<f64> ) ));
}
#[test]
fn __bindgen_test_layout_template_75() {
fn __bindgen_test_layout_template_76() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27872,7 +27893,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_template_76() {
fn __bindgen_test_layout_template_77() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27885,7 +27906,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_template_77() {
fn __bindgen_test_layout_template_78() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::ProfilerBacktrace,
root::ProfilerBacktraceDestructor>>()
, 8usize , concat ! (
@ -27902,7 +27923,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_template_78() {
fn __bindgen_test_layout_template_79() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::FontFamilyName>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27913,7 +27934,7 @@ pub mod root {
root::nsTArray<root::mozilla::FontFamilyName> ) ));
}
#[test]
fn __bindgen_test_layout_template_79() {
fn __bindgen_test_layout_template_80() {
assert_eq!(::std::mem::size_of::<root::nsTArray<::std::os::raw::c_uint>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27924,7 +27945,7 @@ pub mod root {
root::nsTArray<::std::os::raw::c_uint> ) ));
}
#[test]
fn __bindgen_test_layout_template_80() {
fn __bindgen_test_layout_template_81() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::FramePropertyTable_PropertyValue>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27937,7 +27958,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_template_81() {
fn __bindgen_test_layout_template_82() {
assert_eq!(::std::mem::size_of::<root::nsPtrHashKey<root::nsIFrame>>()
, 16usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27948,7 +27969,7 @@ pub mod root {
root::nsPtrHashKey<root::nsIFrame> ) ));
}
#[test]
fn __bindgen_test_layout_template_82() {
fn __bindgen_test_layout_template_83() {
assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat !
(
"Size of template specialization: " , stringify ! (
@ -27959,7 +27980,7 @@ pub mod root {
[u64; 5usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_83() {
fn __bindgen_test_layout_template_84() {
assert_eq!(::std::mem::size_of::<root::mozilla::OwningNonNull<root::mozilla::EffectCompositor_AnimationStyleRuleProcessor>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27972,7 +27993,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_template_84() {
fn __bindgen_test_layout_template_85() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::ProxyBehaviour>>()
, 1usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27983,7 +28004,7 @@ pub mod root {
root::mozilla::DefaultDelete<root::ProxyBehaviour> ) ));
}
#[test]
fn __bindgen_test_layout_template_85() {
fn __bindgen_test_layout_template_86() {
assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::mozilla::URLExtraData>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -27994,7 +28015,7 @@ pub mod root {
root::already_AddRefed<root::mozilla::URLExtraData> ) ));
}
#[test]
fn __bindgen_test_layout_template_86() {
fn __bindgen_test_layout_template_87() {
assert_eq!(::std::mem::size_of::<root::nsMainThreadPtrHolder<root::nsIURI>>()
, 24usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -28005,7 +28026,7 @@ pub mod root {
root::nsMainThreadPtrHolder<root::nsIURI> ) ));
}
#[test]
fn __bindgen_test_layout_template_87() {
fn __bindgen_test_layout_template_88() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::nsCSSValueList>>()
, 1usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -28016,7 +28037,7 @@ pub mod root {
root::mozilla::DefaultDelete<root::nsCSSValueList> ) ));
}
#[test]
fn __bindgen_test_layout_template_88() {
fn __bindgen_test_layout_template_89() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValueList,
root::mozilla::DefaultDelete<root::nsCSSValueList>>>()
, 8usize , concat ! (
@ -28033,7 +28054,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_template_89() {
fn __bindgen_test_layout_template_90() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::nsCSSValuePairList>>()
, 1usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -28046,7 +28067,7 @@ pub mod root {
));
}
#[test]
fn __bindgen_test_layout_template_90() {
fn __bindgen_test_layout_template_91() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValuePairList,
root::mozilla::DefaultDelete<root::nsCSSValuePairList>>>()
, 8usize , concat ! (
@ -28063,7 +28084,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_template_91() {
fn __bindgen_test_layout_template_92() {
assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize , concat !
(
"Size of template specialization: " , stringify ! (
@ -28074,7 +28095,7 @@ pub mod root {
[u64; 2usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_92() {
fn __bindgen_test_layout_template_93() {
assert_eq!(::std::mem::size_of::<u64>() , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( u64 )
));
@ -28083,7 +28104,7 @@ pub mod root {
u64 ) ));
}
#[test]
fn __bindgen_test_layout_template_93() {
fn __bindgen_test_layout_template_94() {
assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat !
(
"Size of template specialization: " , stringify ! (
@ -28094,7 +28115,7 @@ pub mod root {
[u32; 3usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_94() {
fn __bindgen_test_layout_template_95() {
assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsStyleImageRequest>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -28105,7 +28126,7 @@ pub mod root {
root::already_AddRefed<root::nsStyleImageRequest> ) ));
}
#[test]
fn __bindgen_test_layout_template_95() {
fn __bindgen_test_layout_template_96() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::nsStyleSides>>()
, 1usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -28116,7 +28137,7 @@ pub mod root {
root::mozilla::DefaultDelete<root::nsStyleSides> ) ));
}
#[test]
fn __bindgen_test_layout_template_96() {
fn __bindgen_test_layout_template_97() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsStyleSides,
root::mozilla::DefaultDelete<root::nsStyleSides>>>()
, 8usize , concat ! (
@ -28133,7 +28154,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_template_97() {
fn __bindgen_test_layout_template_98() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::CachedBorderImageData>>()
, 1usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -28146,7 +28167,7 @@ pub mod root {
));
}
#[test]
fn __bindgen_test_layout_template_98() {
fn __bindgen_test_layout_template_99() {
assert_eq!(::std::mem::size_of::<root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>>()
, 32usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -28157,7 +28178,7 @@ pub mod root {
root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) ));
}
#[test]
fn __bindgen_test_layout_template_99() {
fn __bindgen_test_layout_template_100() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::std::pair<::nsstring::nsStringRepr,
::nsstring::nsStringRepr>>>()
, 8usize , concat ! (
@ -28172,7 +28193,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_template_100() {
fn __bindgen_test_layout_template_101() {
assert_eq!(::std::mem::size_of::<[u64; 18usize]>() , 144usize , concat
! (
"Size of template specialization: " , stringify ! (
@ -28183,7 +28204,7 @@ pub mod root {
[u64; 18usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_101() {
fn __bindgen_test_layout_template_102() {
assert_eq!(::std::mem::size_of::<root::mozilla::BaseTimeDuration<root::mozilla::StickyTimeDurationValueCalculator>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -28196,7 +28217,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_template_102() {
fn __bindgen_test_layout_template_103() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::DisplayItemClip_RoundedRect>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -28209,7 +28230,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_template_103() {
fn __bindgen_test_layout_template_104() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMRect>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -28220,7 +28241,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::DOMRect> ) ));
}
#[test]
fn __bindgen_test_layout_template_104() {
fn __bindgen_test_layout_template_105() {
assert_eq!(::std::mem::size_of::<u64>() , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( u64 )
));
@ -28229,7 +28250,7 @@ pub mod root {
u64 ) ));
}
#[test]
fn __bindgen_test_layout_template_105() {
fn __bindgen_test_layout_template_106() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
@ -28240,7 +28261,7 @@ pub mod root {
root::nsTArray<*mut root::mozilla::css::DocumentRule> ) ));
}
#[test]
fn __bindgen_test_layout_template_106() {
fn __bindgen_test_layout_template_107() {
assert_eq!(::std::mem::size_of::<root::nsAutoPtr<root::nsMediaQuery>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (

View file

@ -359,6 +359,21 @@ impl PropertyDeclarationBlock {
longhands: longhands,
}
}
/// Returns true if the declaration block has a CSSWideKeyword for the given
/// property.
#[cfg(feature = "gecko")]
pub fn has_css_wide_keyword(&self, property: &PropertyId) -> bool {
if let PropertyId::Longhand(id) = *property {
if !self.longhands.contains(id) {
return false
}
}
self.declarations.iter().any(|&(ref decl, _)|
decl.id().is_or_is_longhand_of(property) &&
decl.get_css_wide_keyword().is_some()
)
}
}
impl ToCss for PropertyDeclarationBlock {

View file

@ -854,6 +854,33 @@ impl Stylist {
{
self.dependencies.compute_hint(element, snapshot)
}
/// Computes styles for a given declaration with parent_style.
pub fn compute_for_declarations(&self,
guards: &StylesheetGuards,
parent_style: &Arc<ComputedValues>,
declarations: Arc<Locked<PropertyDeclarationBlock>>)
-> Arc<ComputedValues> {
use font_metrics::get_metrics_provider_for_product;
let v = vec![
ApplicableDeclarationBlock::from_declarations(declarations.clone(),
CascadeLevel::StyleAttributeNormal)
];
let rule_node =
self.rule_tree.insert_ordered_rules(v.into_iter().map(|a| (a.source, a.level)));
let metrics = get_metrics_provider_for_product();
Arc::new(properties::cascade(&self.device,
&rule_node,
guards,
Some(parent_style),
Some(parent_style),
None,
&StdoutErrorReporter,
&metrics,
CascadeFlags::empty()))
}
}
impl Drop for Stylist {

View file

@ -990,15 +990,11 @@ pub extern "C" fn Servo_StyleSet_Drop(data: RawServoStyleSetOwned) {
}
#[no_mangle]
pub extern "C" fn Servo_ParseProperty(property: *const nsACString, value: *const nsACString,
pub extern "C" fn Servo_ParseProperty(property: nsCSSPropertyID, value: *const nsACString,
data: *mut URLExtraData)
-> RawServoDeclarationBlockStrong {
let name = unsafe { property.as_ref().unwrap().as_str_unchecked() };
let id = if let Ok(id) = PropertyId::parse(name.into()) {
id
} else {
return RawServoDeclarationBlockStrong::null()
};
let id = get_property_id_from_nscsspropertyid!(property,
RawServoDeclarationBlockStrong::null());
let value = unsafe { value.as_ref().unwrap().as_str_unchecked() };
let url_data = unsafe { RefPtr::from_ptr_ref(&data) };
@ -1239,6 +1235,15 @@ pub extern "C" fn Servo_MediaList_Matches(list: RawServoMediaListBorrowed,
})
}
#[no_mangle]
pub extern "C" fn Servo_DeclarationBlock_HasCSSWideKeyword(declarations: RawServoDeclarationBlockBorrowed,
property: nsCSSPropertyID) -> bool {
let property_id = get_property_id_from_nscsspropertyid!(property, false);
read_locked_arc(declarations, |decls: &PropertyDeclarationBlock| {
decls.has_css_wide_keyword(&property_id)
})
}
#[no_mangle]
pub extern "C" fn Servo_MediaList_GetText(list: RawServoMediaListBorrowed, result: *mut nsAString) {
read_locked_arc(list, |list: &MediaList| {
@ -2118,3 +2123,27 @@ pub extern "C" fn Servo_StyleSet_GetFontFaceRules(raw_data: RawServoStyleSetBorr
dest.mSheetType = src.1.into();
}
}
#[no_mangle]
pub extern "C" fn Servo_StyleSet_ResolveForDeclarations(raw_data: RawServoStyleSetBorrowed,
parent_style_or_null: ServoComputedValuesBorrowedOrNull,
declarations: RawServoDeclarationBlockBorrowed)
-> ServoComputedValuesStrong
{
let doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow();
let global_style_data = &*GLOBAL_STYLE_DATA;
let guard = global_style_data.shared_lock.read();
let guards = StylesheetGuards::same(&guard);
let parent_style = match ComputedValues::arc_from_borrowed(&parent_style_or_null) {
Some(parent) => &parent,
None => doc_data.default_computed_values(),
};
let declarations = Locked::<PropertyDeclarationBlock>::as_arc(&declarations);
doc_data.stylist.compute_for_declarations(&guards,
parent_style,
declarations.clone()).into_strong()
}