mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
style: Remove eStyleImageType_URL.
It was introduced in bug 1352096 to reduce complexity with Stylo (apparently). Right now it doesn't look like it reduces any complexity, and it's a bit annoying with some of the patches that I'm writing at the moment. So unless there's any objection I think it should go away. Differential Revision: https://phabricator.services.mozilla.com/D31708
This commit is contained in:
parent
8bf0f82ddc
commit
431b9d00f5
4 changed files with 25 additions and 45 deletions
|
@ -53,6 +53,7 @@ use std::mem::{forget, uninitialized, zeroed, ManuallyDrop};
|
|||
use std::{cmp, ops, ptr};
|
||||
use crate::values::{self, CustomIdent, Either, KeyframesName, None_};
|
||||
use crate::values::computed::{NonNegativeLength, Percentage, TransitionProperty};
|
||||
use crate::values::computed::url::ComputedImageUrl;
|
||||
use crate::values::computed::BorderStyle;
|
||||
use crate::values::computed::font::FontSize;
|
||||
use crate::values::computed::effects::Filter;
|
||||
|
@ -60,6 +61,7 @@ use crate::values::generics::column::ColumnCount;
|
|||
use crate::values::generics::transform::TransformStyle;
|
||||
use crate::values::generics::url::UrlOrNone;
|
||||
|
||||
|
||||
pub mod style_structs {
|
||||
% for style_struct in data.style_structs:
|
||||
pub use super::${style_struct.gecko_struct_name} as ${style_struct.name};
|
||||
|
@ -2850,8 +2852,6 @@ fn static_assert() {
|
|||
}
|
||||
|
||||
pub fn clone_list_style_image(&self) -> longhands::list_style_image::computed_value::T {
|
||||
use crate::values::computed::url::ComputedImageUrl;
|
||||
|
||||
if self.gecko.mListStyleImage.mRawPtr.is_null() {
|
||||
return UrlOrNone::None;
|
||||
}
|
||||
|
@ -3489,25 +3489,19 @@ fn set_style_svg_path(
|
|||
${ident}.mType = StyleShapeSourceType::None;
|
||||
|
||||
match v {
|
||||
% if ident == "clip_path":
|
||||
ShapeSource::ImageOrUrl(ref url) => {
|
||||
unsafe {
|
||||
bindings::Gecko_StyleShapeSource_SetURLValue(${ident}, url.url_value_ptr())
|
||||
}
|
||||
}
|
||||
% elif ident == "shape_outside":
|
||||
ShapeSource::None => {} // don't change the type
|
||||
ShapeSource::ImageOrUrl(image) => {
|
||||
% if ident == "clip_path":
|
||||
use crate::values::generics::image::Image;
|
||||
|
||||
let image = Image::Url(ComputedImageUrl(image));
|
||||
% endif
|
||||
unsafe {
|
||||
bindings::Gecko_NewShapeImage(${ident});
|
||||
let style_image = &mut *${ident}.__bindgen_anon_1.mShapeImage.as_mut().mPtr;
|
||||
style_image.set(image);
|
||||
}
|
||||
}
|
||||
% else:
|
||||
<% raise Exception("Unknown property: %s" % ident) %>
|
||||
}
|
||||
% endif
|
||||
ShapeSource::None => {} // don't change the type
|
||||
ShapeSource::Box(reference) => {
|
||||
${ident}.mReferenceBox = reference.into();
|
||||
${ident}.mType = StyleShapeSourceType::Box;
|
||||
|
@ -3662,7 +3656,6 @@ clip-path
|
|||
|
||||
pub fn clone_cursor(&self) -> longhands::cursor::computed_value::T {
|
||||
use crate::values::computed::ui::CursorImage;
|
||||
use crate::values::computed::url::ComputedImageUrl;
|
||||
|
||||
let keyword = self.gecko.mCursor;
|
||||
|
||||
|
@ -3878,7 +3871,6 @@ clip-path
|
|||
use crate::gecko::conversions::string_from_chars_pointer;
|
||||
use crate::gecko_bindings::structs::StyleContentType;
|
||||
use crate::values::generics::counters::{Content, ContentItem};
|
||||
use crate::values::computed::url::ComputedImageUrl;
|
||||
use crate::values::{CustomIdent, Either};
|
||||
use crate::values::generics::CounterStyleOrNone;
|
||||
use crate::values::specified::Attr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue