mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update Stylo to 2023-09-01 (#31609)
* Update Stylo to 2023-09-01 * Fixup for https://phabricator.services.mozilla.com/D184929 * Fixup for https://phabricator.services.mozilla.com/D184526 * Fixup for https://phabricator.services.mozilla.com/D184525 * Fixup for https://phabricator.services.mozilla.com/D185154 * Fixup for https://phabricator.services.mozilla.com/D184685 * Fixup for https://phabricator.services.mozilla.com/D185916 * Fixup for https://phabricator.services.mozilla.com/D185492 * Fixup for https://phabricator.services.mozilla.com/D186626 * Update test expectations
This commit is contained in:
parent
94c1f2c992
commit
c07484fcb6
67 changed files with 235 additions and 491 deletions
|
@ -8,7 +8,9 @@ use style::color::mix::ColorInterpolationMethod;
|
|||
use style::properties::ComputedValues;
|
||||
use style::values::computed::image::{EndingShape, LineDirection};
|
||||
use style::values::computed::{Angle, Color, LengthPercentage, Percentage, Position};
|
||||
use style::values::generics::image::{Circle, ColorStop, Ellipse, GradientItem, ShapeExtent};
|
||||
use style::values::generics::image::{
|
||||
Circle, ColorStop, Ellipse, GradientFlags, GradientItem, ShapeExtent,
|
||||
};
|
||||
use webrender_api::{ExtendMode, Gradient, GradientBuilder, GradientStop, RadialGradient};
|
||||
|
||||
use crate::display_list::ToLayout;
|
||||
|
@ -242,10 +244,11 @@ pub fn linear(
|
|||
stops: &[GradientItem<Color, LengthPercentage>],
|
||||
direction: LineDirection,
|
||||
_color_interpolation_method: &ColorInterpolationMethod,
|
||||
repeating: bool,
|
||||
flags: GradientFlags,
|
||||
) -> (Gradient, Vec<GradientStop>) {
|
||||
use style::values::specified::position::HorizontalPositionKeyword::*;
|
||||
use style::values::specified::position::VerticalPositionKeyword::*;
|
||||
let repeating = flags.contains(GradientFlags::REPEATING);
|
||||
let angle = match direction {
|
||||
LineDirection::Angle(angle) => angle.radians(),
|
||||
LineDirection::Horizontal(x) => match x {
|
||||
|
@ -310,8 +313,9 @@ pub fn radial(
|
|||
shape: &EndingShape,
|
||||
center: &Position,
|
||||
_color_interpolation_method: &ColorInterpolationMethod,
|
||||
repeating: bool,
|
||||
flags: GradientFlags,
|
||||
) -> (RadialGradient, Vec<GradientStop>) {
|
||||
let repeating = flags.contains(GradientFlags::REPEATING);
|
||||
let center = Point2D::new(
|
||||
center.horizontal.to_used_value(size.width),
|
||||
center.vertical.to_used_value(size.height),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue