mirror of
https://github.com/servo/servo.git
synced 2025-10-01 17:19:16 +01:00
Auto merge of #18190 - jryans:stylo-linux32-getorigin, r=emilio
Stylo: Fix up Servo_StyleSheet_GetOrigin for Linux 32-bit ABI https://bugzilla.mozilla.org/show_bug.cgi?id=1392447 <!-- 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/18190) <!-- Reviewable:end -->
This commit is contained in:
commit
5bfd5b966b
5 changed files with 102 additions and 169 deletions
|
@ -1055,12 +1055,16 @@ pub extern "C" fn Servo_StyleSheet_SizeOfIncludingThis(
|
|||
#[no_mangle]
|
||||
pub extern "C" fn Servo_StyleSheet_GetOrigin(
|
||||
sheet: RawServoStyleSheetContentsBorrowed
|
||||
) -> OriginFlags {
|
||||
match StylesheetContents::as_arc(&sheet).origin {
|
||||
) -> u8 {
|
||||
let origin = match StylesheetContents::as_arc(&sheet).origin {
|
||||
Origin::UserAgent => OriginFlags_UserAgent,
|
||||
Origin::User => OriginFlags_User,
|
||||
Origin::Author => OriginFlags_Author,
|
||||
}
|
||||
};
|
||||
// We'd like to return `OriginFlags` here, but bindgen bitfield enums don't
|
||||
// work as return values with the Linux 32-bit ABI at the moment because
|
||||
// they wrap the value in a struct, so for now just unwrap it.
|
||||
origin.0
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue