Remove handling for style structs with no gecko counterpart.

This is no longer necessary thanks to all the aligning we've done.
This commit is contained in:
Bobby Holley 2016-04-13 16:54:21 -07:00
parent 873bd82fff
commit 6546fe770b

View file

@ -111,7 +111,6 @@ pub struct ${style_struct.gecko_struct_name};
impl ${style_struct.gecko_struct_name} { impl ${style_struct.gecko_struct_name} {
#[allow(dead_code, unused_variables)] #[allow(dead_code, unused_variables)]
fn initial() -> Arc<Self> { fn initial() -> Arc<Self> {
% if style_struct.gecko_ffi_name:
// Some Gecko style structs have AutoTArray members, which have internal pointers and are // Some Gecko style structs have AutoTArray members, which have internal pointers and are
// thus MOZ_NON_MEMMOVABLE. Since Rust is generally a very move-happy language, we need to // thus MOZ_NON_MEMMOVABLE. Since Rust is generally a very move-happy language, we need to
// be very careful that nsStyle* structs are never moved after they are constructed. // be very careful that nsStyle* structs are never moved after they are constructed.
@ -128,9 +127,6 @@ impl ${style_struct.gecko_struct_name} {
Gecko_Construct_${style_struct.gecko_ffi_name}(&mut Arc::make_mut(&mut result).gecko); Gecko_Construct_${style_struct.gecko_ffi_name}(&mut Arc::make_mut(&mut result).gecko);
} }
result result
% else:
Arc::new(${style_struct.gecko_struct_name})
% endif
} }
} }
%if style_struct.gecko_ffi_name: %if style_struct.gecko_ffi_name: