mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
style: Merge ImageLayer and Image.
ImageLayer is almost the only usage of Image, so keeping them in the same enum makes the resulting C++ struct smaller, and makes it map more cleanly to nsStyleImage. Differential Revision: https://phabricator.services.mozilla.com/D62161
This commit is contained in:
parent
c0d67f796c
commit
149cb5f5f1
12 changed files with 62 additions and 112 deletions
|
@ -684,7 +684,7 @@ fn notify_paint_worklet<E>(context: &StyleContext<E>, data: &ElementData)
|
|||
where
|
||||
E: TElement,
|
||||
{
|
||||
use crate::values::generics::image::{GenericImageLayer, Image};
|
||||
use crate::values::generics::image::Image;
|
||||
use style_traits::ToCss;
|
||||
|
||||
// We speculatively evaluate any paint worklets during styling.
|
||||
|
@ -694,7 +694,7 @@ where
|
|||
if let Some(ref values) = data.styles.primary {
|
||||
for image in &values.get_background().background_image.0 {
|
||||
let (name, arguments) = match *image {
|
||||
GenericImageLayer::Image(Image::PaintWorklet(ref worklet)) => {
|
||||
Image::PaintWorklet(ref worklet) => {
|
||||
(&worklet.name, &worklet.arguments)
|
||||
},
|
||||
_ => continue,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue