mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #13553 - birtles:animvalues, r=Manishearth
Support creating StyleAnimationValue objects from Servo These are the servo-side changes for [bug 1302949](https://bugzilla.mozilla.org/show_bug.cgi?id=1302949#c59). @Manishearth has already reviewed them there. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [bug 1302949](https://bugzilla.mozilla.org/show_bug.cgi?id=1302949#c59) - [X] These changes do not require tests because there are existing tests for this in mozilla-central <!-- 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/13553) <!-- Reviewable:end -->
This commit is contained in:
commit
804317c885
8 changed files with 170 additions and 2 deletions
|
@ -70,6 +70,16 @@ pub struct GeckoDeclarationBlock {
|
|||
pub immutable: AtomicBool,
|
||||
}
|
||||
|
||||
impl PartialEq for GeckoDeclarationBlock {
|
||||
fn eq(&self, other: &GeckoDeclarationBlock) -> bool {
|
||||
match (&self.declarations, &other.declarations) {
|
||||
(&None, &None) => true,
|
||||
(&Some(ref s), &Some(ref other)) => *s.read() == *other.read(),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl HasFFI for GeckoDeclarationBlock {
|
||||
type FFIType = bindings::ServoDeclarationBlock;
|
||||
}
|
||||
|
|
|
@ -165,6 +165,7 @@ use gecko_bindings::structs::nsINode;
|
|||
use gecko_bindings::structs::nsIDocument;
|
||||
use gecko_bindings::structs::nsIPrincipal;
|
||||
use gecko_bindings::structs::nsIURI;
|
||||
use gecko_bindings::structs::nsString;
|
||||
use gecko_bindings::structs::RawGeckoNode;
|
||||
use gecko_bindings::structs::RawGeckoElement;
|
||||
use gecko_bindings::structs::RawGeckoDocument;
|
||||
|
@ -399,6 +400,11 @@ extern "C" {
|
|||
*const ::std::os::raw::c_char,
|
||||
aLength: u32) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Utf8SliceToString(aString: *mut nsString,
|
||||
aBuffer: *const u8,
|
||||
aBufferLen: usize);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_FontFamilyList_Clear(aList: *mut FontFamilyList);
|
||||
}
|
||||
|
@ -847,6 +853,18 @@ extern "C" {
|
|||
reference:
|
||||
RawServoStyleSheetBorrowed);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_ParseProperty(property_bytes: *const u8,
|
||||
property_length: u32,
|
||||
value_bytes: *const u8,
|
||||
value_length: u32,
|
||||
base_bytes: *const u8,
|
||||
base_length: u32,
|
||||
base: *mut ThreadSafeURIHolder,
|
||||
referrer: *mut ThreadSafeURIHolder,
|
||||
principal: *mut ThreadSafePrincipalHolder)
|
||||
-> ServoDeclarationBlockStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_ParseStyleAttribute(bytes: *const u8, length: u32,
|
||||
cache: *mut nsHTMLCSSStyleSheet)
|
||||
|
@ -860,6 +878,11 @@ extern "C" {
|
|||
pub fn Servo_DeclarationBlock_Release(declarations:
|
||||
ServoDeclarationBlockBorrowed);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_Equals(a: ServoDeclarationBlockBorrowed,
|
||||
b: ServoDeclarationBlockBorrowed)
|
||||
-> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_GetCache(declarations:
|
||||
ServoDeclarationBlockBorrowed)
|
||||
|
@ -929,6 +952,11 @@ extern "C" {
|
|||
pub fn Servo_RestyleSubtree(node: RawGeckoNodeBorrowed,
|
||||
set: RawServoStyleSetBorrowedMut);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_RestyleWithAddedDeclaration(declarations: ServoDeclarationBlockBorrowed,
|
||||
previous_style: ServoComputedValuesBorrowed)
|
||||
-> ServoComputedValuesStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_GetStyleFont(computed_values:
|
||||
ServoComputedValuesBorrowedOrNull)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue