mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Merge nsCOMPtr<nsIAtom> into CounterStylePtr.
This commit is contained in:
parent
856c296304
commit
9f4a78c2d0
2 changed files with 21 additions and 17 deletions
|
@ -21,11 +21,11 @@ use gecko_bindings::bindings::Gecko_CopyConstruct_${style_struct.gecko_ffi_name}
|
|||
use gecko_bindings::bindings::Gecko_Destroy_${style_struct.gecko_ffi_name};
|
||||
% endfor
|
||||
use gecko_bindings::bindings::Gecko_Construct_nsStyleVariables;
|
||||
use gecko_bindings::bindings::Gecko_CopyCounterStyle;
|
||||
use gecko_bindings::bindings::Gecko_CopyCursorArrayFrom;
|
||||
use gecko_bindings::bindings::Gecko_CopyFontFamilyFrom;
|
||||
use gecko_bindings::bindings::Gecko_CopyImageValueFrom;
|
||||
use gecko_bindings::bindings::Gecko_CopyListStyleImageFrom;
|
||||
use gecko_bindings::bindings::Gecko_CopyListStyleTypeFrom;
|
||||
use gecko_bindings::bindings::Gecko_Destroy_nsStyleVariables;
|
||||
use gecko_bindings::bindings::Gecko_EnsureImageLayersLength;
|
||||
use gecko_bindings::bindings::Gecko_FontFamilyList_AppendGeneric;
|
||||
|
@ -39,7 +39,6 @@ use gecko_bindings::bindings::Gecko_nsStyleFont_SetLang;
|
|||
use gecko_bindings::bindings::Gecko_nsStyleFont_CopyLangFrom;
|
||||
use gecko_bindings::bindings::Gecko_SetListStyleImageNone;
|
||||
use gecko_bindings::bindings::Gecko_SetListStyleImageImageValue;
|
||||
use gecko_bindings::bindings::Gecko_SetListStyleType;
|
||||
use gecko_bindings::bindings::Gecko_SetNullImageValue;
|
||||
use gecko_bindings::bindings::ServoComputedValuesBorrowedOrNull;
|
||||
use gecko_bindings::bindings::{Gecko_ResetFilters, Gecko_CopyFiltersFrom};
|
||||
|
@ -3150,18 +3149,12 @@ fn static_assert() {
|
|||
}
|
||||
|
||||
pub fn set_list_style_type(&mut self, v: longhands::list_style_type::computed_value::T) {
|
||||
use values::generics::CounterStyleOrNone;
|
||||
let name = match v.0 {
|
||||
CounterStyleOrNone::None_ => atom!("none"),
|
||||
CounterStyleOrNone::Name(name) => name.0,
|
||||
};
|
||||
unsafe { Gecko_SetListStyleType(&mut self.gecko, name.as_ptr()); }
|
||||
v.0.to_gecko_value(&mut self.gecko.mCounterStyle);
|
||||
}
|
||||
|
||||
|
||||
pub fn copy_list_style_type_from(&mut self, other: &Self) {
|
||||
unsafe {
|
||||
Gecko_CopyListStyleTypeFrom(&mut self.gecko, &other.gecko);
|
||||
Gecko_CopyCounterStyle(&mut self.gecko.mCounterStyle, &other.gecko.mCounterStyle);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4257,7 +4250,6 @@ clip-path
|
|||
use properties::longhands::content::computed_value::T;
|
||||
use properties::longhands::content::computed_value::ContentItem;
|
||||
use values::generics::CounterStyleOrNone;
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
use gecko_bindings::structs::nsStyleContentData;
|
||||
use gecko_bindings::structs::nsStyleContentType;
|
||||
use gecko_bindings::structs::nsStyleContentType::*;
|
||||
|
@ -4285,11 +4277,7 @@ clip-path
|
|||
if content_type == eStyleContentType_Counters {
|
||||
counter_func.mSeparator.assign_utf8(sep);
|
||||
}
|
||||
let ptr = match style {
|
||||
CounterStyleOrNone::None_ => atom!("none"),
|
||||
CounterStyleOrNone::Name(name) => name.0,
|
||||
}.into_addrefed();
|
||||
unsafe { counter_func.mCounterStyleName.set_raw_from_addrefed::<nsIAtom>(ptr); }
|
||||
style.to_gecko_value(&mut counter_func.mCounterStyle);
|
||||
}
|
||||
|
||||
match v {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue