mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Use &[ComputedOperation] as the argument type of convert_transform.
Therefore, we don't need to clone the vector.
This commit is contained in:
parent
013b4a7fd0
commit
fe028e045a
2 changed files with 4 additions and 4 deletions
|
@ -2229,7 +2229,7 @@ fn static_assert() {
|
||||||
% endfor
|
% endfor
|
||||||
}
|
}
|
||||||
</%def>
|
</%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>) {
|
output: &mut structs::root::RefPtr<structs::root::nsCSSValueSharedList>) {
|
||||||
use gecko_bindings::structs::nsCSSKeyword::*;
|
use gecko_bindings::structs::nsCSSKeyword::*;
|
||||||
use gecko_bindings::sugar::refptr::RefPtr;
|
use gecko_bindings::sugar::refptr::RefPtr;
|
||||||
|
@ -2249,7 +2249,7 @@ fn static_assert() {
|
||||||
let servo = iter.next().expect("Gecko_NewCSSValueSharedList should create a shared \
|
let servo = iter.next().expect("Gecko_NewCSSValueSharedList should create a shared \
|
||||||
value list of the same length as the transform vector");
|
value list of the same length as the transform vector");
|
||||||
unsafe {
|
unsafe {
|
||||||
match servo {
|
match *servo {
|
||||||
${transform_function_arm("Matrix", "matrix3d", ["number"] * 16)}
|
${transform_function_arm("Matrix", "matrix3d", ["number"] * 16)}
|
||||||
${transform_function_arm("MatrixWithPercents", "matrix3d", ["number"] * 12 + ["lop"] * 2
|
${transform_function_arm("MatrixWithPercents", "matrix3d", ["number"] * 12 + ["lop"] * 2
|
||||||
+ ["length"] + ["number"])}
|
+ ["length"] + ["number"])}
|
||||||
|
@ -2275,7 +2275,7 @@ fn static_assert() {
|
||||||
}
|
}
|
||||||
return;
|
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) {
|
pub fn copy_transform_from(&mut self, other: &Self) {
|
||||||
|
|
|
@ -455,7 +455,7 @@ pub extern "C" fn Servo_AnimationValue_GetTransform(value: RawServoAnimationValu
|
||||||
let list = unsafe { &mut *list };
|
let list = unsafe { &mut *list };
|
||||||
match servo_list.0 {
|
match servo_list.0 {
|
||||||
Some(ref servo_list) => {
|
Some(ref servo_list) => {
|
||||||
style_structs::Box::convert_transform(servo_list.clone(), list);
|
style_structs::Box::convert_transform(servo_list, list);
|
||||||
},
|
},
|
||||||
None => unsafe {
|
None => unsafe {
|
||||||
list.set_move(RefPtr::from_addrefed(Gecko_NewNoneTransform()));
|
list.set_move(RefPtr::from_addrefed(Gecko_NewNoneTransform()));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue