mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Auto merge of #16963 - BorisChiou:stylo/animation/omta, r=emilio
stylo: Bug 1334036 - Enable animations running on compositor. These are interdependent patches of Bug 1334036, which enables off-main thread animations. We add one FFI to get the property id set which overriding animations, so we can make sure the cascade result is correct for off-main thread animations. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [Bug 1334036](https://bugzilla.mozilla.org/show_bug.cgi?id=1334036) - [X] These changes do not require tests because we support off-main thread animation only on Gecko, and there are enough test cases there. <!-- 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/16963) <!-- Reviewable:end -->
This commit is contained in:
commit
5a012cc9b1
11 changed files with 1543 additions and 1267 deletions
|
@ -2241,7 +2241,7 @@ fn static_assert() {
|
|||
% endfor
|
||||
}
|
||||
</%def>
|
||||
pub fn convert_transform(input: Vec<longhands::transform::computed_value::ComputedOperation>,
|
||||
pub fn convert_transform(input: &[longhands::transform::computed_value::ComputedOperation],
|
||||
output: &mut structs::root::RefPtr<structs::root::nsCSSValueSharedList>) {
|
||||
use gecko_bindings::structs::nsCSSKeyword::*;
|
||||
use gecko_bindings::sugar::refptr::RefPtr;
|
||||
|
@ -2261,7 +2261,7 @@ fn static_assert() {
|
|||
let servo = iter.next().expect("Gecko_NewCSSValueSharedList should create a shared \
|
||||
value list of the same length as the transform vector");
|
||||
unsafe {
|
||||
match servo {
|
||||
match *servo {
|
||||
${transform_function_arm("Matrix", "matrix3d", ["number"] * 16)}
|
||||
${transform_function_arm("MatrixWithPercents", "matrix3d", ["number"] * 12 + ["lop"] * 2
|
||||
+ ["length"] + ["number"])}
|
||||
|
@ -2287,7 +2287,7 @@ fn static_assert() {
|
|||
}
|
||||
return;
|
||||
};
|
||||
Self::convert_transform(vec, &mut self.gecko.mSpecifiedTransform);
|
||||
Self::convert_transform(&vec, &mut self.gecko.mSpecifiedTransform);
|
||||
}
|
||||
|
||||
pub fn copy_transform_from(&mut self, other: &Self) {
|
||||
|
|
|
@ -250,7 +250,7 @@ pub mod animated_properties {
|
|||
}
|
||||
|
||||
/// A set of longhand properties
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, PartialEq)]
|
||||
pub struct LonghandIdSet {
|
||||
storage: [u32; (${len(data.longhands)} - 1 + 32) / 32]
|
||||
}
|
||||
|
@ -954,7 +954,7 @@ impl PropertyId {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns a property id from Gecko's nsCSSPropertyID.
|
||||
/// Returns an nsCSSPropertyID.
|
||||
#[cfg(feature = "gecko")]
|
||||
#[allow(non_upper_case_globals)]
|
||||
pub fn to_nscsspropertyid(&self) -> Result<nsCSSPropertyID, ()> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue