mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update Stylo to 2023-07-23 (#31437)
* Update Stylo to 2023-07-23 * to_shmem should be local when working with Stylo * Fixup for https://phabricator.services.mozilla.com/D180769 * Fixup for https://phabricator.services.mozilla.com/D181125 * Fixup for https://phabricator.services.mozilla.com/D181162 * Fixup for https://phabricator.services.mozilla.com/D181798 * Fixup for https://phabricator.services.mozilla.com/D182514 * Fixup for https://phabricator.services.mozilla.com/D182539 * Update test expectations
This commit is contained in:
parent
6eb96290fa
commit
31cfaf290d
41 changed files with 171 additions and 1208 deletions
|
@ -969,12 +969,19 @@ impl Fragment {
|
|||
let display_item = match gradient {
|
||||
Gradient::Linear {
|
||||
ref direction,
|
||||
ref color_interpolation_method,
|
||||
ref items,
|
||||
ref repeating,
|
||||
compat_mode: _,
|
||||
} => {
|
||||
let (gradient, stops) =
|
||||
gradient::linear(style, placement.tile_size, items, *direction, *repeating);
|
||||
let (gradient, stops) = gradient::linear(
|
||||
style,
|
||||
placement.tile_size,
|
||||
items,
|
||||
*direction,
|
||||
color_interpolation_method,
|
||||
*repeating,
|
||||
);
|
||||
let item = webrender_api::GradientDisplayItem {
|
||||
gradient,
|
||||
bounds: placement.bounds.to_f32_px(),
|
||||
|
@ -987,6 +994,7 @@ impl Fragment {
|
|||
Gradient::Radial {
|
||||
ref shape,
|
||||
ref position,
|
||||
ref color_interpolation_method,
|
||||
ref items,
|
||||
ref repeating,
|
||||
compat_mode: _,
|
||||
|
@ -997,6 +1005,7 @@ impl Fragment {
|
|||
items,
|
||||
shape,
|
||||
position,
|
||||
color_interpolation_method,
|
||||
*repeating,
|
||||
);
|
||||
let item = webrender_api::RadialGradientDisplayItem {
|
||||
|
@ -1226,18 +1235,26 @@ impl Fragment {
|
|||
Image::Gradient(ref gradient) => match **gradient {
|
||||
Gradient::Linear {
|
||||
ref direction,
|
||||
ref color_interpolation_method,
|
||||
ref items,
|
||||
ref repeating,
|
||||
compat_mode: _,
|
||||
} => {
|
||||
let (wr_gradient, linear_stops) =
|
||||
gradient::linear(style, border_image_size, items, *direction, *repeating);
|
||||
let (wr_gradient, linear_stops) = gradient::linear(
|
||||
style,
|
||||
border_image_size,
|
||||
items,
|
||||
*direction,
|
||||
color_interpolation_method,
|
||||
*repeating,
|
||||
);
|
||||
stops = linear_stops;
|
||||
NinePatchBorderSource::Gradient(wr_gradient)
|
||||
},
|
||||
Gradient::Radial {
|
||||
ref shape,
|
||||
ref position,
|
||||
ref color_interpolation_method,
|
||||
ref items,
|
||||
ref repeating,
|
||||
compat_mode: _,
|
||||
|
@ -1248,6 +1265,7 @@ impl Fragment {
|
|||
items,
|
||||
shape,
|
||||
position,
|
||||
color_interpolation_method,
|
||||
*repeating,
|
||||
);
|
||||
stops = radial_stops;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use app_units::Au;
|
||||
use euclid::default::{Point2D, Size2D, Vector2D};
|
||||
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};
|
||||
|
@ -240,6 +241,7 @@ pub fn linear(
|
|||
size: Size2D<Au>,
|
||||
stops: &[GradientItem<Color, LengthPercentage>],
|
||||
direction: LineDirection,
|
||||
_color_interpolation_method: &ColorInterpolationMethod,
|
||||
repeating: bool,
|
||||
) -> (Gradient, Vec<GradientStop>) {
|
||||
use style::values::specified::position::HorizontalPositionKeyword::*;
|
||||
|
@ -307,6 +309,7 @@ pub fn radial(
|
|||
stops: &[GradientItem<Color, LengthPercentage>],
|
||||
shape: &EndingShape,
|
||||
center: &Position,
|
||||
_color_interpolation_method: &ColorInterpolationMethod,
|
||||
repeating: bool,
|
||||
) -> (RadialGradient, Vec<GradientStop>) {
|
||||
let center = Point2D::new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue