servo: Merge #18786 - Rename nsIAtom as nsAtom (from nnethercote:bug-1400460); r=froydnj

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than
nsIAtom.

<!-- Please describe your changes on the following line: -->

This is the Servo-side PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1400460.

---
<!-- 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
- [ ] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1400460

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because testing is on the Gecko side.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 715fc9cea6ed4ad22772c6d20136eac66cfe275c

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c3c028c08f605db5000531493cec20c3f427eeac
This commit is contained in:
Nicholas Nethercote 2017-10-08 19:10:40 -05:00
parent 53d5092208
commit 8f5500e263
12 changed files with 12752 additions and 12752 deletions

File diff suppressed because it is too large Load Diff

View File

@ -80,7 +80,7 @@ use gecko_bindings::structs::nsCSSValueSharedList;
use gecko_bindings::structs::nsChangeHint;
use gecko_bindings::structs::nsCursorImage;
use gecko_bindings::structs::nsFont;
use gecko_bindings::structs::nsIAtom;
use gecko_bindings::structs::nsAtom;
use gecko_bindings::structs::nsIURI;
use gecko_bindings::structs::nsCompatibility;
use gecko_bindings::structs::nsRestyleHint;
@ -556,7 +556,7 @@ extern "C" {
RawGeckoPresContextBorrowed,
values: ServoComputedDataBorrowed,
pseudo_type: CSSPseudoElementType,
pseudo_tag: *mut nsIAtom);
pseudo_tag: *mut nsAtom);
}
extern "C" {
pub fn Gecko_ServoStyleContext_Destroy(context: *mut ServoStyleContext);
@ -600,17 +600,17 @@ extern "C" {
element: RawGeckoElementBorrowed) -> bool;
}
extern "C" {
pub fn Gecko_Namespace(element: RawGeckoElementBorrowed) -> *mut nsIAtom;
pub fn Gecko_Namespace(element: RawGeckoElementBorrowed) -> *mut nsAtom;
}
extern "C" {
pub fn Gecko_MatchLang(element: RawGeckoElementBorrowed,
override_lang: *mut nsIAtom,
override_lang: *mut nsAtom,
has_override_lang: bool, value: *const u16)
-> bool;
}
extern "C" {
pub fn Gecko_GetXMLLangValue(element: RawGeckoElementBorrowed)
-> *mut nsIAtom;
-> *mut nsAtom;
}
extern "C" {
pub fn Gecko_GetDocumentLWTheme(aDocument: *const nsIDocument)
@ -618,108 +618,108 @@ extern "C" {
}
extern "C" {
pub fn Gecko_AtomAttrValue(element: RawGeckoElementBorrowed,
attribute: *mut nsIAtom) -> *mut nsIAtom;
attribute: *mut nsAtom) -> *mut nsAtom;
}
extern "C" {
pub fn Gecko_LangValue(element: RawGeckoElementBorrowed) -> *mut nsIAtom;
pub fn Gecko_LangValue(element: RawGeckoElementBorrowed) -> *mut nsAtom;
}
extern "C" {
pub fn Gecko_HasAttr(element: RawGeckoElementBorrowed, ns: *mut nsIAtom,
name: *mut nsIAtom) -> bool;
pub fn Gecko_HasAttr(element: RawGeckoElementBorrowed, ns: *mut nsAtom,
name: *mut nsAtom) -> bool;
}
extern "C" {
pub fn Gecko_AttrEquals(element: RawGeckoElementBorrowed,
ns: *mut nsIAtom, name: *mut nsIAtom,
str: *mut nsIAtom, ignoreCase: bool) -> bool;
ns: *mut nsAtom, name: *mut nsAtom,
str: *mut nsAtom, ignoreCase: bool) -> bool;
}
extern "C" {
pub fn Gecko_AttrDashEquals(element: RawGeckoElementBorrowed,
ns: *mut nsIAtom, name: *mut nsIAtom,
str: *mut nsIAtom, ignore_case: bool) -> bool;
ns: *mut nsAtom, name: *mut nsAtom,
str: *mut nsAtom, ignore_case: bool) -> bool;
}
extern "C" {
pub fn Gecko_AttrIncludes(element: RawGeckoElementBorrowed,
ns: *mut nsIAtom, name: *mut nsIAtom,
str: *mut nsIAtom, ignore_case: bool) -> bool;
ns: *mut nsAtom, name: *mut nsAtom,
str: *mut nsAtom, ignore_case: bool) -> bool;
}
extern "C" {
pub fn Gecko_AttrHasSubstring(element: RawGeckoElementBorrowed,
ns: *mut nsIAtom, name: *mut nsIAtom,
str: *mut nsIAtom, ignore_case: bool)
ns: *mut nsAtom, name: *mut nsAtom,
str: *mut nsAtom, ignore_case: bool)
-> bool;
}
extern "C" {
pub fn Gecko_AttrHasPrefix(element: RawGeckoElementBorrowed,
ns: *mut nsIAtom, name: *mut nsIAtom,
str: *mut nsIAtom, ignore_case: bool) -> bool;
ns: *mut nsAtom, name: *mut nsAtom,
str: *mut nsAtom, ignore_case: bool) -> bool;
}
extern "C" {
pub fn Gecko_AttrHasSuffix(element: RawGeckoElementBorrowed,
ns: *mut nsIAtom, name: *mut nsIAtom,
str: *mut nsIAtom, ignore_case: bool) -> bool;
ns: *mut nsAtom, name: *mut nsAtom,
str: *mut nsAtom, ignore_case: bool) -> bool;
}
extern "C" {
pub fn Gecko_ClassOrClassList(element: RawGeckoElementBorrowed,
class_: *mut *mut nsIAtom,
classList: *mut *mut *mut nsIAtom) -> u32;
class_: *mut *mut nsAtom,
classList: *mut *mut *mut nsAtom) -> u32;
}
extern "C" {
pub fn Gecko_SnapshotAtomAttrValue(element: *const ServoElementSnapshot,
attribute: *mut nsIAtom)
-> *mut nsIAtom;
attribute: *mut nsAtom)
-> *mut nsAtom;
}
extern "C" {
pub fn Gecko_SnapshotLangValue(element: *const ServoElementSnapshot)
-> *mut nsIAtom;
-> *mut nsAtom;
}
extern "C" {
pub fn Gecko_SnapshotHasAttr(element: *const ServoElementSnapshot,
ns: *mut nsIAtom, name: *mut nsIAtom)
ns: *mut nsAtom, name: *mut nsAtom)
-> bool;
}
extern "C" {
pub fn Gecko_SnapshotAttrEquals(element: *const ServoElementSnapshot,
ns: *mut nsIAtom, name: *mut nsIAtom,
str: *mut nsIAtom, ignoreCase: bool)
ns: *mut nsAtom, name: *mut nsAtom,
str: *mut nsAtom, ignoreCase: bool)
-> bool;
}
extern "C" {
pub fn Gecko_SnapshotAttrDashEquals(element: *const ServoElementSnapshot,
ns: *mut nsIAtom, name: *mut nsIAtom,
str: *mut nsIAtom, ignore_case: bool)
ns: *mut nsAtom, name: *mut nsAtom,
str: *mut nsAtom, ignore_case: bool)
-> bool;
}
extern "C" {
pub fn Gecko_SnapshotAttrIncludes(element: *const ServoElementSnapshot,
ns: *mut nsIAtom, name: *mut nsIAtom,
str: *mut nsIAtom, ignore_case: bool)
ns: *mut nsAtom, name: *mut nsAtom,
str: *mut nsAtom, ignore_case: bool)
-> bool;
}
extern "C" {
pub fn Gecko_SnapshotAttrHasSubstring(element:
*const ServoElementSnapshot,
ns: *mut nsIAtom,
name: *mut nsIAtom,
str: *mut nsIAtom,
ns: *mut nsAtom,
name: *mut nsAtom,
str: *mut nsAtom,
ignore_case: bool) -> bool;
}
extern "C" {
pub fn Gecko_SnapshotAttrHasPrefix(element: *const ServoElementSnapshot,
ns: *mut nsIAtom, name: *mut nsIAtom,
str: *mut nsIAtom, ignore_case: bool)
ns: *mut nsAtom, name: *mut nsAtom,
str: *mut nsAtom, ignore_case: bool)
-> bool;
}
extern "C" {
pub fn Gecko_SnapshotAttrHasSuffix(element: *const ServoElementSnapshot,
ns: *mut nsIAtom, name: *mut nsIAtom,
str: *mut nsIAtom, ignore_case: bool)
ns: *mut nsAtom, name: *mut nsAtom,
str: *mut nsAtom, ignore_case: bool)
-> bool;
}
extern "C" {
pub fn Gecko_SnapshotClassOrClassList(element:
*const ServoElementSnapshot,
class_: *mut *mut nsIAtom,
classList: *mut *mut *mut nsIAtom)
class_: *mut *mut nsAtom,
classList: *mut *mut *mut nsAtom)
-> u32;
}
extern "C" {
@ -841,32 +841,32 @@ extern "C" {
extern "C" {
pub fn Gecko_StyleTransition_SetUnsupportedProperty(aTransition:
*mut StyleTransition,
aAtom: *mut nsIAtom);
aAtom: *mut nsAtom);
}
extern "C" {
pub fn Gecko_Atomize(aString: *const ::std::os::raw::c_char, aLength: u32)
-> *mut nsIAtom;
-> *mut nsAtom;
}
extern "C" {
pub fn Gecko_Atomize16(aString: *const nsAString) -> *mut nsIAtom;
pub fn Gecko_Atomize16(aString: *const nsAString) -> *mut nsAtom;
}
extern "C" {
pub fn Gecko_AddRefAtom(aAtom: *mut nsIAtom);
pub fn Gecko_AddRefAtom(aAtom: *mut nsAtom);
}
extern "C" {
pub fn Gecko_ReleaseAtom(aAtom: *mut nsIAtom);
pub fn Gecko_ReleaseAtom(aAtom: *mut nsAtom);
}
extern "C" {
pub fn Gecko_GetAtomAsUTF16(aAtom: *mut nsIAtom, aLength: *mut u32)
pub fn Gecko_GetAtomAsUTF16(aAtom: *mut nsAtom, aLength: *mut u32)
-> *const u16;
}
extern "C" {
pub fn Gecko_AtomEqualsUTF8(aAtom: *mut nsIAtom,
pub fn Gecko_AtomEqualsUTF8(aAtom: *mut nsAtom,
aString: *const ::std::os::raw::c_char,
aLength: u32) -> bool;
}
extern "C" {
pub fn Gecko_AtomEqualsUTF8IgnoreCase(aAtom: *mut nsIAtom,
pub fn Gecko_AtomEqualsUTF8IgnoreCase(aAtom: *mut nsAtom,
aString:
*const ::std::os::raw::c_char,
aLength: u32) -> bool;
@ -880,7 +880,7 @@ extern "C" {
extern "C" {
pub fn Gecko_nsTArray_FontFamilyName_AppendNamed(aNames:
*mut nsTArray<FontFamilyName>,
aName: *mut nsIAtom,
aName: *mut nsAtom,
aQuoted: bool);
}
extern "C" {
@ -924,9 +924,9 @@ extern "C" {
extern "C" {
pub fn Gecko_AppendFeatureValueHashEntry(value_set:
*mut gfxFontFeatureValueSet,
family: *mut nsIAtom,
family: *mut nsAtom,
alternate: u32,
name: *mut nsIAtom)
name: *mut nsAtom)
-> *mut nsTArray<::std::os::raw::c_uint>;
}
extern "C" {
@ -942,7 +942,7 @@ extern "C" {
}
extern "C" {
pub fn Gecko_AppendAlternateValues(font: *mut nsFont, alternate_name: u32,
atom: *mut nsIAtom);
atom: *mut nsAtom);
}
extern "C" {
pub fn Gecko_CopyAlternateValuesFrom(dest: *mut nsFont,
@ -962,7 +962,7 @@ extern "C" {
}
extern "C" {
pub fn Gecko_SetCounterStyleToName(ptr: *mut CounterStylePtr,
name: *mut nsIAtom,
name: *mut nsAtom,
pres_context:
RawGeckoPresContextBorrowed);
}
@ -982,7 +982,7 @@ extern "C" {
}
extern "C" {
pub fn Gecko_CounterStyle_GetName(ptr: *const CounterStylePtr)
-> *mut nsIAtom;
-> *mut nsAtom;
}
extern "C" {
pub fn Gecko_CounterStyle_GetAnonymous(ptr: *const CounterStylePtr)
@ -1016,7 +1016,7 @@ extern "C" {
}
extern "C" {
pub fn Gecko_SetImageElement(image: *mut nsStyleImage,
atom: *mut nsIAtom);
atom: *mut nsAtom);
}
extern "C" {
pub fn Gecko_CopyImageValueFrom(image: *mut nsStyleImage,
@ -1035,7 +1035,7 @@ extern "C" {
-> *const URLValueData;
}
extern "C" {
pub fn Gecko_GetImageElement(image: *const nsStyleImage) -> *mut nsIAtom;
pub fn Gecko_GetImageElement(image: *const nsStyleImage) -> *mut nsAtom;
}
extern "C" {
pub fn Gecko_GetGradientImageValue(image: *const nsStyleImage)
@ -1189,7 +1189,7 @@ extern "C" {
}
extern "C" {
pub fn Gecko_AppendWillChange(display: *mut nsStyleDisplay,
atom: *mut nsIAtom);
atom: *mut nsAtom);
}
extern "C" {
pub fn Gecko_CopyWillChangeFrom(dest: *mut nsStyleDisplay,
@ -1397,12 +1397,12 @@ extern "C" {
}
extern "C" {
pub fn Gecko_CSSValue_SetStringFromAtom(css_value: nsCSSValueBorrowedMut,
atom: *mut nsIAtom,
atom: *mut nsAtom,
unit: nsCSSUnit);
}
extern "C" {
pub fn Gecko_CSSValue_SetAtomIdent(css_value: nsCSSValueBorrowedMut,
atom: *mut nsIAtom);
atom: *mut nsAtom);
}
extern "C" {
pub fn Gecko_CSSValue_SetArray(css_value: nsCSSValueBorrowedMut,
@ -1445,7 +1445,7 @@ extern "C" {
}
extern "C" {
pub fn Gecko_nsStyleFont_SetLang(font: *mut nsStyleFont,
atom: *mut nsIAtom);
atom: *mut nsAtom);
}
extern "C" {
pub fn Gecko_nsStyleFont_CopyLangFrom(aFont: *mut nsStyleFont,
@ -1468,7 +1468,7 @@ extern "C" {
RawGeckoPresContextBorrowed);
}
extern "C" {
pub fn Gecko_GetBaseSize(lang: *mut nsIAtom) -> FontSizePrefs;
pub fn Gecko_GetBaseSize(lang: *mut nsAtom) -> FontSizePrefs;
}
extern "C" {
pub fn Gecko_GetBindingParent(aElement: RawGeckoElementBorrowed)
@ -1537,7 +1537,7 @@ extern "C" {
pub fn Gecko_CSSFontFaceRule_Release(aPtr: *mut nsCSSFontFaceRule);
}
extern "C" {
pub fn Gecko_CSSCounterStyle_Create(name: *mut nsIAtom)
pub fn Gecko_CSSCounterStyle_Create(name: *mut nsAtom)
-> *mut nsCSSCounterStyleRule;
}
extern "C" {
@ -1575,7 +1575,7 @@ extern "C" {
arg2: nsCSSPropertyID);
}
extern "C" {
pub fn Gecko_RegisterNamespace(ns: *mut nsIAtom) -> i32;
pub fn Gecko_RegisterNamespace(ns: *mut nsAtom) -> i32;
}
extern "C" {
pub fn Gecko_ShouldCreateStyleThreadPool() -> bool;
@ -2073,7 +2073,7 @@ extern "C" {
}
extern "C" {
pub fn Servo_StyleSet_GetCounterStyleRule(set: RawServoStyleSetBorrowed,
name: *mut nsIAtom)
name: *mut nsAtom)
-> *mut nsCSSCounterStyleRule;
}
extern "C" {
@ -2116,7 +2116,7 @@ extern "C" {
element:
RawGeckoElementBorrowed,
local_name:
*mut nsIAtom)
*mut nsAtom)
-> bool;
}
extern "C" {
@ -2367,11 +2367,11 @@ extern "C" {
}
extern "C" {
pub fn Servo_KeyframesRule_GetName(rule: RawServoKeyframesRuleBorrowed)
-> *mut nsIAtom;
-> *mut nsAtom;
}
extern "C" {
pub fn Servo_KeyframesRule_SetName(rule: RawServoKeyframesRuleBorrowed,
name: *mut nsIAtom);
name: *mut nsAtom);
}
extern "C" {
pub fn Servo_KeyframesRule_GetCount(rule: RawServoKeyframesRuleBorrowed)
@ -2404,11 +2404,11 @@ extern "C" {
}
extern "C" {
pub fn Servo_NamespaceRule_GetPrefix(rule: RawServoNamespaceRuleBorrowed)
-> *mut nsIAtom;
-> *mut nsAtom;
}
extern "C" {
pub fn Servo_NamespaceRule_GetURI(rule: RawServoNamespaceRuleBorrowed)
-> *mut nsIAtom;
-> *mut nsAtom;
}
extern "C" {
pub fn Servo_PageRule_GetStyle(rule: RawServoPageRuleBorrowed)
@ -2728,7 +2728,7 @@ extern "C" {
RawServoDeclarationBlockBorrowed,
property:
nsCSSPropertyID,
value: *mut nsIAtom);
value: *mut nsAtom);
}
extern "C" {
pub fn Servo_DeclarationBlock_SetKeywordValue(declarations:
@ -2844,14 +2844,14 @@ extern "C" {
extern "C" {
pub fn Servo_ComputedValues_GetForAnonymousBox(parent_style_or_null:
ServoStyleContextBorrowedOrNull,
pseudo_tag: *mut nsIAtom,
pseudo_tag: *mut nsAtom,
set:
RawServoStyleSetBorrowed)
-> ServoStyleContextStrong;
}
extern "C" {
pub fn Servo_ComputedValues_Inherit(set: RawServoStyleSetBorrowed,
pseudo_tag: *mut nsIAtom,
pseudo_tag: *mut nsAtom,
parent_style:
ServoStyleContextBorrowedOrNull,
target: InheritTarget)

View File

@ -867,7 +867,7 @@ None
}
/// Get a PseudoInfo for a pseudo
pub fn pseudo_info(&self) -> (*mut structs::nsIAtom, CSSPseudoElementType) {
pub fn pseudo_info(&self) -> (*mut structs::nsAtom, CSSPseudoElementType) {
(self.atom().as_ptr(), self.pseudo_type())
}

View File

@ -2411,7 +2411,7 @@ pub mod root {
#[repr(C)]
#[derive(Debug, Copy)]
pub struct Element_MappedAttributeEntry {
pub attribute: *mut *mut root::nsIAtom,
pub attribute: *mut *mut root::nsAtom,
}
#[test]
fn bindgen_test_layout_Element_MappedAttributeEntry() {
@ -2537,12 +2537,12 @@ pub mod root {
#[repr(C)]
#[derive(Debug, Copy)]
pub struct NodeInfo_NodeInfoInner {
pub mName: *const root::nsIAtom,
pub mPrefix: *mut root::nsIAtom,
pub mName: *const root::nsAtom,
pub mPrefix: *mut root::nsAtom,
pub mNamespaceID: i32,
pub mNodeType: u16,
pub mNameString: *const root::nsAString,
pub mExtraName: *mut root::nsIAtom,
pub mExtraName: *mut root::nsAtom,
pub mHash: root::PLHashNumber,
pub mHashInitialized: bool,
}
@ -6811,7 +6811,7 @@ pub mod root {
#[repr(C)]
#[derive(Debug)]
pub struct LangGroupFontPrefs {
pub mLangGroup: root::RefPtr<root::nsIAtom>,
pub mLangGroup: root::RefPtr<root::nsAtom>,
pub mMinimumFontSize: root::nscoord,
pub mDefaultVariableFont: root::nsFont,
pub mDefaultFixedFont: root::nsFont,
@ -7337,7 +7337,7 @@ pub mod root {
pub mDuration: f32,
pub mDelay: f32,
pub mProperty: root::nsCSSPropertyID,
pub mUnknownProperty: root::RefPtr<root::nsIAtom>,
pub mUnknownProperty: root::RefPtr<root::nsAtom>,
}
#[test]
fn bindgen_test_layout_StyleTransition() {
@ -12399,7 +12399,7 @@ pub mod root {
pub mScriptUnconstrainedSize: root::nscoord,
pub mScriptMinSize: root::nscoord,
pub mScriptSizeMultiplier: f32,
pub mLanguage: root::RefPtr<root::nsIAtom>,
pub mLanguage: root::RefPtr<root::nsAtom>,
}
pub const nsStyleFont_kHasFinishStyle: bool = false;
#[test]
@ -13038,7 +13038,7 @@ pub mod root {
pub mMarkerMid: root::RefPtr<root::mozilla::css::URLValue>,
pub mMarkerStart: root::RefPtr<root::mozilla::css::URLValue>,
pub mStrokeDasharray: root::nsTArray<root::nsStyleCoord>,
pub mContextProps: root::nsTArray<root::RefPtr<root::nsIAtom>>,
pub mContextProps: root::nsTArray<root::RefPtr<root::nsAtom>>,
pub mStrokeDashoffset: root::nsStyleCoord,
pub mStrokeWidth: root::nsStyleCoord,
pub mFillOpacity: f32,
@ -13569,7 +13569,7 @@ pub mod root {
pub mIsolation: u8,
pub mTopLayer: u8,
pub mWillChangeBitField: u8,
pub mWillChange: root::nsTArray<root::RefPtr<root::nsIAtom>>,
pub mWillChange: root::nsTArray<root::RefPtr<root::nsAtom>>,
pub mTouchAction: u8,
pub mScrollBehavior: u8,
pub mScrollSnapTypeX: u8,
@ -14793,7 +14793,7 @@ pub mod root {
}
#[repr(C)]
#[derive(Debug)]
pub struct nsIAtom {
pub struct nsAtom {
pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt,
pub _bitfield_1: u32,
pub mHash: u32,
@ -14801,35 +14801,35 @@ pub mod root {
}
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum nsIAtom_AtomKind {
pub enum nsAtom_AtomKind {
DynamicAtom = 0,
StaticAtom = 1,
HTML5Atom = 2,
}
pub type nsIAtom_HasThreadSafeRefCnt = root::mozilla::TrueType;
pub type nsAtom_HasThreadSafeRefCnt = root::mozilla::TrueType;
#[test]
fn bindgen_test_layout_nsIAtom() {
assert_eq!(::std::mem::size_of::<nsIAtom>() , 24usize , concat ! (
"Size of: " , stringify ! ( nsIAtom ) ));
assert_eq! (::std::mem::align_of::<nsIAtom>() , 8usize , concat ! (
"Alignment of " , stringify ! ( nsIAtom ) ));
fn bindgen_test_layout_nsAtom() {
assert_eq!(::std::mem::size_of::<nsAtom>() , 24usize , concat ! (
"Size of: " , stringify ! ( nsAtom ) ));
assert_eq! (::std::mem::align_of::<nsAtom>() , 8usize , concat ! (
"Alignment of " , stringify ! ( nsAtom ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsIAtom ) ) . mRefCnt as * const _ as
& ( * ( 0 as * const nsAtom ) ) . mRefCnt as * const _ as
usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( nsIAtom ) , "::" ,
"Alignment of field: " , stringify ! ( nsAtom ) , "::" ,
stringify ! ( mRefCnt ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsIAtom ) ) . mHash as * const _ as
& ( * ( 0 as * const nsAtom ) ) . mHash as * const _ as
usize } , 12usize , concat ! (
"Alignment of field: " , stringify ! ( nsIAtom ) , "::" ,
"Alignment of field: " , stringify ! ( nsAtom ) , "::" ,
stringify ! ( mHash ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsIAtom ) ) . mString as * const _ as
& ( * ( 0 as * const nsAtom ) ) . mString as * const _ as
usize } , 16usize , concat ! (
"Alignment of field: " , stringify ! ( nsIAtom ) , "::" ,
"Alignment of field: " , stringify ! ( nsAtom ) , "::" ,
stringify ! ( mString ) ));
}
impl nsIAtom {
impl nsAtom {
#[inline]
pub fn mLength(&self) -> u32 {
let mut unit_field_val: u32 =
@ -19270,7 +19270,7 @@ pub mod root {
pub struct nsCSSCounterStyleRule {
pub _base: root::mozilla::css::Rule,
pub _base_1: root::nsIDOMCSSCounterStyleRule,
pub mName: root::RefPtr<root::nsIAtom>,
pub mName: root::RefPtr<root::nsAtom>,
pub mValues: [root::nsCSSValue; 10usize],
pub mGeneration: u32,
}
@ -19375,7 +19375,7 @@ pub mod root {
/// @param aCaseSensitive Whether to do a case-sensitive compare on the values.
/// @return ATTR_MISSING, ATTR_VALUE_NO_MATCH or the non-negative index
/// indicating the first value of aValues that matched
pub type nsIContent_AttrValuesArray = *const *const root::nsIAtom;
pub type nsIContent_AttrValuesArray = *const *const root::nsAtom;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum nsIContent_FlattenedParentType {
@ -19425,7 +19425,7 @@ pub mod root {
#[repr(C)]
#[derive(Debug)]
pub struct nsStyleContext {
pub mPseudoTag: root::RefPtr<root::nsIAtom>,
pub mPseudoTag: root::RefPtr<root::nsAtom>,
pub mBits: u64,
}
pub const nsStyleContext_kAllResolvedStructs:
@ -19470,11 +19470,11 @@ pub mod root {
pub mAnimationManager: root::RefPtr<root::nsAnimationManager>,
pub mRestyleManager: root::RefPtr<root::mozilla::RestyleManager>,
pub mCounterStyleManager: root::RefPtr<root::mozilla::CounterStyleManager>,
pub mMedium: *mut root::nsIAtom,
pub mMediaEmulated: root::RefPtr<root::nsIAtom>,
pub mMedium: *mut root::nsAtom,
pub mMediaEmulated: root::RefPtr<root::nsAtom>,
pub mFontFeatureValuesLookup: root::RefPtr<root::gfxFontFeatureValueSet>,
pub mLinkHandler: *mut root::nsILinkHandler,
pub mLanguage: root::RefPtr<root::nsIAtom>,
pub mLanguage: root::RefPtr<root::nsAtom>,
pub mInflationDisabledForShrinkWrap: bool,
pub mContainer: u64,
pub mBaseMinFontSize: i32,
@ -22484,7 +22484,7 @@ pub mod root {
pub mBits: usize,
}
pub type nsAttrValue_AtomArray =
root::nsTArray<root::RefPtr<root::nsIAtom>>;
root::nsTArray<root::RefPtr<root::nsAtom>>;
pub const nsAttrValue_ValueType_eSVGTypesBegin:
root::nsAttrValue_ValueType =
nsAttrValue_ValueType::eSVGAngle;
@ -24918,7 +24918,7 @@ pub mod root {
#[derive(Debug)]
pub struct nsLanguageAtomService {
pub mLangToGroup: [u64; 4usize],
pub mLocaleLanguage: root::RefPtr<root::nsIAtom>,
pub mLocaleLanguage: root::RefPtr<root::nsAtom>,
}
pub type nsLanguageAtomService_Encoding = root::mozilla::Encoding;
pub type nsLanguageAtomService_NotNull<T> = root::mozilla::NotNull<T>;
@ -25985,7 +25985,7 @@ pub mod root {
pub mFloat: root::__BindgenUnionField<f32>,
pub mString: root::__BindgenUnionField<*mut root::nsStringBuffer>,
pub mColor: root::__BindgenUnionField<root::nscolor>,
pub mAtom: root::__BindgenUnionField<*mut root::nsIAtom>,
pub mAtom: root::__BindgenUnionField<*mut root::nsAtom>,
pub mArray: root::__BindgenUnionField<*mut root::nsCSSValue_Array>,
pub mURL: root::__BindgenUnionField<*mut root::mozilla::css::URLValue>,
pub mImage: root::__BindgenUnionField<*mut root::mozilla::css::ImageValue>,
@ -29795,7 +29795,7 @@ pub mod root {
pub mImage: root::__BindgenUnionField<*mut root::nsStyleImageRequest>,
pub mGradient: root::__BindgenUnionField<*mut root::nsStyleGradient>,
pub mURLValue: root::__BindgenUnionField<*mut root::nsStyleImage_URLValue>,
pub mElementId: root::__BindgenUnionField<*mut root::nsIAtom>,
pub mElementId: root::__BindgenUnionField<*mut root::nsAtom>,
pub bindgen_union_field: u64,
}
#[test]
@ -31907,7 +31907,7 @@ pub mod root {
#[repr(C)]
#[derive(Debug, Copy)]
pub struct nsMediaFeature {
pub mName: *mut *mut root::nsIAtom,
pub mName: *mut *mut root::nsAtom,
pub mRangeType: root::nsMediaFeature_RangeType,
pub mValueType: root::nsMediaFeature_ValueType,
pub mReqFlags: u8,
@ -31945,7 +31945,7 @@ pub mod root {
pub struct nsMediaFeature__bindgen_ty_1 {
pub mInitializer_: root::__BindgenUnionField<*const ::std::os::raw::c_void>,
pub mKeywordTable: root::__BindgenUnionField<*const root::nsCSSProps_KTableEntry>,
pub mMetric: root::__BindgenUnionField<*const *const root::nsIAtom>,
pub mMetric: root::__BindgenUnionField<*const *const root::nsAtom>,
pub bindgen_union_field: u64,
}
#[test]
@ -32339,7 +32339,7 @@ pub mod root {
pub mHasOnly: bool,
pub mTypeOmitted: bool,
pub mHadUnknownExpression: bool,
pub mMediaType: root::RefPtr<root::nsIAtom>,
pub mMediaType: root::RefPtr<root::nsAtom>,
pub mExpressions: root::nsTArray<root::nsMediaExpression>,
}
#[test]
@ -32691,15 +32691,15 @@ pub mod root {
root::nsTArray<*mut root::nsCSSSelector> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsIAtom_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsIAtom>>() ,
fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsIAtom>>() ,
root::RefPtr<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
root::RefPtr<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsStyleImageRequest_close0_instantiation() {
@ -32790,26 +32790,26 @@ pub mod root {
root::nsTArray<root::nsStyleCoord> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsIAtom_close1_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::nsIAtom>>>()
fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsAtom_close1_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::nsAtom>>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::nsTArray<root::RefPtr<root::nsIAtom>> ) ));
assert_eq!(::std::mem::align_of::<root::nsTArray<root::RefPtr<root::nsIAtom>>>()
root::nsTArray<root::RefPtr<root::nsAtom>> ) ));
assert_eq!(::std::mem::align_of::<root::nsTArray<root::RefPtr<root::nsAtom>>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::nsTArray<root::RefPtr<root::nsIAtom>> ) ));
root::nsTArray<root::RefPtr<root::nsAtom>> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsIAtom_close0_instantiation_1() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsIAtom>>() ,
fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_1() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsIAtom>>() ,
root::RefPtr<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
root::RefPtr<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_UniquePtr_open0_nsStyleGridTemplate_DefaultDelete_open1_nsStyleGridTemplate_close1_close0_instantiation() {
@ -32869,26 +32869,26 @@ pub mod root {
));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsIAtom_close1_close0_instantiation_1() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::nsIAtom>>>()
fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsAtom_close1_close0_instantiation_1() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::nsAtom>>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::nsTArray<root::RefPtr<root::nsIAtom>> ) ));
assert_eq!(::std::mem::align_of::<root::nsTArray<root::RefPtr<root::nsIAtom>>>()
root::nsTArray<root::RefPtr<root::nsAtom>> ) ));
assert_eq!(::std::mem::align_of::<root::nsTArray<root::RefPtr<root::nsAtom>>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::nsTArray<root::RefPtr<root::nsIAtom>> ) ));
root::nsTArray<root::RefPtr<root::nsAtom>> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsIAtom_close0_instantiation_2() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsIAtom>>() ,
fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_2() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsIAtom>>() ,
root::RefPtr<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
root::RefPtr<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0_Position_close0_instantiation() {
@ -34504,15 +34504,15 @@ pub mod root {
u64 ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsIAtom_close0_instantiation_3() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsIAtom>>() ,
fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_3() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsIAtom>>() ,
root::RefPtr<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
root::RefPtr<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsCSSFontFaceRule_close0_instantiation() {
@ -34548,15 +34548,15 @@ pub mod root {
root::nsTArray<*mut root::nsIContent> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsIAtom_close0_instantiation_4() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsIAtom>>() ,
fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_4() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsIAtom>>() ,
root::RefPtr<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
root::RefPtr<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_nsCOMPtr_open0_nsIStyleRule_close0_instantiation() {
@ -34761,15 +34761,15 @@ pub mod root {
root::RefPtr<root::mozilla::CounterStyleManager> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsIAtom_close0_instantiation_5() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsIAtom>>() ,
fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_5() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsIAtom>>() ,
root::RefPtr<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
root::RefPtr<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_gfxFontFeatureValueSet_close0_instantiation_1() {
@ -34783,15 +34783,15 @@ pub mod root {
root::RefPtr<root::gfxFontFeatureValueSet> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsIAtom_close0_instantiation_6() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsIAtom>>() ,
fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_6() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsIAtom>>() ,
root::RefPtr<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
root::RefPtr<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_nsCOMPtr_open0_nsITheme_close0_instantiation() {
@ -34882,37 +34882,37 @@ pub mod root {
root::nsAutoPtr<root::gfxMissingFontRecorder> ) ));
}
#[test]
fn __bindgen_test_layout_nsRefPtrHashKey_open0_nsIAtom_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::nsIAtom>>()
fn __bindgen_test_layout_nsRefPtrHashKey_open0_nsAtom_close0_instantiation() {
assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::nsAtom>>()
, 16usize , concat ! (
"Size of template specialization: " , stringify ! (
root::nsRefPtrHashKey<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::nsRefPtrHashKey<root::nsIAtom>>()
root::nsRefPtrHashKey<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::nsRefPtrHashKey<root::nsAtom>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::nsRefPtrHashKey<root::nsIAtom> ) ));
root::nsRefPtrHashKey<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsIAtom_close1_close0_instantiation_2() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::nsIAtom>>>()
fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsAtom_close1_close0_instantiation_2() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::nsAtom>>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::nsTArray<root::RefPtr<root::nsIAtom>> ) ));
assert_eq!(::std::mem::align_of::<root::nsTArray<root::RefPtr<root::nsIAtom>>>()
root::nsTArray<root::RefPtr<root::nsAtom>> ) ));
assert_eq!(::std::mem::align_of::<root::nsTArray<root::RefPtr<root::nsAtom>>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::nsTArray<root::RefPtr<root::nsIAtom>> ) ));
root::nsTArray<root::RefPtr<root::nsAtom>> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsIAtom_close0_instantiation_7() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsIAtom>>() ,
fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_7() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsIAtom>>() ,
root::RefPtr<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
root::RefPtr<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation_4() {
@ -35251,26 +35251,26 @@ pub mod root {
root::mozilla::StaticRefPtr<root::nsIContent> ) ));
}
#[test]
fn __bindgen_test_layout_nsRefPtrHashKey_open0_nsIAtom_close0_instantiation_1() {
assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::nsIAtom>>()
fn __bindgen_test_layout_nsRefPtrHashKey_open0_nsAtom_close0_instantiation_1() {
assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::nsAtom>>()
, 16usize , concat ! (
"Size of template specialization: " , stringify ! (
root::nsRefPtrHashKey<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::nsRefPtrHashKey<root::nsIAtom>>()
root::nsRefPtrHashKey<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::nsRefPtrHashKey<root::nsAtom>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::nsRefPtrHashKey<root::nsIAtom> ) ));
root::nsRefPtrHashKey<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsIAtom_close0_instantiation_8() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsIAtom>>() ,
fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_8() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsIAtom>>() ,
root::RefPtr<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
root::RefPtr<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_UniquePtr_open0_TimeoutManager_DefaultDelete_open1_TimeoutManager_close1_close0_instantiation() {
@ -35751,15 +35751,15 @@ pub mod root {
root::nsTArray<::nsstring::nsStringRepr> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsIAtom_close0_instantiation_9() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsIAtom>>() ,
fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_9() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsIAtom>>() ,
root::RefPtr<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
root::RefPtr<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_nsAutoPtr_open0_LangGroupFontPrefs_close0_instantiation() {
@ -35786,15 +35786,15 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_nsRefPtrHashKey_open0_nsIAtom_close0_instantiation_2() {
assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::nsIAtom>>()
fn __bindgen_test_layout_nsRefPtrHashKey_open0_nsAtom_close0_instantiation_2() {
assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::nsAtom>>()
, 16usize , concat ! (
"Size of template specialization: " , stringify ! (
root::nsRefPtrHashKey<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::nsRefPtrHashKey<root::nsIAtom>>()
root::nsRefPtrHashKey<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::nsRefPtrHashKey<root::nsAtom>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::nsRefPtrHashKey<root::nsIAtom> ) ));
root::nsRefPtrHashKey<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_228468_close0_instantiation() {
@ -36388,15 +36388,15 @@ pub mod root {
root::nsTArray<::nsstring::nsStringRepr> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsIAtom_close0_instantiation_10() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsIAtom>>() ,
fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_10() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsIAtom>>() ,
root::RefPtr<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
root::RefPtr<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0_nsStyleCoord_close0_instantiation_3() {
@ -37301,15 +37301,15 @@ pub mod root {
root::nsTArray<*mut root::mozilla::css::DocumentRule> ) ));
}
#[test]
fn __bindgen_test_layout_RefPtr_open0_nsIAtom_close0_instantiation_11() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsIAtom>>() ,
fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_11() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Size of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsIAtom>>() ,
root::RefPtr<root::nsAtom> ) ));
assert_eq!(::std::mem::align_of::<root::RefPtr<root::nsAtom>>() ,
8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::RefPtr<root::nsIAtom> ) ));
root::RefPtr<root::nsAtom> ) ));
}
#[test]
fn __bindgen_test_layout_nsTArray_open0_nsMediaExpression_close0_instantiation() {

View File

@ -143,7 +143,7 @@ impl PseudoElement {
}
/// Get a PseudoInfo for a pseudo
pub fn pseudo_info(&self) -> (*mut structs::nsIAtom, CSSPseudoElementType) {
pub fn pseudo_info(&self) -> (*mut structs::nsAtom, CSSPseudoElementType) {
(self.atom().as_ptr(), self.pseudo_type())
}

View File

@ -42,14 +42,14 @@ class GkAtomSource:
PATTERN = re.compile('^(GK_ATOM)\((.+),\s*"(.*)"\)')
FILE = "include/nsGkAtomList.h"
CLASS = "nsGkAtoms"
TYPE = "nsIAtom"
TYPE = "nsAtom"
class CSSPseudoElementsAtomSource:
PATTERN = re.compile('^(CSS_PSEUDO_ELEMENT)\((.+),\s*"(.*)",')
FILE = "include/nsCSSPseudoElementList.h"
CLASS = "nsCSSPseudoElements"
# NB: nsICSSPseudoElement is effectively the same as a nsIAtom, but we need
# NB: nsICSSPseudoElement is effectively the same as a nsAtom, but we need
# this for MSVC name mangling.
TYPE = "nsICSSPseudoElement"
@ -163,14 +163,14 @@ class FileAvoidWrite(BytesIO):
self.close()
IMPORTS = ("\nuse gecko_bindings::structs::nsIAtom;"
IMPORTS = ("\nuse gecko_bindings::structs::nsAtom;"
"\nuse string_cache::Atom;\n\n")
ATOM_TEMPLATE = (" #[link_name = \"{link_name}\"]\n"
" pub static {name}: *mut {type};")
UNSAFE_STATIC = ("#[inline(always)]\n"
"pub unsafe fn atom_from_static(ptr: *mut nsIAtom) -> Atom {\n"
"pub unsafe fn atom_from_static(ptr: *mut nsAtom) -> Atom {\n"
" Atom::from_static(ptr)\n"
"}\n\n")
@ -220,7 +220,7 @@ def write_atom_macro(atoms, file_name):
f.write(IMPORTS)
for source in SOURCES:
if source.TYPE != "nsIAtom":
if source.TYPE != "nsAtom":
f.write("pub enum {} {{}}\n\n".format(source.TYPE))
f.write(UNSAFE_STATIC)

View File

@ -5,7 +5,7 @@
//! Element an snapshot common logic.
use CaseSensitivityExt;
use gecko_bindings::structs::nsIAtom;
use gecko_bindings::structs::nsAtom;
use gecko_string_cache::WeakAtom;
use selectors::attr::CaseSensitivity;
use std::{ptr, slice};
@ -13,7 +13,7 @@ use string_cache::Atom;
/// A function that, given an element of type `T`, allows you to get a single
/// class or a class list.
pub type ClassOrClassList<T> = unsafe extern fn (T, *mut *mut nsIAtom, *mut *mut *mut nsIAtom) -> u32;
pub type ClassOrClassList<T> = unsafe extern fn (T, *mut *mut nsAtom, *mut *mut *mut nsAtom) -> u32;
/// Given an item `T`, a class name, and a getter function, return whether that
/// element has the class that `name` represents.
@ -23,8 +23,8 @@ pub fn has_class<T>(item: T,
getter: ClassOrClassList<T>) -> bool
{
unsafe {
let mut class: *mut nsIAtom = ptr::null_mut();
let mut list: *mut *mut nsIAtom = ptr::null_mut();
let mut class: *mut nsAtom = ptr::null_mut();
let mut list: *mut *mut nsAtom = ptr::null_mut();
let length = getter(item, &mut class, &mut list);
match length {
0 => false,
@ -46,8 +46,8 @@ pub fn each_class<F, T>(item: T,
where F: FnMut(&Atom)
{
unsafe {
let mut class: *mut nsIAtom = ptr::null_mut();
let mut list: *mut *mut nsIAtom = ptr::null_mut();
let mut class: *mut nsAtom = ptr::null_mut();
let mut list: *mut *mut nsAtom = ptr::null_mut();
let length = getter(item, &mut class, &mut list);
match length {
0 => {}

View File

@ -54,7 +54,7 @@ use gecko_bindings::bindings::Gecko_UnsetDirtyStyleAttr;
use gecko_bindings::bindings::Gecko_UpdateAnimations;
use gecko_bindings::structs;
use gecko_bindings::structs::{RawGeckoElement, RawGeckoNode, RawGeckoXBLBinding};
use gecko_bindings::structs::{nsIAtom, nsIContent, nsINode_BooleanFlag};
use gecko_bindings::structs::{nsAtom, nsIContent, nsINode_BooleanFlag};
use gecko_bindings::structs::ELEMENT_HANDLED_SNAPSHOT;
use gecko_bindings::structs::ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO;
use gecko_bindings::structs::ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO;
@ -2065,11 +2065,11 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
/// A few helpers to help with attribute selectors and snapshotting.
pub trait NamespaceConstraintHelpers {
/// Returns the namespace of the selector, or null otherwise.
fn atom_or_null(&self) -> *mut nsIAtom;
fn atom_or_null(&self) -> *mut nsAtom;
}
impl<'a> NamespaceConstraintHelpers for NamespaceConstraint<&'a Namespace> {
fn atom_or_null(&self) -> *mut nsIAtom {
fn atom_or_null(&self) -> *mut nsAtom {
match *self {
NamespaceConstraint::Any => ptr::null_mut(),
NamespaceConstraint::Specific(ref ns) => ns.0.as_ptr(),

View File

@ -4,13 +4,13 @@
#![allow(unsafe_code)]
//! A drop-in replacement for string_cache, but backed by Gecko `nsIAtom`s.
//! A drop-in replacement for string_cache, but backed by Gecko `nsAtom`s.
use gecko_bindings::bindings::Gecko_AddRefAtom;
use gecko_bindings::bindings::Gecko_Atomize;
use gecko_bindings::bindings::Gecko_Atomize16;
use gecko_bindings::bindings::Gecko_ReleaseAtom;
use gecko_bindings::structs::{nsIAtom, nsIAtom_AtomKind};
use gecko_bindings::structs::{nsAtom, nsAtom_AtomKind};
use nsstring::{nsAString, nsStr};
use precomputed_hash::PrecomputedHash;
use std::ascii::AsciiExt;
@ -46,9 +46,9 @@ pub struct Atom(*mut WeakAtom);
///
/// Only usable as `&'a WeakAtom`,
/// where `'a` is the lifetime of something that holds a strong reference to that atom.
pub struct WeakAtom(nsIAtom);
pub struct WeakAtom(nsAtom);
/// A BorrowedAtom for Gecko is just a weak reference to a `nsIAtom`, that
/// A BorrowedAtom for Gecko is just a weak reference to a `nsAtom`, that
/// hasn't been bumped.
pub type BorrowedAtom<'a> = &'a WeakAtom;
@ -92,9 +92,9 @@ unsafe impl Sync for Atom {}
unsafe impl Sync for WeakAtom {}
impl WeakAtom {
/// Construct a `WeakAtom` from a raw `nsIAtom`.
/// Construct a `WeakAtom` from a raw `nsAtom`.
#[inline]
pub unsafe fn new<'a>(atom: *const nsIAtom) -> &'a mut Self {
pub unsafe fn new<'a>(atom: *const nsAtom) -> &'a mut Self {
&mut *(atom as *mut WeakAtom)
}
@ -149,7 +149,7 @@ impl WeakAtom {
#[inline]
pub fn is_static(&self) -> bool {
unsafe {
(*self.as_ptr()).mKind() == nsIAtom_AtomKind::StaticAtom as u32
(*self.as_ptr()).mKind() == nsAtom_AtomKind::StaticAtom as u32
}
}
@ -169,9 +169,9 @@ impl WeakAtom {
/// Returns the atom as a mutable pointer.
#[inline]
pub fn as_ptr(&self) -> *mut nsIAtom {
let const_ptr: *const nsIAtom = &self.0;
const_ptr as *mut nsIAtom
pub fn as_ptr(&self) -> *mut nsAtom {
let const_ptr: *const nsAtom = &self.0;
const_ptr as *mut nsAtom
}
/// Convert this atom to ASCII lower-case
@ -240,7 +240,7 @@ impl fmt::Display for WeakAtom {
impl Atom {
/// Execute a callback with the atom represented by `ptr`.
pub unsafe fn with<F, R>(ptr: *mut nsIAtom, callback: F) -> R where F: FnOnce(&Atom) -> R {
pub unsafe fn with<F, R>(ptr: *mut nsAtom, callback: F) -> R where F: FnOnce(&Atom) -> R {
let atom = Atom(WeakAtom::new(ptr));
let ret = callback(&atom);
mem::forget(atom);
@ -254,7 +254,7 @@ impl Atom {
/// that way, now we have sugar for is_static, creating atoms using
/// Atom::from should involve almost no overhead.
#[inline]
unsafe fn from_static(ptr: *mut nsIAtom) -> Self {
unsafe fn from_static(ptr: *mut nsAtom) -> Self {
let atom = Atom(ptr as *mut WeakAtom);
debug_assert!(atom.is_static(),
"Called from_static for a non-static atom!");
@ -264,16 +264,16 @@ impl Atom {
/// Creates an atom from a dynamic atom pointer that has already had AddRef
/// called on it.
#[inline]
pub unsafe fn from_addrefed(ptr: *mut nsIAtom) -> Self {
pub unsafe fn from_addrefed(ptr: *mut nsAtom) -> Self {
assert!(!ptr.is_null());
unsafe {
Atom(WeakAtom::new(ptr))
}
}
/// Convert this atom into an addrefed nsIAtom pointer.
/// Convert this atom into an addrefed nsAtom pointer.
#[inline]
pub fn into_addrefed(self) -> *mut nsIAtom {
pub fn into_addrefed(self) -> *mut nsAtom {
let ptr = self.as_ptr();
mem::forget(self);
ptr
@ -375,9 +375,9 @@ impl From<String> for Atom {
}
}
impl From<*mut nsIAtom> for Atom {
impl From<*mut nsAtom> for Atom {
#[inline]
fn from(ptr: *mut nsIAtom) -> Atom {
fn from(ptr: *mut nsAtom) -> Atom {
assert!(!ptr.is_null());
unsafe {
let ret = Atom(WeakAtom::new(ptr));

View File

@ -4,7 +4,7 @@
//! A type to represent a namespace.
use gecko_bindings::structs::nsIAtom;
use gecko_bindings::structs::nsAtom;
use precomputed_hash::PrecomputedHash;
use std::borrow::Borrow;
use std::fmt;
@ -76,7 +76,7 @@ impl Borrow<WeakNamespace> for Namespace {
impl WeakNamespace {
/// Trivially construct a WeakNamespace.
#[inline]
pub unsafe fn new<'a>(atom: *mut nsIAtom) -> &'a Self {
pub unsafe fn new<'a>(atom: *mut nsAtom) -> &'a Self {
&*(atom as *const WeakNamespace)
}

View File

@ -175,7 +175,7 @@ impl Clone for ComputedValuesInner {
}
}
type PseudoInfo = (*mut structs::nsIAtom, structs::CSSPseudoElementType);
type PseudoInfo = (*mut structs::nsAtom, structs::CSSPseudoElementType);
type ParentStyleContextInfo<'a> = Option< &'a ComputedValues>;
impl ComputedValuesInner {
@ -220,7 +220,7 @@ impl ComputedValuesInner {
pres_context: bindings::RawGeckoPresContextBorrowed,
parent: ParentStyleContextInfo,
pseudo_ty: structs::CSSPseudoElementType,
pseudo_tag: *mut structs::nsIAtom
pseudo_tag: *mut structs::nsAtom
) -> Arc<ComputedValues> {
let arc = unsafe {
let arc: Arc<ComputedValues> = Arc::new(uninitialized());
@ -3456,7 +3456,7 @@ fn static_assert() {
pub fn clone_will_change(&self) -> longhands::will_change::computed_value::T {
use properties::longhands::will_change::computed_value::T;
use gecko_bindings::structs::nsIAtom;
use gecko_bindings::structs::nsAtom;
use values::CustomIdent;
if self.gecko.mWillChange.len() == 0 {
@ -3464,7 +3464,7 @@ fn static_assert() {
} else {
T::AnimateableFeatures(
self.gecko.mWillChange.iter().map(|gecko_atom| {
CustomIdent((gecko_atom.mRawPtr as *mut nsIAtom).into())
CustomIdent((gecko_atom.mRawPtr as *mut nsAtom).into())
}).collect()
)
}

View File

@ -80,7 +80,7 @@ use style::gecko_bindings::structs;
use style::gecko_bindings::structs::{CSSPseudoElementType, CompositeOperation};
use style::gecko_bindings::structs::{Loader, LoaderReusableStyleSheets};
use style::gecko_bindings::structs::{RawServoStyleRule, ServoStyleContextStrong, RustString};
use style::gecko_bindings::structs::{ServoStyleSheet, SheetParsingMode, nsIAtom, nsCSSPropertyID};
use style::gecko_bindings::structs::{ServoStyleSheet, SheetParsingMode, nsAtom, nsCSSPropertyID};
use style::gecko_bindings::structs::{nsCSSFontFaceRule, nsCSSCounterStyleRule};
use style::gecko_bindings::structs::{nsRestyleHint, nsChangeHint, PropertyValuePair};
use style::gecko_bindings::structs::IterationCompositeOperation;
@ -1589,12 +1589,12 @@ pub extern "C" fn Servo_Keyframe_SetStyle(keyframe: RawServoKeyframeBorrowed,
}
#[no_mangle]
pub extern "C" fn Servo_KeyframesRule_GetName(rule: RawServoKeyframesRuleBorrowed) -> *mut nsIAtom {
pub extern "C" fn Servo_KeyframesRule_GetName(rule: RawServoKeyframesRuleBorrowed) -> *mut nsAtom {
read_locked_arc(rule, |rule: &KeyframesRule| rule.name.as_atom().as_ptr())
}
#[no_mangle]
pub extern "C" fn Servo_KeyframesRule_SetName(rule: RawServoKeyframesRuleBorrowed, name: *mut nsIAtom) {
pub extern "C" fn Servo_KeyframesRule_SetName(rule: RawServoKeyframesRuleBorrowed, name: *mut nsAtom) {
write_locked_arc(rule, |rule: &mut KeyframesRule| {
rule.name = KeyframesName::Ident(CustomIdent(unsafe { Atom::from_addrefed(name) }));
})
@ -1665,14 +1665,14 @@ pub extern "C" fn Servo_MediaRule_GetMedia(rule: RawServoMediaRuleBorrowed) -> R
}
#[no_mangle]
pub extern "C" fn Servo_NamespaceRule_GetPrefix(rule: RawServoNamespaceRuleBorrowed) -> *mut nsIAtom {
pub extern "C" fn Servo_NamespaceRule_GetPrefix(rule: RawServoNamespaceRuleBorrowed) -> *mut nsAtom {
read_locked_arc(rule, |rule: &NamespaceRule| {
rule.prefix.as_ref().unwrap_or(&atom!("")).as_ptr()
})
}
#[no_mangle]
pub extern "C" fn Servo_NamespaceRule_GetURI(rule: RawServoNamespaceRuleBorrowed) -> *mut nsIAtom {
pub extern "C" fn Servo_NamespaceRule_GetURI(rule: RawServoNamespaceRuleBorrowed) -> *mut nsAtom {
read_locked_arc(rule, |rule: &NamespaceRule| rule.url.0.as_ptr())
}
@ -1726,7 +1726,7 @@ pub extern "C" fn Servo_FontFeatureValuesRule_GetValueText(rule: RawServoFontFea
#[no_mangle]
pub extern "C" fn Servo_ComputedValues_GetForAnonymousBox(parent_style_or_null: ServoStyleContextBorrowedOrNull,
pseudo_tag: *mut nsIAtom,
pseudo_tag: *mut nsAtom,
raw_data: RawServoStyleSetBorrowed)
-> ServoStyleContextStrong {
let global_style_data = &*GLOBAL_STYLE_DATA;
@ -1981,7 +1981,7 @@ fn get_pseudo_style(
#[no_mangle]
pub extern "C" fn Servo_ComputedValues_Inherit(
raw_data: RawServoStyleSetBorrowed,
pseudo_tag: *mut nsIAtom,
pseudo_tag: *mut nsAtom,
parent_style_context: ServoStyleContextBorrowedOrNull,
target: structs::InheritTarget
) -> ServoStyleContextStrong {
@ -2662,7 +2662,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetIdentStringValue(declarations:
property:
nsCSSPropertyID,
value:
*mut nsIAtom) {
*mut nsAtom) {
use style::properties::{PropertyDeclaration, LonghandId};
use style::properties::longhands::_x_lang::computed_value::T as Lang;
@ -3821,7 +3821,7 @@ pub extern "C" fn Servo_StyleSet_GetFontFaceRules(raw_data: RawServoStyleSetBorr
#[no_mangle]
pub extern "C" fn Servo_StyleSet_GetCounterStyleRule(raw_data: RawServoStyleSetBorrowed,
name: *mut nsIAtom) -> *mut nsCSSCounterStyleRule {
name: *mut nsAtom) -> *mut nsCSSCounterStyleRule {
let data = PerDocumentStyleData::from_ffi(raw_data).borrow();
unsafe {
@ -3925,7 +3925,7 @@ pub extern "C" fn Servo_UACache_AddSizeOf(
pub extern "C" fn Servo_StyleSet_MightHaveAttributeDependency(
raw_data: RawServoStyleSetBorrowed,
element: RawGeckoElementBorrowed,
local_name: *mut nsIAtom,
local_name: *mut nsAtom,
) -> bool {
let data = PerDocumentStyleData::from_ffi(raw_data).borrow();
let element = GeckoElement(element);