mirror of
https://github.com/servo/servo.git
synced 2025-07-03 13:33:39 +01:00
Auto merge of #10324 - perlun:rename-style-structs, r=bholley
Renamed the style structs Renamed style structs. The idea is to rename all style structs from Foo to ServoFoo, as described out in #10185. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10324) <!-- Reviewable:end -->
This commit is contained in:
commit
4da38cdd7c
7 changed files with 110 additions and 100 deletions
|
@ -16,7 +16,7 @@ use std::str;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
|
use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
|
||||||
use style::computed_values::{font_stretch, font_variant, font_weight};
|
use style::computed_values::{font_stretch, font_variant, font_weight};
|
||||||
use style::properties::style_structs::Font as FontStyle;
|
use style::properties::style_structs::ServoFont;
|
||||||
use text::Shaper;
|
use text::Shaper;
|
||||||
use text::glyph::{GlyphId, GlyphStore};
|
use text::glyph::{GlyphId, GlyphStore};
|
||||||
use text::shaping::ShaperMethods;
|
use text::shaping::ShaperMethods;
|
||||||
|
@ -88,7 +88,7 @@ pub struct FontMetrics {
|
||||||
pub line_gap: Au,
|
pub line_gap: Au,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type SpecifiedFontStyle = FontStyle;
|
pub type SpecifiedFontStyle = ServoFont;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Font {
|
pub struct Font {
|
||||||
|
@ -266,4 +266,3 @@ pub fn get_and_reset_text_shaping_performance_counter() -> usize {
|
||||||
TEXT_SHAPING_PERFORMANCE_COUNTER.store(0, Ordering::SeqCst);
|
TEXT_SHAPING_PERFORMANCE_COUNTER.store(0, Ordering::SeqCst);
|
||||||
value
|
value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ use style::computed_values::{background_repeat, background_size};
|
||||||
use style::computed_values::{border_style, image_rendering, overflow_x, position};
|
use style::computed_values::{border_style, image_rendering, overflow_x, position};
|
||||||
use style::computed_values::{transform, transform_style, visibility};
|
use style::computed_values::{transform, transform_style, visibility};
|
||||||
use style::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode};
|
use style::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode};
|
||||||
use style::properties::style_structs::Border;
|
use style::properties::style_structs::ServoBorder;
|
||||||
use style::properties::{self, ComputedValues, ServoComputedValues};
|
use style::properties::{self, ComputedValues, ServoComputedValues};
|
||||||
use style::values::RGBA;
|
use style::values::RGBA;
|
||||||
use style::values::computed;
|
use style::values::computed;
|
||||||
|
@ -306,7 +306,7 @@ fn handle_overlapping_radii(size: &Size2D<Au>, radii: &BorderRadii<Au>) -> Borde
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_border_radius(abs_bounds: &Rect<Au>, border_style: &Border) -> BorderRadii<Au> {
|
fn build_border_radius(abs_bounds: &Rect<Au>, border_style: &ServoBorder) -> BorderRadii<Au> {
|
||||||
// TODO(cgaebel): Support border radii even in the case of multiple border widths.
|
// TODO(cgaebel): Support border radii even in the case of multiple border widths.
|
||||||
// This is an extension of supporting elliptical radii. For now, all percentage
|
// This is an extension of supporting elliptical radii. For now, all percentage
|
||||||
// radii will be relative to the width.
|
// radii will be relative to the width.
|
||||||
|
|
|
@ -388,7 +388,7 @@ impl ParentOffsetBorderBoxIterator {
|
||||||
|
|
||||||
impl FragmentBorderBoxIterator for FragmentLocatingFragmentIterator {
|
impl FragmentBorderBoxIterator for FragmentLocatingFragmentIterator {
|
||||||
fn process(&mut self, fragment: &Fragment, _: i32, border_box: &Rect<Au>) {
|
fn process(&mut self, fragment: &Fragment, _: i32, border_box: &Rect<Au>) {
|
||||||
let style_structs::Border {
|
let style_structs::ServoBorder {
|
||||||
border_top_width: top_width,
|
border_top_width: top_width,
|
||||||
border_right_width: right_width,
|
border_right_width: right_width,
|
||||||
border_bottom_width: bottom_width,
|
border_bottom_width: bottom_width,
|
||||||
|
@ -414,7 +414,7 @@ impl FragmentBorderBoxIterator for UnioningFragmentScrollAreaIterator {
|
||||||
// increase in size. To work around this, we store the original elements padding
|
// increase in size. To work around this, we store the original elements padding
|
||||||
// rectangle as `origin_rect` and the union of all child elements padding and
|
// rectangle as `origin_rect` and the union of all child elements padding and
|
||||||
// margin rectangles as `union_rect`.
|
// margin rectangles as `union_rect`.
|
||||||
let style_structs::Border {
|
let style_structs::ServoBorder {
|
||||||
border_top_width: top_border,
|
border_top_width: top_border,
|
||||||
border_right_width: right_border,
|
border_right_width: right_border,
|
||||||
border_bottom_width: bottom_border,
|
border_bottom_width: bottom_border,
|
||||||
|
|
|
@ -24,7 +24,7 @@ use std::sync::Arc;
|
||||||
use style::computed_values::{line_height, text_orientation, text_rendering, text_transform};
|
use style::computed_values::{line_height, text_orientation, text_rendering, text_transform};
|
||||||
use style::computed_values::{white_space};
|
use style::computed_values::{white_space};
|
||||||
use style::logical_geometry::{LogicalSize, WritingMode};
|
use style::logical_geometry::{LogicalSize, WritingMode};
|
||||||
use style::properties::style_structs::Font as FontStyle;
|
use style::properties::style_structs::ServoFont;
|
||||||
use style::properties::{ComputedValues, ServoComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use unicode_bidi::{is_rtl, process_text};
|
use unicode_bidi::{is_rtl, process_text};
|
||||||
use unicode_script::{get_script, Script};
|
use unicode_script::{get_script, Script};
|
||||||
|
@ -409,11 +409,11 @@ fn bounding_box_for_run_metrics(metrics: &RunMetrics, writing_mode: WritingMode)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the metrics of the font represented by the given `FontStyle`, respectively.
|
/// Returns the metrics of the font represented by the given `ServoFont`, respectively.
|
||||||
///
|
///
|
||||||
/// `#[inline]` because often the caller only needs a few fields from the font metrics.
|
/// `#[inline]` because often the caller only needs a few fields from the font metrics.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn font_metrics_for_style(font_context: &mut FontContext, font_style: Arc<FontStyle>)
|
pub fn font_metrics_for_style(font_context: &mut FontContext, font_style: Arc<ServoFont>)
|
||||||
-> FontMetrics {
|
-> FontMetrics {
|
||||||
let fontgroup = font_context.layout_font_group_for_style(font_style);
|
let fontgroup = font_context.layout_font_group_for_style(font_style);
|
||||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||||
|
|
|
@ -112,12 +112,15 @@ class Method(object):
|
||||||
return self.signature() + "{ unimplemented!() }"
|
return self.signature() + "{ unimplemented!() }"
|
||||||
|
|
||||||
class StyleStruct(object):
|
class StyleStruct(object):
|
||||||
def __init__(self, name, inherited, gecko_name, additional_methods):
|
def __init__(self, name, inherited, gecko_ffi_name, additional_methods):
|
||||||
self.name = name
|
self.servo_struct_name = "Servo" + name
|
||||||
self.ident = to_rust_ident(name.lower())
|
self.gecko_struct_name = "Gecko" + name
|
||||||
|
self.trait_name = name
|
||||||
|
self.trait_name_lower = name.lower()
|
||||||
|
self.ident = to_rust_ident(self.trait_name_lower)
|
||||||
self.longhands = []
|
self.longhands = []
|
||||||
self.inherited = inherited
|
self.inherited = inherited
|
||||||
self.gecko_name = gecko_name
|
self.gecko_ffi_name = gecko_ffi_name
|
||||||
self.additional_methods = additional_methods or []
|
self.additional_methods = additional_methods or []
|
||||||
|
|
||||||
STYLE_STRUCTS = []
|
STYLE_STRUCTS = []
|
||||||
|
@ -144,10 +147,10 @@ def switch_to_style_struct(name):
|
||||||
global THIS_STYLE_STRUCT
|
global THIS_STYLE_STRUCT
|
||||||
|
|
||||||
for style_struct in STYLE_STRUCTS:
|
for style_struct in STYLE_STRUCTS:
|
||||||
if style_struct.name == name:
|
if style_struct.trait_name == name:
|
||||||
THIS_STYLE_STRUCT = style_struct
|
THIS_STYLE_STRUCT = style_struct
|
||||||
return ""
|
return ""
|
||||||
fail()
|
raise Exception("Failed to find the struct named " + name)
|
||||||
%>
|
%>
|
||||||
|
|
||||||
// Work around Mako's really annoying namespacing setup.
|
// Work around Mako's really annoying namespacing setup.
|
||||||
|
@ -199,7 +202,7 @@ pub mod longhands {
|
||||||
use properties::longhands;
|
use properties::longhands;
|
||||||
use properties::property_bit_field::PropertyBitField;
|
use properties::property_bit_field::PropertyBitField;
|
||||||
use properties::{ComputedValues, ServoComputedValues, PropertyDeclaration};
|
use properties::{ComputedValues, ServoComputedValues, PropertyDeclaration};
|
||||||
use properties::style_struct_traits::T${THIS_STYLE_STRUCT.name};
|
use properties::style_struct_traits::T${THIS_STYLE_STRUCT.trait_name};
|
||||||
use properties::style_structs;
|
use properties::style_structs;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
@ -232,15 +235,16 @@ pub mod longhands {
|
||||||
declared_value, &custom_props, |value| match *value {
|
declared_value, &custom_props, |value| match *value {
|
||||||
DeclaredValue::Value(ref specified_value) => {
|
DeclaredValue::Value(ref specified_value) => {
|
||||||
let computed = specified_value.to_computed_value(context);
|
let computed = specified_value.to_computed_value(context);
|
||||||
context.mutate_style().mutate_${THIS_STYLE_STRUCT.name.lower()}()
|
context.mutate_style().mutate_${THIS_STYLE_STRUCT.trait_name_lower}()
|
||||||
.set_${property.ident}(computed);
|
.set_${property.ident}(computed);
|
||||||
}
|
}
|
||||||
DeclaredValue::WithVariables { .. } => unreachable!(),
|
DeclaredValue::WithVariables { .. } => unreachable!(),
|
||||||
DeclaredValue::Initial => {
|
DeclaredValue::Initial => {
|
||||||
// We assume that it's faster to use copy_*_from rather than
|
// We assume that it's faster to use copy_*_from rather than
|
||||||
// set_*(get_initial_value());
|
// set_*(get_initial_value());
|
||||||
let initial_struct = C::initial_values().get_${THIS_STYLE_STRUCT.name.lower()}();
|
let initial_struct = C::initial_values()
|
||||||
context.mutate_style().mutate_${THIS_STYLE_STRUCT.name.lower()}()
|
.get_${THIS_STYLE_STRUCT.trait_name_lower}();
|
||||||
|
context.mutate_style().mutate_${THIS_STYLE_STRUCT.trait_name_lower}()
|
||||||
.copy_${property.ident}_from(initial_struct);
|
.copy_${property.ident}_from(initial_struct);
|
||||||
},
|
},
|
||||||
DeclaredValue::Inherit => {
|
DeclaredValue::Inherit => {
|
||||||
|
@ -249,8 +253,8 @@ pub mod longhands {
|
||||||
//
|
//
|
||||||
// FIXME: is it still?
|
// FIXME: is it still?
|
||||||
*cacheable = false;
|
*cacheable = false;
|
||||||
let inherited_struct = inherited_style.get_${THIS_STYLE_STRUCT.name.lower()}();
|
let inherited_struct = inherited_style.get_${THIS_STYLE_STRUCT.trait_name_lower}();
|
||||||
context.mutate_style().mutate_${THIS_STYLE_STRUCT.name.lower()}()
|
context.mutate_style().mutate_${THIS_STYLE_STRUCT.trait_name_lower}()
|
||||||
.copy_${property.ident}_from(inherited_struct);
|
.copy_${property.ident}_from(inherited_struct);
|
||||||
}
|
}
|
||||||
}, error_reporter
|
}, error_reporter
|
||||||
|
@ -6163,7 +6167,7 @@ pub mod style_struct_traits {
|
||||||
use super::longhands;
|
use super::longhands;
|
||||||
|
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
pub trait T${style_struct.name}: Clone {
|
pub trait T${style_struct.trait_name}: Clone {
|
||||||
% for longhand in style_struct.longhands:
|
% for longhand in style_struct.longhands:
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
fn set_${longhand.ident}(&mut self, v: longhands::${longhand.ident}::computed_value::T);
|
fn set_${longhand.ident}(&mut self, v: longhands::${longhand.ident}::computed_value::T);
|
||||||
|
@ -6184,23 +6188,23 @@ pub mod style_structs {
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
|
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
% if style_struct.name == "Font":
|
% if style_struct.trait_name == "Font":
|
||||||
#[derive(Clone, HeapSizeOf, Debug)]
|
#[derive(Clone, HeapSizeOf, Debug)]
|
||||||
% else:
|
% else:
|
||||||
#[derive(PartialEq, Clone, HeapSizeOf)]
|
#[derive(PartialEq, Clone, HeapSizeOf)]
|
||||||
% endif
|
% endif
|
||||||
pub struct ${style_struct.name} {
|
pub struct ${style_struct.servo_struct_name} {
|
||||||
% for longhand in style_struct.longhands:
|
% for longhand in style_struct.longhands:
|
||||||
pub ${longhand.ident}: longhands::${longhand.ident}::computed_value::T,
|
pub ${longhand.ident}: longhands::${longhand.ident}::computed_value::T,
|
||||||
% endfor
|
% endfor
|
||||||
% if style_struct.name == "Font":
|
% if style_struct.trait_name == "Font":
|
||||||
pub hash: u64,
|
pub hash: u64,
|
||||||
% endif
|
% endif
|
||||||
}
|
}
|
||||||
% if style_struct.name == "Font":
|
% if style_struct.trait_name == "Font":
|
||||||
|
|
||||||
impl PartialEq for ${style_struct.name} {
|
impl PartialEq for ${style_struct.servo_struct_name} {
|
||||||
fn eq(&self, other: &${style_struct.name}) -> bool {
|
fn eq(&self, other: &${style_struct.servo_struct_name}) -> bool {
|
||||||
self.hash == other.hash
|
self.hash == other.hash
|
||||||
% for longhand in style_struct.longhands:
|
% for longhand in style_struct.longhands:
|
||||||
&& self.${longhand.ident} == other.${longhand.ident}
|
&& self.${longhand.ident} == other.${longhand.ident}
|
||||||
|
@ -6209,7 +6213,7 @@ pub mod style_structs {
|
||||||
}
|
}
|
||||||
% endif
|
% endif
|
||||||
|
|
||||||
impl super::style_struct_traits::T${style_struct.name} for ${style_struct.name} {
|
impl super::style_struct_traits::T${style_struct.trait_name} for ${style_struct.servo_struct_name} {
|
||||||
% for longhand in style_struct.longhands:
|
% for longhand in style_struct.longhands:
|
||||||
fn set_${longhand.ident}(&mut self, v: longhands::${longhand.ident}::computed_value::T) {
|
fn set_${longhand.ident}(&mut self, v: longhands::${longhand.ident}::computed_value::T) {
|
||||||
self.${longhand.ident} = v;
|
self.${longhand.ident} = v;
|
||||||
|
@ -6218,14 +6222,14 @@ pub mod style_structs {
|
||||||
self.${longhand.ident} = other.${longhand.ident}.clone();
|
self.${longhand.ident} = other.${longhand.ident}.clone();
|
||||||
}
|
}
|
||||||
% endfor
|
% endfor
|
||||||
% if style_struct.name == "Border":
|
% if style_struct.trait_name == "Border":
|
||||||
% for side in ["top", "right", "bottom", "left"]:
|
% for side in ["top", "right", "bottom", "left"]:
|
||||||
fn border_${side}_is_none_or_hidden_and_has_nonzero_width(&self) -> bool {
|
fn border_${side}_is_none_or_hidden_and_has_nonzero_width(&self) -> bool {
|
||||||
self.border_${side}_style.none_or_hidden() &&
|
self.border_${side}_style.none_or_hidden() &&
|
||||||
self.border_${side}_width != ::app_units::Au(0)
|
self.border_${side}_width != ::app_units::Au(0)
|
||||||
}
|
}
|
||||||
% endfor
|
% endfor
|
||||||
% elif style_struct.name == "Box":
|
% elif style_struct.trait_name == "Box":
|
||||||
fn clone_display(&self) -> longhands::display::computed_value::T {
|
fn clone_display(&self) -> longhands::display::computed_value::T {
|
||||||
self.display.clone()
|
self.display.clone()
|
||||||
}
|
}
|
||||||
|
@ -6244,11 +6248,11 @@ pub mod style_structs {
|
||||||
fn transition_count(&self) -> usize {
|
fn transition_count(&self) -> usize {
|
||||||
self.transition_property.0.len()
|
self.transition_property.0.len()
|
||||||
}
|
}
|
||||||
% elif style_struct.name == "Color":
|
% elif style_struct.trait_name == "Color":
|
||||||
fn clone_color(&self) -> longhands::color::computed_value::T {
|
fn clone_color(&self) -> longhands::color::computed_value::T {
|
||||||
self.color.clone()
|
self.color.clone()
|
||||||
}
|
}
|
||||||
% elif style_struct.name == "Font":
|
% elif style_struct.trait_name == "Font":
|
||||||
fn clone_font_size(&self) -> longhands::font_size::computed_value::T {
|
fn clone_font_size(&self) -> longhands::font_size::computed_value::T {
|
||||||
self.font_size.clone()
|
self.font_size.clone()
|
||||||
}
|
}
|
||||||
|
@ -6263,7 +6267,7 @@ pub mod style_structs {
|
||||||
self.font_family.hash(&mut hasher);
|
self.font_family.hash(&mut hasher);
|
||||||
self.hash = hasher.finish()
|
self.hash = hasher.finish()
|
||||||
}
|
}
|
||||||
% elif style_struct.name == "InheritedBox":
|
% elif style_struct.trait_name == "InheritedBox":
|
||||||
fn clone_direction(&self) -> longhands::direction::computed_value::T {
|
fn clone_direction(&self) -> longhands::direction::computed_value::T {
|
||||||
self.direction.clone()
|
self.direction.clone()
|
||||||
}
|
}
|
||||||
|
@ -6273,16 +6277,16 @@ pub mod style_structs {
|
||||||
fn clone_text_orientation(&self) -> longhands::text_orientation::computed_value::T {
|
fn clone_text_orientation(&self) -> longhands::text_orientation::computed_value::T {
|
||||||
self.text_orientation.clone()
|
self.text_orientation.clone()
|
||||||
}
|
}
|
||||||
% elif style_struct.name == "InheritedText":
|
% elif style_struct.trait_name == "InheritedText":
|
||||||
fn clone__servo_text_decorations_in_effect(&self) ->
|
fn clone__servo_text_decorations_in_effect(&self) ->
|
||||||
longhands::_servo_text_decorations_in_effect::computed_value::T {
|
longhands::_servo_text_decorations_in_effect::computed_value::T {
|
||||||
self._servo_text_decorations_in_effect.clone()
|
self._servo_text_decorations_in_effect.clone()
|
||||||
}
|
}
|
||||||
% elif style_struct.name == "Outline":
|
% elif style_struct.trait_name == "Outline":
|
||||||
fn outline_is_none_or_hidden_and_has_nonzero_width(&self) -> bool {
|
fn outline_is_none_or_hidden_and_has_nonzero_width(&self) -> bool {
|
||||||
self.outline_style.none_or_hidden() && self.outline_width != ::app_units::Au(0)
|
self.outline_style.none_or_hidden() && self.outline_width != ::app_units::Au(0)
|
||||||
}
|
}
|
||||||
% elif style_struct.name == "Text":
|
% elif style_struct.trait_name == "Text":
|
||||||
fn has_underline(&self) -> bool {
|
fn has_underline(&self) -> bool {
|
||||||
self.text_decoration.underline
|
self.text_decoration.underline
|
||||||
}
|
}
|
||||||
|
@ -6300,7 +6304,7 @@ pub mod style_structs {
|
||||||
|
|
||||||
pub trait ComputedValues : Clone + Send + Sync + 'static {
|
pub trait ComputedValues : Clone + Send + Sync + 'static {
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
type Concrete${style_struct.name}: style_struct_traits::T${style_struct.name};
|
type Concrete${style_struct.trait_name}: style_struct_traits::T${style_struct.trait_name};
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
// Temporary bailout case for stuff we haven't made work with the trait
|
// Temporary bailout case for stuff we haven't made work with the trait
|
||||||
|
@ -6315,7 +6319,7 @@ pub trait ComputedValues : Clone + Send + Sync + 'static {
|
||||||
writing_mode: WritingMode,
|
writing_mode: WritingMode,
|
||||||
root_font_size: Au,
|
root_font_size: Au,
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
${style_struct.ident}: Arc<Self::Concrete${style_struct.name}>,
|
${style_struct.ident}: Arc<Self::Concrete${style_struct.trait_name}>,
|
||||||
% endfor
|
% endfor
|
||||||
) -> Self;
|
) -> Self;
|
||||||
|
|
||||||
|
@ -6324,9 +6328,12 @@ pub trait ComputedValues : Clone + Send + Sync + 'static {
|
||||||
fn do_cascade_property<F: FnOnce(&Vec<Option<CascadePropertyFn<Self>>>)>(f: F);
|
fn do_cascade_property<F: FnOnce(&Vec<Option<CascadePropertyFn<Self>>>)>(f: F);
|
||||||
|
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
fn clone_${style_struct.name.lower()}(&self) -> Arc<Self::Concrete${style_struct.name}>;
|
fn clone_${style_struct.trait_name_lower}(&self) ->
|
||||||
fn get_${style_struct.name.lower()}<'a>(&'a self) -> &'a Self::Concrete${style_struct.name};
|
Arc<Self::Concrete${style_struct.trait_name}>;
|
||||||
fn mutate_${style_struct.name.lower()}<'a>(&'a mut self) -> &'a mut Self::Concrete${style_struct.name};
|
fn get_${style_struct.trait_name_lower}<'a>(&'a self) ->
|
||||||
|
&'a Self::Concrete${style_struct.trait_name};
|
||||||
|
fn mutate_${style_struct.trait_name_lower}<'a>(&'a mut self) ->
|
||||||
|
&'a mut Self::Concrete${style_struct.trait_name};
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
fn custom_properties(&self) -> Option<Arc<::custom_properties::ComputedValuesMap>>;
|
fn custom_properties(&self) -> Option<Arc<::custom_properties::ComputedValuesMap>>;
|
||||||
|
@ -6339,7 +6346,7 @@ pub trait ComputedValues : Clone + Send + Sync + 'static {
|
||||||
#[derive(Clone, HeapSizeOf)]
|
#[derive(Clone, HeapSizeOf)]
|
||||||
pub struct ServoComputedValues {
|
pub struct ServoComputedValues {
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
${style_struct.ident}: Arc<style_structs::${style_struct.name}>,
|
${style_struct.ident}: Arc<style_structs::${style_struct.servo_struct_name}>,
|
||||||
% endfor
|
% endfor
|
||||||
custom_properties: Option<Arc<::custom_properties::ComputedValuesMap>>,
|
custom_properties: Option<Arc<::custom_properties::ComputedValuesMap>>,
|
||||||
shareable: bool,
|
shareable: bool,
|
||||||
|
@ -6349,7 +6356,7 @@ pub struct ServoComputedValues {
|
||||||
|
|
||||||
impl ComputedValues for ServoComputedValues {
|
impl ComputedValues for ServoComputedValues {
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
type Concrete${style_struct.name} = style_structs::${style_struct.name};
|
type Concrete${style_struct.trait_name} = style_structs::${style_struct.servo_struct_name};
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
fn as_servo<'a>(&'a self) -> &'a ServoComputedValues { self }
|
fn as_servo<'a>(&'a self) -> &'a ServoComputedValues { self }
|
||||||
|
@ -6360,7 +6367,7 @@ impl ComputedValues for ServoComputedValues {
|
||||||
writing_mode: WritingMode,
|
writing_mode: WritingMode,
|
||||||
root_font_size: Au,
|
root_font_size: Au,
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
${style_struct.ident}: Arc<style_structs::${style_struct.name}>,
|
${style_struct.ident}: Arc<style_structs::${style_struct.servo_struct_name}>,
|
||||||
% endfor
|
% endfor
|
||||||
) -> Self {
|
) -> Self {
|
||||||
ServoComputedValues {
|
ServoComputedValues {
|
||||||
|
@ -6382,17 +6389,20 @@ impl ComputedValues for ServoComputedValues {
|
||||||
|
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
#[inline]
|
#[inline]
|
||||||
fn clone_${style_struct.name.lower()}(&self) -> Arc<Self::Concrete${style_struct.name}> {
|
fn clone_${style_struct.trait_name_lower}(&self) ->
|
||||||
self.${style_struct.ident}.clone()
|
Arc<Self::Concrete${style_struct.trait_name}> {
|
||||||
}
|
self.${style_struct.ident}.clone()
|
||||||
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
fn get_${style_struct.name.lower()}<'a>(&'a self) -> &'a Self::Concrete${style_struct.name} {
|
fn get_${style_struct.trait_name_lower}<'a>(&'a self) ->
|
||||||
&self.${style_struct.ident}
|
&'a Self::Concrete${style_struct.trait_name} {
|
||||||
}
|
&self.${style_struct.ident}
|
||||||
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
fn mutate_${style_struct.name.lower()}<'a>(&'a mut self) -> &'a mut Self::Concrete${style_struct.name} {
|
fn mutate_${style_struct.trait_name_lower}<'a>(&'a mut self) ->
|
||||||
Arc::make_mut(&mut self.${style_struct.ident})
|
&'a mut Self::Concrete${style_struct.trait_name} {
|
||||||
}
|
Arc::make_mut(&mut self.${style_struct.ident})
|
||||||
|
}
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
// Cloning the Arc here is fine because it only happens in the case where we have custom
|
// Cloning the Arc here is fine because it only happens in the case where we have custom
|
||||||
|
@ -6513,7 +6523,7 @@ impl ServoComputedValues {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn get_font_arc(&self) -> Arc<style_structs::Font> {
|
pub fn get_font_arc(&self) -> Arc<style_structs::ServoFont> {
|
||||||
self.font.clone()
|
self.font.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6634,11 +6644,11 @@ pub fn get_writing_mode<S: style_struct_traits::TInheritedBox>(inheritedbox_styl
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref INITIAL_SERVO_VALUES: ServoComputedValues = ServoComputedValues {
|
pub static ref INITIAL_SERVO_VALUES: ServoComputedValues = ServoComputedValues {
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
${style_struct.ident}: Arc::new(style_structs::${style_struct.name} {
|
${style_struct.ident}: Arc::new(style_structs::${style_struct.servo_struct_name} {
|
||||||
% for longhand in style_struct.longhands:
|
% for longhand in style_struct.longhands:
|
||||||
${longhand.ident}: longhands::${longhand.ident}::get_initial_value(),
|
${longhand.ident}: longhands::${longhand.ident}::get_initial_value(),
|
||||||
% endfor
|
% endfor
|
||||||
% if style_struct.name == "Font":
|
% if style_struct.trait_name == "Font":
|
||||||
hash: 0,
|
hash: 0,
|
||||||
% endif
|
% endif
|
||||||
}),
|
}),
|
||||||
|
@ -6677,7 +6687,7 @@ fn cascade_with_cached_declarations<C: ComputedValues>(
|
||||||
% else:
|
% else:
|
||||||
cached_style
|
cached_style
|
||||||
% endif
|
% endif
|
||||||
.clone_${style_struct.name.lower()}(),
|
.clone_${style_struct.trait_name_lower}(),
|
||||||
% endfor
|
% endfor
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
@ -6694,7 +6704,7 @@ fn cascade_with_cached_declarations<C: ComputedValues>(
|
||||||
PropertyDeclaration::${property.camel_case}(ref
|
PropertyDeclaration::${property.camel_case}(ref
|
||||||
${'_' if not style_struct.inherited else ''}declared_value)
|
${'_' if not style_struct.inherited else ''}declared_value)
|
||||||
=> {
|
=> {
|
||||||
use properties::style_struct_traits::T${style_struct.name};
|
use properties::style_struct_traits::T${style_struct.trait_name};
|
||||||
% if style_struct.inherited:
|
% if style_struct.inherited:
|
||||||
if seen.get_${property.ident}() {
|
if seen.get_${property.ident}() {
|
||||||
continue
|
continue
|
||||||
|
@ -6707,14 +6717,14 @@ fn cascade_with_cached_declarations<C: ComputedValues>(
|
||||||
DeclaredValue::Value(ref specified_value)
|
DeclaredValue::Value(ref specified_value)
|
||||||
=> {
|
=> {
|
||||||
let computed = specified_value.to_computed_value(&context);
|
let computed = specified_value.to_computed_value(&context);
|
||||||
context.mutate_style().mutate_${style_struct.name.lower()}()
|
context.mutate_style().mutate_${style_struct.trait_name_lower}()
|
||||||
.set_${property.ident}(computed);
|
.set_${property.ident}(computed);
|
||||||
},
|
},
|
||||||
DeclaredValue::Initial
|
DeclaredValue::Initial
|
||||||
=> {
|
=> {
|
||||||
// FIXME(bholley): We may want set_X_to_initial_value() here.
|
// FIXME(bholley): We may want set_X_to_initial_value() here.
|
||||||
let initial = longhands::${property.ident}::get_initial_value();
|
let initial = longhands::${property.ident}::get_initial_value();
|
||||||
context.mutate_style().mutate_${style_struct.name.lower()}()
|
context.mutate_style().mutate_${style_struct.trait_name_lower}()
|
||||||
.set_${property.ident}(initial);
|
.set_${property.ident}(initial);
|
||||||
},
|
},
|
||||||
DeclaredValue::Inherit => {
|
DeclaredValue::Inherit => {
|
||||||
|
@ -6723,7 +6733,7 @@ fn cascade_with_cached_declarations<C: ComputedValues>(
|
||||||
//
|
//
|
||||||
// FIXME: is it still?
|
// FIXME: is it still?
|
||||||
let inherited_struct = parent_style.get_${style_struct.ident}();
|
let inherited_struct = parent_style.get_${style_struct.ident}();
|
||||||
context.mutate_style().mutate_${style_struct.name.lower()}()
|
context.mutate_style().mutate_${style_struct.trait_name_lower}()
|
||||||
.copy_${property.ident}_from(inherited_struct);
|
.copy_${property.ident}_from(inherited_struct);
|
||||||
}
|
}
|
||||||
DeclaredValue::WithVariables { .. } => unreachable!()
|
DeclaredValue::WithVariables { .. } => unreachable!()
|
||||||
|
@ -6870,7 +6880,7 @@ pub fn cascade<C: ComputedValues>(
|
||||||
% else:
|
% else:
|
||||||
initial_values
|
initial_values
|
||||||
% endif
|
% endif
|
||||||
.clone_${style_struct.name.lower()}(),
|
.clone_${style_struct.trait_name_lower}(),
|
||||||
% endfor
|
% endfor
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
|
@ -62,8 +62,7 @@ try:
|
||||||
style_template.render(PRODUCT='gecko')
|
style_template.render(PRODUCT='gecko')
|
||||||
|
|
||||||
geckolib_template = Template(filename=os.environ['GECKOLIB_TEMPLATE'], input_encoding='utf8')
|
geckolib_template = Template(filename=os.environ['GECKOLIB_TEMPLATE'], input_encoding='utf8')
|
||||||
output = geckolib_template.render(STYLE_STRUCTS = style_template.module.STYLE_STRUCTS,
|
output = geckolib_template.render(STYLE_STRUCTS = style_template.module.STYLE_STRUCTS)
|
||||||
LONGHANDS = style_template.module.LONGHANDS)
|
|
||||||
print(output.encode('utf8'))
|
print(output.encode('utf8'))
|
||||||
except:
|
except:
|
||||||
sys.stderr.write(exceptions.text_error_template().render().encode('utf8'))
|
sys.stderr.write(exceptions.text_error_template().render().encode('utf8'))
|
||||||
|
|
|
@ -2,13 +2,15 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
// STYLE_STRUCTS comes from components/style/properties.mako.rs; see build.rs for more details.
|
||||||
|
|
||||||
use app_units::Au;
|
use app_units::Au;
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
%if style_struct.gecko_name:
|
%if style_struct.gecko_ffi_name:
|
||||||
use gecko_style_structs::${style_struct.gecko_name};
|
use gecko_style_structs::${style_struct.gecko_ffi_name};
|
||||||
use bindings::Gecko_Construct_${style_struct.gecko_name};
|
use bindings::Gecko_Construct_${style_struct.gecko_ffi_name};
|
||||||
use bindings::Gecko_CopyConstruct_${style_struct.gecko_name};
|
use bindings::Gecko_CopyConstruct_${style_struct.gecko_ffi_name};
|
||||||
use bindings::Gecko_Destroy_${style_struct.gecko_name};
|
use bindings::Gecko_Destroy_${style_struct.gecko_ffi_name};
|
||||||
% endif
|
% endif
|
||||||
% endfor
|
% endfor
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
|
@ -25,7 +27,7 @@ use style::properties::style_struct_traits::*;
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct GeckoComputedValues {
|
pub struct GeckoComputedValues {
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
${style_struct.ident}: Arc<Gecko${style_struct.name}>,
|
${style_struct.ident}: Arc<${style_struct.gecko_struct_name}>,
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
custom_properties: Option<Arc<ComputedValuesMap>>,
|
custom_properties: Option<Arc<ComputedValuesMap>>,
|
||||||
|
@ -36,7 +38,7 @@ pub struct GeckoComputedValues {
|
||||||
|
|
||||||
impl ComputedValues for GeckoComputedValues {
|
impl ComputedValues for GeckoComputedValues {
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
type Concrete${style_struct.name} = Gecko${style_struct.name};
|
type Concrete${style_struct.trait_name} = ${style_struct.gecko_struct_name};
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
// These will go away, and we will never implement them.
|
// These will go away, and we will never implement them.
|
||||||
|
@ -48,7 +50,7 @@ impl ComputedValues for GeckoComputedValues {
|
||||||
writing_mode: WritingMode,
|
writing_mode: WritingMode,
|
||||||
root_font_size: Au,
|
root_font_size: Au,
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
${style_struct.ident}: Arc<Gecko${style_struct.name}>,
|
${style_struct.ident}: Arc<${style_struct.gecko_struct_name}>,
|
||||||
% endfor
|
% endfor
|
||||||
) -> Self {
|
) -> Self {
|
||||||
GeckoComputedValues {
|
GeckoComputedValues {
|
||||||
|
@ -70,15 +72,15 @@ impl ComputedValues for GeckoComputedValues {
|
||||||
|
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
#[inline]
|
#[inline]
|
||||||
fn clone_${style_struct.name.lower()}(&self) -> Arc<Self::Concrete${style_struct.name}> {
|
fn clone_${style_struct.trait_name_lower}(&self) -> Arc<Self::Concrete${style_struct.trait_name}> {
|
||||||
self.${style_struct.ident}.clone()
|
self.${style_struct.ident}.clone()
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
fn get_${style_struct.name.lower()}<'a>(&'a self) -> &'a Self::Concrete${style_struct.name} {
|
fn get_${style_struct.trait_name_lower}<'a>(&'a self) -> &'a Self::Concrete${style_struct.trait_name} {
|
||||||
&self.${style_struct.ident}
|
&self.${style_struct.ident}
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
fn mutate_${style_struct.name.lower()}<'a>(&'a mut self) -> &'a mut Self::Concrete${style_struct.name} {
|
fn mutate_${style_struct.trait_name_lower}<'a>(&'a mut self) -> &'a mut Self::Concrete${style_struct.trait_name} {
|
||||||
Arc::make_mut(&mut self.${style_struct.ident})
|
Arc::make_mut(&mut self.${style_struct.ident})
|
||||||
}
|
}
|
||||||
% endfor
|
% endfor
|
||||||
|
@ -94,54 +96,54 @@ impl ComputedValues for GeckoComputedValues {
|
||||||
|
|
||||||
<%def name="declare_style_struct(style_struct)">
|
<%def name="declare_style_struct(style_struct)">
|
||||||
#[derive(Clone, HeapSizeOf, Debug)]
|
#[derive(Clone, HeapSizeOf, Debug)]
|
||||||
% if style_struct.gecko_name:
|
% if style_struct.gecko_ffi_name:
|
||||||
pub struct Gecko${style_struct.name} {
|
pub struct ${style_struct.gecko_struct_name} {
|
||||||
gecko: ${style_struct.gecko_name},
|
gecko: ${style_struct.gecko_ffi_name},
|
||||||
}
|
}
|
||||||
% else:
|
% else:
|
||||||
pub struct Gecko${style_struct.name};
|
pub struct ${style_struct.gecko_struct_name};
|
||||||
% endif
|
% endif
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="impl_style_struct(style_struct)">
|
<%def name="impl_style_struct(style_struct)">
|
||||||
impl Gecko${style_struct.name} {
|
impl ${style_struct.gecko_struct_name} {
|
||||||
#[allow(dead_code, unused_variables)]
|
#[allow(dead_code, unused_variables)]
|
||||||
fn initial() -> Self {
|
fn initial() -> Self {
|
||||||
% if style_struct.gecko_name:
|
% if style_struct.gecko_ffi_name:
|
||||||
let mut result = Gecko${style_struct.name} { gecko: unsafe { zeroed() } };
|
let mut result = ${style_struct.gecko_struct_name} { gecko: unsafe { zeroed() } };
|
||||||
unsafe {
|
unsafe {
|
||||||
Gecko_Construct_${style_struct.gecko_name}(&mut result.gecko);
|
Gecko_Construct_${style_struct.gecko_ffi_name}(&mut result.gecko);
|
||||||
}
|
}
|
||||||
result
|
result
|
||||||
% else:
|
% else:
|
||||||
Gecko${style_struct.name}
|
${style_struct.gecko_struct_name}
|
||||||
% endif
|
% endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
%if style_struct.gecko_name:
|
%if style_struct.gecko_ffi_name:
|
||||||
impl Drop for Gecko${style_struct.name} {
|
impl Drop for ${style_struct.gecko_struct_name} {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
Gecko_Destroy_${style_struct.gecko_name}(&mut self.gecko);
|
Gecko_Destroy_${style_struct.gecko_ffi_name}(&mut self.gecko);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl Clone for ${style_struct.gecko_name} {
|
impl Clone for ${style_struct.gecko_ffi_name} {
|
||||||
fn clone(&self) -> Self {
|
fn clone(&self) -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut result: Self = zeroed();
|
let mut result: Self = zeroed();
|
||||||
Gecko_CopyConstruct_${style_struct.gecko_name}(&mut result, self);
|
Gecko_CopyConstruct_${style_struct.gecko_ffi_name}(&mut result, self);
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unsafe impl Send for ${style_struct.gecko_name} {}
|
unsafe impl Send for ${style_struct.gecko_ffi_name} {}
|
||||||
unsafe impl Sync for ${style_struct.gecko_name} {}
|
unsafe impl Sync for ${style_struct.gecko_ffi_name} {}
|
||||||
impl HeapSizeOf for ${style_struct.gecko_name} {
|
impl HeapSizeOf for ${style_struct.gecko_ffi_name} {
|
||||||
// Not entirely accurate, but good enough for now.
|
// Not entirely accurate, but good enough for now.
|
||||||
fn heap_size_of_children(&self) -> usize { 0 }
|
fn heap_size_of_children(&self) -> usize { 0 }
|
||||||
}
|
}
|
||||||
impl Debug for ${style_struct.gecko_name} {
|
impl Debug for ${style_struct.gecko_ffi_name} {
|
||||||
// FIXME(bholley): Generate this.
|
// FIXME(bholley): Generate this.
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
write!(f, "GECKO STYLE STRUCT")
|
write!(f, "GECKO STYLE STRUCT")
|
||||||
|
@ -151,7 +153,7 @@ impl Debug for ${style_struct.gecko_name} {
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="raw_impl_trait(style_struct, skip_longhands=None, skip_additionals=None)">
|
<%def name="raw_impl_trait(style_struct, skip_longhands=None, skip_additionals=None)">
|
||||||
impl T${style_struct.name} for Gecko${style_struct.name} {
|
impl T${style_struct.trait_name} for ${style_struct.gecko_struct_name} {
|
||||||
/*
|
/*
|
||||||
* Manually-Implemented Methods.
|
* Manually-Implemented Methods.
|
||||||
*/
|
*/
|
||||||
|
@ -180,8 +182,8 @@ impl T${style_struct.name} for Gecko${style_struct.name} {
|
||||||
|
|
||||||
<%! MANUAL_STYLE_STRUCTS = [] %>
|
<%! MANUAL_STYLE_STRUCTS = [] %>
|
||||||
<%def name="impl_trait(style_struct_name, skip_longhands=None, skip_additionals=None)">
|
<%def name="impl_trait(style_struct_name, skip_longhands=None, skip_additionals=None)">
|
||||||
<%self:raw_impl_trait style_struct="${next(x for x in STYLE_STRUCTS if x.name == style_struct_name)}"
|
<%self:raw_impl_trait style_struct="${next(x for x in STYLE_STRUCTS if x.trait_name == style_struct_name)}"
|
||||||
skip_longhands="${skip_longhands}" skip_additionals="${skip_additionals}">
|
skip_longhands="${skip_longhands}" skip_additionals="${skip_additionals}">
|
||||||
${caller.body()}
|
${caller.body()}
|
||||||
</%self:raw_impl_trait>
|
</%self:raw_impl_trait>
|
||||||
<% MANUAL_STYLE_STRUCTS.append(style_struct_name) %>
|
<% MANUAL_STYLE_STRUCTS.append(style_struct_name) %>
|
||||||
|
@ -214,7 +216,7 @@ ${caller.body()}
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
${declare_style_struct(style_struct)}
|
${declare_style_struct(style_struct)}
|
||||||
${impl_style_struct(style_struct)}
|
${impl_style_struct(style_struct)}
|
||||||
% if not style_struct.name in MANUAL_STYLE_STRUCTS:
|
% if not style_struct.trait_name in MANUAL_STYLE_STRUCTS:
|
||||||
<%self:raw_impl_trait style_struct="${style_struct}"></%self:raw_impl_trait>
|
<%self:raw_impl_trait style_struct="${style_struct}"></%self:raw_impl_trait>
|
||||||
% endif
|
% endif
|
||||||
% endfor
|
% endfor
|
||||||
|
@ -222,7 +224,7 @@ ${impl_style_struct(style_struct)}
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref INITIAL_GECKO_VALUES: GeckoComputedValues = GeckoComputedValues {
|
pub static ref INITIAL_GECKO_VALUES: GeckoComputedValues = GeckoComputedValues {
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
${style_struct.ident}: Arc::new(Gecko${style_struct.name}::initial()),
|
${style_struct.ident}: Arc::new(${style_struct.gecko_struct_name}::initial()),
|
||||||
% endfor
|
% endfor
|
||||||
custom_properties: None,
|
custom_properties: None,
|
||||||
shareable: true,
|
shareable: true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue