mirror of
https://github.com/servo/servo.git
synced 2025-08-14 18:05:36 +01:00
implements nsStyleImageRequest type properties animatable
This commit is contained in:
parent
d885747a18
commit
d8dcc52c9a
3 changed files with 33 additions and 1 deletions
|
@ -3413,6 +3413,24 @@ fn static_assert() {
|
|||
unsafe { Gecko_CopyListStyleImageFrom(&mut self.gecko, &other.gecko); }
|
||||
}
|
||||
|
||||
pub fn clone_list_style_image(&self) -> longhands::list_style_image::computed_value::T {
|
||||
use values::specified::url::SpecifiedUrl;
|
||||
use values::{Either, None_};
|
||||
|
||||
longhands::list_style_image::computed_value::T(
|
||||
match self.gecko.mListStyleImage.mRawPtr.is_null() {
|
||||
true => Either::Second(None_),
|
||||
false => {
|
||||
unsafe {
|
||||
let ref gecko_image_request = *self.gecko.mListStyleImage.mRawPtr;
|
||||
Either::First(SpecifiedUrl::from_image_request(gecko_image_request)
|
||||
.expect("mListStyleImage could not convert to SpecifiedUrl"))
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
pub fn set_list_style_type(&mut self, v: longhands::list_style_type::computed_value::T, device: &Device) {
|
||||
use gecko_bindings::bindings::Gecko_SetCounterStyleToString;
|
||||
use nsstring::{nsACString, nsCString};
|
||||
|
|
|
@ -100,7 +100,7 @@ ${helpers.single_keyword("list-style-position", "outside inside", animation_valu
|
|||
</%helpers:longhand>
|
||||
% endif
|
||||
|
||||
<%helpers:longhand name="list-style-image" animation_value_type="none"
|
||||
<%helpers:longhand name="list-style-image" animation_value_type="discrete"
|
||||
boxed="${product == 'gecko'}"
|
||||
spec="https://drafts.csswg.org/css-lists/#propdef-list-style-image">
|
||||
use values::computed::ComputedValueAsSpecified;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue