mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Upgrade stylo to 2024-09-02 (#33370)
* Upgrade stylo to 2024-09-02 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D217308 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D217626 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D218488 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D219537 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Update test expectations Signed-off-by: Oriol Brufau <obrufau@igalia.com> --------- Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
261d60e456
commit
a76daaf04c
9 changed files with 68 additions and 63 deletions
|
@ -3,11 +3,16 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use style::color::{AbsoluteColor, ColorSpace};
|
||||
use style::values::animated::{Animate, Procedure, ToAnimatedValue};
|
||||
use style::properties::style_structs::Font;
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::animated::{Animate, Context, Procedure, ToAnimatedValue};
|
||||
|
||||
fn interpolate_color(from: AbsoluteColor, to: AbsoluteColor, progress: f64) -> AbsoluteColor {
|
||||
let from = from.to_animated_value();
|
||||
let to = to.to_animated_value();
|
||||
let context = Context {
|
||||
style: &ComputedValues::initial_values_with_font_override(Font::initial_values()),
|
||||
};
|
||||
let from = from.to_animated_value(&context);
|
||||
let to = to.to_animated_value(&context);
|
||||
AbsoluteColor::from_animated_value(
|
||||
from.animate(&to, Procedure::Interpolate { progress })
|
||||
.unwrap(),
|
||||
|
|
|
@ -134,7 +134,7 @@ fn test_report_error_stylesheet() {
|
|||
(
|
||||
14,
|
||||
52,
|
||||
"Unsupported keyframe property declaration: 'margin: 0 invalid 0;'",
|
||||
"Unsupported property declaration: 'margin: 0 invalid 0;'",
|
||||
),
|
||||
]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue